Class FileResourceMetadataController
- java.lang.Object
-
- de.digitalcollections.cudami.server.controller.identifiable.resource.FileResourceMetadataController
-
@RestController @Api(description="The fileresource controller", name="Fileresource controller") public class FileResourceMetadataController extends Object
-
-
Constructor Summary
Constructors Constructor Description FileResourceMetadataController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.resource.FileResource>findAll(int pageNumber, int pageSize, String sortField, de.digitalcollections.model.api.paging.enums.Direction sortDirection, de.digitalcollections.model.api.paging.enums.NullHandling nullHandling)de.digitalcollections.model.api.paging.SearchPageResponse<de.digitalcollections.model.api.identifiable.resource.FileResource>findImages(int pageNumber, int pageSize, String sortField, de.digitalcollections.model.api.paging.enums.Direction sortDirection, de.digitalcollections.model.api.paging.enums.NullHandling nullHandling, String searchTerm)org.springframework.http.ResponseEntity<de.digitalcollections.model.api.identifiable.resource.FileResource>get(UUID uuid, Locale pLocale)org.springframework.http.ResponseEntity<de.digitalcollections.model.api.identifiable.resource.FileResource>getByIdentifier(String namespace, String id)de.digitalcollections.model.api.identifiable.resource.FileResourcesave(de.digitalcollections.model.api.identifiable.resource.FileResource fileResource)de.digitalcollections.model.api.identifiable.resource.FileResourceupdate(UUID uuid, de.digitalcollections.model.api.identifiable.resource.FileResource fileResource, org.springframework.validation.BindingResult errors)
-
-
-
Method Detail
-
findAll
@ApiMethod(description="Get all fileresources") @GetMapping(value={"/latest/fileresources","/v2/fileresources"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.resource.FileResource> findAll(@RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="25") int pageSize, @RequestParam(name="sortField",required=false,defaultValue="lastModified") String sortField, @RequestParam(name="sortDirection",required=false,defaultValue="DESC") de.digitalcollections.model.api.paging.enums.Direction sortDirection, @RequestParam(name="nullHandling",required=false,defaultValue="NATIVE") de.digitalcollections.model.api.paging.enums.NullHandling nullHandling)
-
findImages
@ApiMethod(description="Find limited amount of image fileresources containing searchTerm in label or description") @GetMapping(value={"/latest/fileresources/images","/v2/fileresources/images"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.paging.SearchPageResponse<de.digitalcollections.model.api.identifiable.resource.FileResource> findImages(@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, @RequestParam(name="searchTerm",required=false) String searchTerm)
-
get
@ApiMethod(description="Get a fileresource as JSON or XML, depending on extension or <tt>format</tt> request parameter or accept header") @GetMapping(value={"/latest/fileresources/{uuid}","/v2/fileresources/{uuid}"}, produces={"application/json","application/xml"}) @ApiResponseObject public org.springframework.http.ResponseEntity<de.digitalcollections.model.api.identifiable.resource.FileResource> get(@ApiPathParam(description="UUID of the fileresource, 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
-
getByIdentifier
@ApiMethod(description="Get a fileresource as JSON or XML, depending on extension or <tt>format</tt> request parameter or accept header") @GetMapping(value={"/latest/fileresources/identifier/{namespace}:{id}","/v2/fileresources/identifier/{namespace}:{id}"}, produces={"application/json","application/xml"}) @ApiResponseObject public org.springframework.http.ResponseEntity<de.digitalcollections.model.api.identifiable.resource.FileResource> getByIdentifier(@PathVariable String namespace, @PathVariable String id) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
save
@ApiMethod(description="Save a newly created fileresource") @PostMapping(value={"/latest/fileresources","/v2/fileresources"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.resource.FileResource save(@RequestBody de.digitalcollections.model.api.identifiable.resource.FileResource fileResource) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
update
@ApiMethod(description="Update a fileresource") @PutMapping(value={"/latest/fileresources/{uuid}","/v2/fileresources/{uuid}"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.resource.FileResource update(@PathVariable UUID uuid, @RequestBody de.digitalcollections.model.api.identifiable.resource.FileResource fileResource, org.springframework.validation.BindingResult errors) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
-