java.lang.Object
de.digitalcollections.commons.springmvc.controller.AbstractController
de.digitalcollections.cudami.admin.controller.identifiable.entity.CollectionsController

@Controller
public class CollectionsController
extends de.digitalcollections.commons.springmvc.controller.AbstractController
Controller for collection management pages.
  • Constructor Summary

    Constructors
    Constructor Description
    CollectionsController​(LanguageSortingHelper languageSortingHelper, CudamiClient cudamiClient)  
  • Method Summary

    Modifier and Type Method Description
    org.springframework.http.ResponseEntity addDigitalObjects​(java.util.UUID uuid, java.util.List<de.digitalcollections.model.api.identifiable.entity.DigitalObject> digitalObjects)  
    org.springframework.http.ResponseEntity addSubcollection​(java.util.UUID collectionUuid, java.util.UUID subcollectionUuid)  
    org.springframework.http.ResponseEntity addSubcollections​(java.util.UUID collectionUuid, java.util.List<de.digitalcollections.model.api.identifiable.entity.Collection> subcollections)  
    de.digitalcollections.model.api.identifiable.entity.Collection create()  
    java.lang.String create​(org.springframework.ui.Model model, java.lang.String parentType, java.lang.String parentUuid)  
    java.lang.String edit​(java.util.UUID uuid, java.util.Locale activeLanguage, org.springframework.ui.Model model)  
    de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.impl.identifiable.entity.CollectionImpl> findAllTop​(int pageNumber, int pageSize)  
    de.digitalcollections.model.api.identifiable.entity.Collection findOneByIdentifier​(java.lang.String namespace, java.lang.String id)  
    de.digitalcollections.model.api.identifiable.entity.Collection get​(java.util.UUID uuid)  
    de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.DigitalObject> getDigitalObjects​(java.util.UUID uuid, int pageNumber, int pageSize)  
    de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.Collection> getSubcollections​(java.util.UUID uuid, int pageNumber, int pageSize)  
    java.lang.String list​(org.springframework.ui.Model model)  
    protected java.lang.String module()  
    org.springframework.http.ResponseEntity removeDigitalObject​(java.util.UUID collectionUuid, java.util.UUID digitalobjectUuid)  
    org.springframework.http.ResponseEntity removeSubcollection​(java.util.UUID collectionUuid, java.util.UUID subcollectionUuid)  
    org.springframework.http.ResponseEntity save​(de.digitalcollections.model.api.identifiable.entity.Collection collection, java.lang.String parentType, java.util.UUID parentUuid)  
    de.digitalcollections.model.api.paging.SearchPageResponse<de.digitalcollections.model.impl.identifiable.entity.CollectionImpl> search​(int pageNumber, int pageSize, java.lang.String sortField, de.digitalcollections.model.api.paging.enums.Direction sortDirection, java.lang.String searchTerm)  
    org.springframework.http.ResponseEntity update​(java.util.UUID uuid, de.digitalcollections.model.api.identifiable.entity.Collection collection)  
    java.lang.String view​(java.util.UUID uuid, org.springframework.data.domain.Pageable pageable, org.springframework.ui.Model model)  

    Methods inherited from class de.digitalcollections.commons.springmvc.controller.AbstractController

    verifyBinding

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • module

      @ModelAttribute("menu") protected java.lang.String module()
    • addDigitalObjects

      @PostMapping("/api/collections/{uuid}/digitalobjects") public org.springframework.http.ResponseEntity addDigitalObjects​(@PathVariable java.util.UUID uuid, @RequestBody java.util.List<de.digitalcollections.model.api.identifiable.entity.DigitalObject> digitalObjects) throws HttpException
      Throws:
      HttpException
    • addSubcollection

      @PostMapping("/api/collections/{collectionUuid}/subcollections/{subcollectionUuid}") public org.springframework.http.ResponseEntity addSubcollection​(@PathVariable java.util.UUID collectionUuid, @PathVariable java.util.UUID subcollectionUuid) throws HttpException
      Throws:
      HttpException
    • addSubcollections

      @PostMapping("/api/collections/{collectionUuid}/subcollections") public org.springframework.http.ResponseEntity addSubcollections​(@PathVariable java.util.UUID collectionUuid, @RequestBody java.util.List<de.digitalcollections.model.api.identifiable.entity.Collection> subcollections) throws HttpException
      Throws:
      HttpException
    • create

      @GetMapping({"/collections/new","/subcollections/new"}) public java.lang.String create​(org.springframework.ui.Model model, @RequestParam(name="parentType",required=false) java.lang.String parentType, @RequestParam(name="parentUuid",required=false) java.lang.String parentUuid) throws HttpException
      Throws:
      HttpException
    • create

      @GetMapping("/api/collections/new") @ResponseBody public de.digitalcollections.model.api.identifiable.entity.Collection create()
    • edit

      @GetMapping({"/collections/{uuid}/edit","/subcollections/{uuid}/edit"}) public java.lang.String edit​(@PathVariable java.util.UUID uuid, @RequestParam(name="activeLanguage",required=false) java.util.Locale activeLanguage, org.springframework.ui.Model model) throws HttpException
      Throws:
      HttpException
    • findAllTop

      @GetMapping("/api/collections") @ResponseBody public de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.impl.identifiable.entity.CollectionImpl> findAllTop​(@RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="25") int pageSize) throws HttpException
      Throws:
      HttpException
    • findOneByIdentifier

      @GetMapping({"/api/collections/identifier/{namespace}:{id}","/api/subcollections/identifier/{namespace}:{id}"}) @ResponseBody public de.digitalcollections.model.api.identifiable.entity.Collection findOneByIdentifier​(@PathVariable java.lang.String namespace, @PathVariable java.lang.String id) throws HttpException
      Throws:
      HttpException
    • get

      @GetMapping("/api/collections/{uuid}") @ResponseBody public de.digitalcollections.model.api.identifiable.entity.Collection get​(@PathVariable java.util.UUID uuid) throws HttpException
      Throws:
      HttpException
    • getDigitalObjects

      @GetMapping("/api/collections/{uuid}/digitalobjects") @ResponseBody public de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.DigitalObject> getDigitalObjects​(@PathVariable java.util.UUID uuid, @RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="25") int pageSize) throws HttpException
      Throws:
      HttpException
    • getSubcollections

      @GetMapping("/api/collections/{uuid}/subcollections") @ResponseBody public de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.Collection> getSubcollections​(@PathVariable java.util.UUID uuid, @RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="25") int pageSize) throws HttpException
      Throws:
      HttpException
    • list

      @GetMapping("/collections") public java.lang.String list​(org.springframework.ui.Model model) throws HttpException
      Throws:
      HttpException
    • removeDigitalObject

      @DeleteMapping("/api/collections/{collectionUuid}/digitalobjects/{digitalobjectUuid}") @ResponseBody public org.springframework.http.ResponseEntity removeDigitalObject​(@PathVariable java.util.UUID collectionUuid, @PathVariable java.util.UUID digitalobjectUuid) throws HttpException
      Throws:
      HttpException
    • removeSubcollection

      @DeleteMapping("/api/collections/{collectionUuid}/subcollections/{subcollectionUuid}") public org.springframework.http.ResponseEntity removeSubcollection​(@PathVariable java.util.UUID collectionUuid, @PathVariable java.util.UUID subcollectionUuid) throws HttpException
      Throws:
      HttpException
    • save

      @PostMapping("/api/collections/new") public org.springframework.http.ResponseEntity save​(@RequestBody de.digitalcollections.model.api.identifiable.entity.Collection collection, @RequestParam(name="parentType",required=false) java.lang.String parentType, @RequestParam(name="parentUuid",required=false) java.util.UUID parentUuid)
    • search

      @GetMapping({"/api/collections/search","/api/subcollections/search"}) @ResponseBody public de.digitalcollections.model.api.paging.SearchPageResponse<de.digitalcollections.model.impl.identifiable.entity.CollectionImpl> search​(@RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="5") int pageSize, @RequestParam(name="sortField",required=false) java.lang.String sortField, @RequestParam(name="sortDirection",required=false) de.digitalcollections.model.api.paging.enums.Direction sortDirection, @RequestParam(name="searchTerm",required=false) java.lang.String searchTerm) throws HttpException
      Throws:
      HttpException
    • update

      @PutMapping("/api/collections/{uuid}") public org.springframework.http.ResponseEntity update​(@PathVariable java.util.UUID uuid, @RequestBody de.digitalcollections.model.api.identifiable.entity.Collection collection)
    • view

      @GetMapping({"/collections/{uuid}","/subcollections/{uuid}"}) public java.lang.String view​(@PathVariable java.util.UUID uuid, @PageableDefault(size=25) org.springframework.data.domain.Pageable pageable, org.springframework.ui.Model model) throws HttpException
      Throws:
      HttpException