Class SubtopicController
java.lang.Object
de.digitalcollections.cudami.server.controller.identifiable.entity.parts.SubtopicController
@RestController
@Api(description="The subtopic controller",
name="Subtopic controller")
public class SubtopicController
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description SubtopicController() -
Method Summary
Modifier and Type Method Description de.digitalcollections.model.api.identifiable.entity.parts.SubtopicaddSubtopicToParentSubtopic(java.util.UUID parentSubtopicUuid, java.util.UUID subtopicUuid)de.digitalcollections.model.api.identifiable.entity.parts.SubtopicaddSubtopicToParentTopic(java.util.UUID parentTopicUuid, java.util.UUID subtopicUuid)longcount()de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>findAll(int pageNumber, int pageSize, java.lang.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.view.BreadcrumbNavigation>getBreadcrumb(java.util.UUID uuid, java.util.Locale pLocale)java.util.List<de.digitalcollections.model.api.identifiable.entity.Entity>getEntities(java.util.UUID uuid)java.util.List<de.digitalcollections.model.api.identifiable.resource.FileResource>getFileResources(java.util.UUID uuid)org.springframework.http.ResponseEntity<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>getSubtopic(java.util.UUID uuid, java.util.Locale pLocale)de.digitalcollections.model.api.identifiable.entity.TopicgetTopic(java.util.UUID uuid, java.util.Locale pLocale)java.util.List<de.digitalcollections.model.api.identifiable.entity.Entity>saveEntities(java.util.UUID uuid, java.util.List<de.digitalcollections.model.api.identifiable.entity.Entity> entities)java.util.List<de.digitalcollections.model.api.identifiable.resource.FileResource>saveFileresources(java.util.UUID uuid, java.util.List<de.digitalcollections.model.api.identifiable.resource.FileResource> fileResources)de.digitalcollections.model.api.identifiable.entity.parts.SubtopicsaveWithParentSubtopic(java.util.UUID parentSubtopicUuid, de.digitalcollections.model.api.identifiable.entity.parts.Subtopic subtopic)de.digitalcollections.model.api.identifiable.entity.parts.SubtopicsaveWithParentTopic(java.util.UUID parentTopicUuid, de.digitalcollections.model.api.identifiable.entity.parts.Subtopic subtopic, org.springframework.validation.BindingResult errors)de.digitalcollections.model.api.identifiable.entity.parts.Subtopicupdate(java.util.UUID uuid, de.digitalcollections.model.api.identifiable.entity.parts.Subtopic subtopic, org.springframework.validation.BindingResult errors)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SubtopicController
public SubtopicController()
-
-
Method Details
-
findAll
@ApiMethod(description="Get all subtopics") @GetMapping(value={"/latest/subtopics","/v2/subtopics"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic> 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") java.lang.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) -
getSubtopic
@ApiMethod(description="Get a subtopic as JSON or XML, depending on extension or <tt>format</tt> request parameter or accept header") @GetMapping(value={"/latest/subtopics/{uuid}","/v2/subtopics/{uuid}"}, produces={"application/json","application/xml"}) @ApiResponseObject public org.springframework.http.ResponseEntity<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic> getSubtopic(@ApiPathParam(description="UUID of the subtopic, e.g. <tt>599a120c-2dd5-11e8-b467-0ed5f89f718b</tt>") @PathVariable("uuid") java.util.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) java.util.Locale pLocale) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
saveWithParentTopic
@ApiMethod(description="Save a newly created top-level subtopic") @PostMapping(value={"/latest/topics/{parentTopicUuid}/subtopic","/v2/topics/{parentTopicUuid}/subtopic"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.parts.Subtopic saveWithParentTopic(@ApiPathParam(name="parentTopicUuid",description="The uuid of the parent topic") @PathVariable java.util.UUID parentTopicUuid, @RequestBody de.digitalcollections.model.api.identifiable.entity.parts.Subtopic subtopic, org.springframework.validation.BindingResult errors) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
addSubtopicToParentTopic
@ApiMethod(description="Add an existing subtopic to an existing topic") @PostMapping(value={"/latest/topics/{parentTopicUuid}/subtopic/{subtopicUuid}","/v2/topics/{parentTopicUuid}/subtopic/{subtopicUuid}"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.parts.Subtopic addSubtopicToParentTopic(@ApiPathParam(name="parentTopicUuid",description="The uuid of the parent topic") @PathVariable java.util.UUID parentTopicUuid, @ApiPathParam(name="subtopicUuid",description="The uuid of the subtopic") @PathVariable java.util.UUID subtopicUuid) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
saveWithParentSubtopic
@ApiMethod(description="Save a newly created subtopic") @PostMapping(value={"/latest/subtopics/{parentSubtopicUuid}/subtopic","/v2/subtopics/{parentSubtopicUuid}/subtopic"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.parts.Subtopic saveWithParentSubtopic(@ApiPathParam(name="parentSubtopicUuid",description="The uuid of the parent subtopic") @PathVariable java.util.UUID parentSubtopicUuid, @RequestBody de.digitalcollections.model.api.identifiable.entity.parts.Subtopic subtopic) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
addSubtopicToParentSubtopic
@ApiMethod(description="Add an existing subtopic to an existing parent subtopic") @PostMapping(value={"/latest/subtopics/{parentSubtopicUuid}/subtopic/{subtopicUuid}","/v2/subtopics/{parentSubtopicUuid}/subtopic/{subtopicUuid}"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.parts.Subtopic addSubtopicToParentSubtopic(@ApiPathParam(name="parentSubtopicUuid",description="The uuid of the parent subtopic") @PathVariable java.util.UUID parentSubtopicUuid, @ApiPathParam(name="subtopicUuid",description="The uuid of the subtopic") @PathVariable java.util.UUID subtopicUuid) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
update
@ApiMethod(description="Update a subtopic") @PutMapping(value={"/latest/subtopics/{uuid}","/v2/subtopics/{uuid}"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.parts.Subtopic update(@ApiPathParam(name="uuid",description="The uuid of the subtopic") @PathVariable java.util.UUID uuid, @RequestBody de.digitalcollections.model.api.identifiable.entity.parts.Subtopic subtopic, org.springframework.validation.BindingResult errors) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
count
@ApiMethod(description="Get count of subtopics") @GetMapping(value={"/latest/subtopics/count","/v2/subtopics/count"}, produces="application/json") @ApiResponseObject public long count() -
getEntities
@ApiMethod(description="Get entities of subtopic") @GetMapping(value={"/latest/subtopics/{uuid}/entities","/v2/subtopics/{uuid}/entities"}, produces="application/json") @ApiResponseObject public java.util.List<de.digitalcollections.model.api.identifiable.entity.Entity> getEntities(@ApiPathParam(name="uuid",description="The uuid of the subtopic") @PathVariable java.util.UUID uuid) -
saveEntities
@ApiMethod(description="Save entities of subtopic") @PostMapping(value={"/latest/subtopics/{uuid}/entities","/v2/subtopics/{uuid}/entities"}, produces="application/json") @ApiResponseObject public java.util.List<de.digitalcollections.model.api.identifiable.entity.Entity> saveEntities(@PathVariable java.util.UUID uuid, @RequestBody java.util.List<de.digitalcollections.model.api.identifiable.entity.Entity> entities) -
getFileResources
@ApiMethod(description="Get file resources of subtopic") @GetMapping(value={"/latest/subtopics/{uuid}/fileresources","/v2/subtopics/{uuid}/fileresources"}, produces="application/json") @ApiResponseObject public java.util.List<de.digitalcollections.model.api.identifiable.resource.FileResource> getFileResources(@PathVariable java.util.UUID uuid) -
saveFileresources
@ApiMethod(description="Save fileresources of subtopic") @PostMapping(value={"/latest/subtopics/{uuid}/fileresources","/v2/subtopics/{uuid}/fileresources"}, produces="application/json") @ApiResponseObject public java.util.List<de.digitalcollections.model.api.identifiable.resource.FileResource> saveFileresources(@PathVariable java.util.UUID uuid, @RequestBody java.util.List<de.digitalcollections.model.api.identifiable.resource.FileResource> fileResources) -
getBreadcrumb
@ApiMethod(description="Get the breadcrumb for a subtopic") @GetMapping(value={"/latest/subtopics/{uuid}/breadcrumb","/v3/subtopics/{uuid}/breadcrumb"}, produces="application/json") @ApiResponseObject public org.springframework.http.ResponseEntity<de.digitalcollections.model.api.view.BreadcrumbNavigation> getBreadcrumb(@ApiPathParam(description="UUID of the subtopic, e.g. <tt>6119d8e9-9c92-4091-8dcb-bc4053385406</tt>") @PathVariable("uuid") java.util.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) java.util.Locale pLocale) -
getTopic
@ApiMethod(description="Get the topic of a subtopic") @GetMapping(value={"/latest/subtopics/{uuid}/topic","/v3/subtopics/{uuid}/topic"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.Topic getTopic(@ApiPathParam(description="UUID of the subtopic, e.g. <tt>6119d8e9-9c92-4091-8dcb-bc4053385406</tt>") @PathVariable("uuid") java.util.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) java.util.Locale pLocale)
-