Class ProjectsAPIController
java.lang.Object
de.digitalcollections.commons.springmvc.controller.AbstractController
de.digitalcollections.cudami.admin.controller.AbstractPagingAndSortingController
de.digitalcollections.cudami.admin.controller.AbstractUniqueObjectController<I>
de.digitalcollections.cudami.admin.controller.identifiable.AbstractIdentifiablesController<E,C>
de.digitalcollections.cudami.admin.controller.identifiable.entity.AbstractEntitiesController<de.digitalcollections.model.identifiable.entity.Project,CudamiProjectsClient>
de.digitalcollections.cudami.admin.controller.identifiable.entity.ProjectsAPIController
@RestController
public class ProjectsAPIController
extends AbstractEntitiesController<de.digitalcollections.model.identifiable.entity.Project,CudamiProjectsClient>
Controller for all public "Projects" endpoints (API).
-
Field Summary
Fields inherited from class de.digitalcollections.cudami.admin.controller.AbstractUniqueObjectController
service
Fields inherited from class de.digitalcollections.cudami.admin.controller.AbstractPagingAndSortingController
languageService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
addDigitalObjects
(UUID uuid, List<de.digitalcollections.model.identifiable.entity.digitalobject.DigitalObject> digitalObjects) de.digitalcollections.model.identifiable.entity.Project
create()
BTResponse<de.digitalcollections.model.identifiable.entity.Project>
find
(int offset, int limit, String searchTerm, String sortProperty, String sortOrder, String dataLanguage) BTResponse<de.digitalcollections.model.identifiable.entity.digitalobject.DigitalObject>
findDigitalObjects
(UUID uuid, int offset, int limit, String searchTerm, String sortProperty, String sortOrder, String dataLanguage) de.digitalcollections.model.identifiable.entity.Project
org.springframework.http.ResponseEntity
removeDigitalObject
(UUID projectUuid, UUID digitalobjectUuid) org.springframework.http.ResponseEntity
save
(de.digitalcollections.model.identifiable.entity.Project project) org.springframework.http.ResponseEntity
Methods inherited from class de.digitalcollections.cudami.admin.controller.identifiable.entity.AbstractEntitiesController
search
Methods inherited from class de.digitalcollections.cudami.admin.controller.identifiable.AbstractIdentifiablesController
doForward, getExistingLanguagesFromIdentifiable, getExistingLanguagesFromIdentifiables, getExistingLanguagesFromService
Methods inherited from class de.digitalcollections.cudami.admin.controller.AbstractUniqueObjectController
find
Methods inherited from class de.digitalcollections.cudami.admin.controller.AbstractPagingAndSortingController
createBTRequest, createPageRequest, createPageRequest, getDataLanguage, getDataLanguage, getFieldType
Methods inherited from class de.digitalcollections.commons.springmvc.controller.AbstractController
verifyBinding
-
Constructor Details
-
ProjectsAPIController
-
-
Method Details
-
addDigitalObjects
@PostMapping("/api/projects/{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}$}/digitalobjects") public org.springframework.http.ResponseEntity addDigitalObjects(@PathVariable UUID uuid, @RequestBody List<de.digitalcollections.model.identifiable.entity.digitalobject.DigitalObject> digitalObjects) throws de.digitalcollections.model.exception.TechnicalException - Throws:
de.digitalcollections.model.exception.TechnicalException
-
create
@GetMapping("/api/projects/new") @ResponseBody public de.digitalcollections.model.identifiable.entity.Project create() throws de.digitalcollections.model.exception.TechnicalException- Throws:
de.digitalcollections.model.exception.TechnicalException
-
find
@GetMapping("/api/projects") @ResponseBody public BTResponse<de.digitalcollections.model.identifiable.entity.Project> find(@RequestParam(name="offset",required=false,defaultValue="0") int offset, @RequestParam(name="limit",required=false,defaultValue="10") int limit, @RequestParam(name="search",required=false) String searchTerm, @RequestParam(name="sort",required=false,defaultValue="label") String sortProperty, @RequestParam(name="order",required=false,defaultValue="asc") String sortOrder, @RequestParam(name="dataLanguage",required=false) String dataLanguage) throws de.digitalcollections.model.exception.TechnicalException, ServiceException - Throws:
de.digitalcollections.model.exception.TechnicalException
ServiceException
-
findDigitalObjects
@GetMapping("/api/projects/{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}$}/digitalobjects") @ResponseBody public BTResponse<de.digitalcollections.model.identifiable.entity.digitalobject.DigitalObject> findDigitalObjects(@PathVariable UUID uuid, @RequestParam(name="offset",required=false,defaultValue="0") int offset, @RequestParam(name="limit",required=false,defaultValue="10") int limit, @RequestParam(name="search",required=false) String searchTerm, @RequestParam(name="sort",required=false,defaultValue="label") String sortProperty, @RequestParam(name="order",required=false,defaultValue="asc") String sortOrder, @RequestParam(name="dataLanguage",required=false) String dataLanguage) throws de.digitalcollections.model.exception.TechnicalException - Throws:
de.digitalcollections.model.exception.TechnicalException
-
getByUuid
@GetMapping("/api/projects/{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}$}") @ResponseBody public de.digitalcollections.model.identifiable.entity.Project getByUuid(@PathVariable UUID uuid) throws de.digitalcollections.model.exception.TechnicalException - Throws:
de.digitalcollections.model.exception.TechnicalException
-
removeDigitalObject
@DeleteMapping("/api/projects/{projectUuid}/digitalobjects/{digitalobjectUuid}") @ResponseBody public org.springframework.http.ResponseEntity removeDigitalObject(@PathVariable UUID projectUuid, @PathVariable UUID digitalobjectUuid) throws de.digitalcollections.model.exception.TechnicalException - Throws:
de.digitalcollections.model.exception.TechnicalException
-
save
@PostMapping("/api/projects") public org.springframework.http.ResponseEntity save(@RequestBody de.digitalcollections.model.identifiable.entity.Project project) -
update
@PutMapping("/api/projects/{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 org.springframework.http.ResponseEntity update(@PathVariable UUID uuid, @RequestBody de.digitalcollections.model.identifiable.entity.Project project)
-