Class CollectionsController
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 client) -
Method Summary
Modifier and Type Method Description org.springframework.http.ResponseEntityaddDigitalObjects(java.util.UUID uuid, java.util.List<de.digitalcollections.model.identifiable.entity.DigitalObject> digitalObjects)org.springframework.http.ResponseEntityaddSubcollection(java.util.UUID collectionUuid, java.util.UUID subcollectionUuid)org.springframework.http.ResponseEntityaddSubcollections(java.util.UUID collectionUuid, java.util.List<de.digitalcollections.model.identifiable.entity.Collection> subcollections)de.digitalcollections.model.identifiable.entity.Collectioncreate()java.lang.Stringcreate(org.springframework.ui.Model model, java.lang.String parentType, java.lang.String parentUuid)java.lang.Stringedit(java.util.UUID uuid, java.util.Locale activeLanguage, org.springframework.ui.Model model)de.digitalcollections.model.paging.SearchPageResponse<de.digitalcollections.model.identifiable.entity.Collection>findAllTop(int pageNumber, int pageSize, java.lang.String searchTerm)de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.DigitalObject>findDigitalObjects(java.util.UUID uuid, int pageNumber, int pageSize, java.lang.String searchTerm)de.digitalcollections.model.identifiable.entity.CollectionfindOneByIdentifier(java.lang.String namespace, java.lang.String id)de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection>findSubcollections(java.util.UUID uuid, int pageNumber, int pageSize, java.lang.String searchTerm)de.digitalcollections.model.identifiable.entity.Collectionget(java.util.UUID uuid)java.lang.Stringlist(org.springframework.ui.Model model)protected java.lang.Stringmodule()org.springframework.http.ResponseEntityremoveDigitalObject(java.util.UUID collectionUuid, java.util.UUID digitalobjectUuid)org.springframework.http.ResponseEntityremoveSubcollection(java.util.UUID collectionUuid, java.util.UUID subcollectionUuid)org.springframework.http.ResponseEntitysave(de.digitalcollections.model.identifiable.entity.Collection collection, java.lang.String parentType, java.util.UUID parentUuid)de.digitalcollections.model.paging.SearchPageResponse<de.digitalcollections.model.identifiable.entity.Collection>search(int pageNumber, int pageSize, java.lang.String sortField, de.digitalcollections.model.paging.Direction sortDirection, java.lang.String searchTerm)org.springframework.http.ResponseEntityupdate(java.util.UUID uuid, de.digitalcollections.model.identifiable.entity.Collection collection)java.lang.Stringview(java.util.UUID uuid, org.springframework.ui.Model model)java.lang.StringviewByRefId(long refId, org.springframework.ui.Model model)
-
Constructor Details
-
Method Details
-
addDigitalObjects
@PostMapping("/api/collections/{uuid}/digitalobjects") public org.springframework.http.ResponseEntity addDigitalObjects(@PathVariable java.util.UUID uuid, @RequestBody java.util.List<de.digitalcollections.model.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.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.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.paging.SearchPageResponse<de.digitalcollections.model.identifiable.entity.Collection> findAllTop(@RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="25") int pageSize, @RequestParam(name="searchTerm",required=false) java.lang.String searchTerm) throws HttpException- Throws:
HttpException
-
findDigitalObjects
@GetMapping("/api/collections/{uuid}/digitalobjects") @ResponseBody public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.DigitalObject> findDigitalObjects(@PathVariable java.util.UUID uuid, @RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="25") int pageSize, @RequestParam(name="searchTerm",required=false) java.lang.String searchTerm) throws HttpException- Throws:
HttpException
-
findOneByIdentifier
@GetMapping({"/api/collections/identifier/{namespace}:{id}","/api/subcollections/identifier/{namespace}:{id}"}) @ResponseBody public de.digitalcollections.model.identifiable.entity.Collection findOneByIdentifier(@PathVariable java.lang.String namespace, @PathVariable java.lang.String id) throws HttpException- Throws:
HttpException
-
findSubcollections
@GetMapping("/api/collections/{uuid}/subcollections") @ResponseBody public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> findSubcollections(@PathVariable java.util.UUID uuid, @RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="25") int pageSize, @RequestParam(name="searchTerm",required=false) java.lang.String searchTerm) throws HttpException- Throws:
HttpException
-
get
@GetMapping("/api/collections/{uuid}") @ResponseBody public de.digitalcollections.model.identifiable.entity.Collection get(@PathVariable java.util.UUID uuid) throws HttpException- Throws:
HttpException
-
list
@GetMapping("/collections") public java.lang.String list(org.springframework.ui.Model model) throws HttpException- Throws:
HttpException
-
module
@ModelAttribute("menu") protected java.lang.String module() -
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") public org.springframework.http.ResponseEntity save(@RequestBody de.digitalcollections.model.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.paging.SearchPageResponse<de.digitalcollections.model.identifiable.entity.Collection> 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.paging.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.identifiable.entity.Collection collection) -
view
@GetMapping({"/collections/{uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}}","/subcollections/{uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}}"}) public java.lang.String view(@PathVariable java.util.UUID uuid, org.springframework.ui.Model model) throws HttpException- Throws:
HttpException
-
viewByRefId
@GetMapping({"/collections/{refId:[0-9]+}","/subcollections/{refId:[0-9]+}"}) public java.lang.String viewByRefId(@PathVariable long refId, org.springframework.ui.Model model) throws HttpException- Throws:
HttpException
-