Class CollectionController
- java.lang.Object
-
- de.digitalcollections.cudami.server.controller.identifiable.entity.CollectionController
-
@RestController @Api(description="The collection controller", name="Collection controller") public class CollectionController extends Object
-
-
Constructor Summary
Constructors Constructor Description CollectionController(CollectionService collectionService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.Collection>findAll(int pageNumber, int pageSize, String sortField, de.digitalcollections.model.api.paging.enums.Direction sortDirection, de.digitalcollections.model.api.paging.enums.NullHandling nullHandling)org.springframework.http.ResponseEntity<de.digitalcollections.model.api.identifiable.entity.Collection>getWebpage(UUID uuid, Locale pLocale)de.digitalcollections.model.api.identifiable.entity.Collectionsave(de.digitalcollections.model.api.identifiable.entity.Collection collection, org.springframework.validation.BindingResult errors)de.digitalcollections.model.api.identifiable.entity.Collectionupdate(UUID uuid, de.digitalcollections.model.api.identifiable.entity.Collection collection, org.springframework.validation.BindingResult errors)
-
-
-
Constructor Detail
-
CollectionController
@Autowired public CollectionController(CollectionService collectionService)
-
-
Method Detail
-
findAll
@ApiMethod(description="Get all collections") @RequestMapping(value={"/latest/collections","/v2/collections"}, produces="application/json", method=GET) @ApiResponseObject public de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.Collection> findAll(@RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="5") int pageSize, @RequestParam(name="sortField",required=false,defaultValue="uuid") String sortField, @RequestParam(name="sortDirection",required=false,defaultValue="ASC") de.digitalcollections.model.api.paging.enums.Direction sortDirection, @RequestParam(name="nullHandling",required=false,defaultValue="NATIVE") de.digitalcollections.model.api.paging.enums.NullHandling nullHandling)
-
getWebpage
@ApiMethod(description="Get an collection as JSON or XML, depending on extension or <tt>format</tt> request parameter or accept header") @RequestMapping(value={"/latest/collections/{uuid}","/v2/collections/{uuid}"}, produces={"application/json","application/xml"}, method=GET) @ApiResponseObject public org.springframework.http.ResponseEntity<de.digitalcollections.model.api.identifiable.entity.Collection> getWebpage(@ApiPathParam(description="UUID of the collection, e.g. <tt>599a120c-2dd5-11e8-b467-0ed5f89f718b</tt>") @PathVariable("uuid") UUID uuid, @ApiQueryParam(name="pLocale",description="Desired locale, e.g. <tt>de_DE</tt>. If unset, contents in all languages will be returned") @RequestParam(name="pLocale",required=false) Locale pLocale) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
save
@ApiMethod(description="Save a newly created collection") @RequestMapping(value={"/latest/collections","/v2/collections"}, produces="application/json", method=POST) @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.Collection save(@RequestBody de.digitalcollections.model.api.identifiable.entity.Collection collection, org.springframework.validation.BindingResult errors) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
update
@ApiMethod(description="Update an collection") @RequestMapping(value={"/latest/collections/{uuid}","/v2/collections/{uuid}"}, produces="application/json", method=PUT) @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.Collection update(@PathVariable UUID uuid, @RequestBody de.digitalcollections.model.api.identifiable.entity.Collection collection, org.springframework.validation.BindingResult errors) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
-