Class TopicController
java.lang.Object
de.digitalcollections.cudami.server.controller.AbstractPagingAndSortingController
de.digitalcollections.cudami.server.controller.AbstractUniqueObjectController<T>
de.digitalcollections.cudami.server.controller.identifiable.AbstractIdentifiableController<E>
de.digitalcollections.cudami.server.controller.AbstractEntityController<de.digitalcollections.model.identifiable.entity.Topic>
de.digitalcollections.cudami.server.controller.identifiable.entity.TopicController
@RestController
public class TopicController
extends AbstractEntityController<de.digitalcollections.model.identifiable.entity.Topic>
-
Field Summary
Fields inherited from class de.digitalcollections.cudami.server.controller.AbstractUniqueObjectController
LOGGER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Boolean>longcount()de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic>find(int pageNumber, int pageSize, List<de.digitalcollections.model.list.sorting.Order> sortBy, List<de.digitalcollections.model.list.filtering.FilterCriterion> filterCriteria, de.digitalcollections.model.list.filtering.Filtering filtering) de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity>findEntities(UUID topicUuid, int pageNumber, int pageSize, List<de.digitalcollections.model.list.sorting.Order> sortBy, List<de.digitalcollections.model.list.filtering.FilterCriterion> filterCriteria, de.digitalcollections.model.list.filtering.Filtering filtering) de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource>findFileResources(UUID topicUuid, int pageNumber, int pageSize, List<de.digitalcollections.model.list.sorting.Order> sortBy, List<de.digitalcollections.model.list.filtering.FilterCriterion> filterCriteria, de.digitalcollections.model.list.filtering.Filtering filtering) de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic>findSubtopics(UUID topicUuid, int pageNumber, int pageSize, List<de.digitalcollections.model.list.sorting.Order> sortBy, List<de.digitalcollections.model.list.filtering.FilterCriterion> filterCriteria, de.digitalcollections.model.list.filtering.Filtering filtering) de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic>findTopTopics(int pageNumber, int pageSize, List<de.digitalcollections.model.list.sorting.Order> sortBy, List<de.digitalcollections.model.list.filtering.FilterCriterion> filterCriteria, de.digitalcollections.model.list.filtering.Filtering filtering) org.springframework.http.ResponseEntity<de.digitalcollections.model.view.BreadcrumbNavigation>getBreadcrumbNavigation(UUID uuid, Locale pLocale) org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.Topic>getByRefId(long refId) org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.Topic>List<de.digitalcollections.model.identifiable.entity.Topic>getChildren(UUID uuid) getLanguagesOfEntities(UUID uuid) de.digitalcollections.model.identifiable.entity.Topicprotected EntityService<de.digitalcollections.model.identifiable.entity.Topic>org.springframework.http.ResponseEntity<String>getSubtopics(UUID uuid) List<de.digitalcollections.model.identifiable.entity.Topic>getTopicsOfEntity(UUID uuid) List<de.digitalcollections.model.identifiable.entity.Topic>getTopicsOfFileResource(UUID uuid) org.springframework.http.ResponseEntity<Boolean>removeChild(UUID parentTopicUuid, UUID subtopicUuid) de.digitalcollections.model.identifiable.entity.Topicsave(de.digitalcollections.model.identifiable.entity.Topic topic, org.springframework.validation.BindingResult errors) de.digitalcollections.model.identifiable.entity.TopicsaveWithParentTopic(UUID parentTopicUuid, de.digitalcollections.model.identifiable.entity.Topic topic, org.springframework.validation.BindingResult errors) List<de.digitalcollections.model.identifiable.entity.Entity>setEntities(UUID uuid, List<de.digitalcollections.model.identifiable.entity.Entity> entities) List<de.digitalcollections.model.identifiable.resource.FileResource>setFileresources(UUID uuid, List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources) de.digitalcollections.model.identifiable.entity.Topicupdate(UUID uuid, de.digitalcollections.model.identifiable.entity.Topic topic, org.springframework.validation.BindingResult errors) Methods inherited from class de.digitalcollections.cudami.server.controller.identifiable.AbstractIdentifiableController
extractNamespaceAndId, getByIdentifier, getLanguagesMethods inherited from class de.digitalcollections.cudami.server.controller.AbstractUniqueObjectController
buildExampleWithUuid, delete, delete, getByUuid, getByUuidAndLocaleMethods inherited from class de.digitalcollections.cudami.server.controller.AbstractPagingAndSortingController
createPageRequest, getFieldType, mergeFilters
-
Constructor Details
-
TopicController
-
-
Method Details
-
addChild
@PostMapping(value={"/v6/topics/{parentTopicUuid}/subtopic/{subtopicUuid}","/v5/topics/{parentTopicUuid}/subtopic/{subtopicUuid}","/v3/topics/{parentTopicUuid}/subtopic/{subtopicUuid}","/latest/topics/{parentTopicUuid}/subtopic/{subtopicUuid}"}, produces="application/json") public org.springframework.http.ResponseEntity<Boolean> addChild(@PathVariable UUID parentTopicUuid, @PathVariable UUID subtopicUuid) throws ServiceException - Throws:
ServiceException
-
count
@GetMapping(value={"/v6/topics/count","/v5/topics/count","/v2/topics/count","/latest/topics/count"}, produces="application/json") public long count() throws ServiceException- Overrides:
countin classAbstractUniqueObjectController<de.digitalcollections.model.identifiable.entity.Topic>- Throws:
ServiceException
-
find
@GetMapping(value="/v6/topics", produces="application/json") public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> find(@RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="25") int pageSize, @RequestParam(name="sortBy",required=false) List<de.digitalcollections.model.list.sorting.Order> sortBy, @RequestParam(name="filter",required=false) List<de.digitalcollections.model.list.filtering.FilterCriterion> filterCriteria, @RequestParam(name="filtering",required=false) de.digitalcollections.model.list.filtering.Filtering filtering) throws ServiceException - Overrides:
findin classAbstractUniqueObjectController<de.digitalcollections.model.identifiable.entity.Topic>- Throws:
ServiceException
-
findEntities
@GetMapping(value="/v6/topics/{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}$}/entities", produces="application/json") public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity> findEntities(@PathVariable("uuid") UUID topicUuid, @RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="25") int pageSize, @RequestParam(name="sortBy",required=false) List<de.digitalcollections.model.list.sorting.Order> sortBy, @RequestParam(name="filter",required=false) List<de.digitalcollections.model.list.filtering.FilterCriterion> filterCriteria, @RequestParam(name="filtering",required=false) de.digitalcollections.model.list.filtering.Filtering filtering) throws ServiceException - Throws:
ServiceException
-
findFileResources
@GetMapping(value="/v6/topics/{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}$}/fileresources", produces="application/json") public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource> findFileResources(@PathVariable("uuid") UUID topicUuid, @RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="25") int pageSize, @RequestParam(name="sortBy",required=false) List<de.digitalcollections.model.list.sorting.Order> sortBy, @RequestParam(name="filter",required=false) List<de.digitalcollections.model.list.filtering.FilterCriterion> filterCriteria, @RequestParam(name="filtering",required=false) de.digitalcollections.model.list.filtering.Filtering filtering) throws ServiceException - Throws:
ServiceException
-
findSubtopics
@GetMapping(value="/v6/topics/{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}$}/subtopics", produces="application/json") public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> findSubtopics(@PathVariable("uuid") UUID topicUuid, @RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="25") int pageSize, @RequestParam(name="sortBy",required=false) List<de.digitalcollections.model.list.sorting.Order> sortBy, @RequestParam(name="filter",required=false) List<de.digitalcollections.model.list.filtering.FilterCriterion> filterCriteria, @RequestParam(name="filtering",required=false) de.digitalcollections.model.list.filtering.Filtering filtering) throws ServiceException - Throws:
ServiceException
-
findTopTopics
@GetMapping(value="/v6/topics/top", produces="application/json") public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> findTopTopics(@RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="5") int pageSize, @RequestParam(name="sortBy",required=false) List<de.digitalcollections.model.list.sorting.Order> sortBy, @RequestParam(name="filter",required=false) List<de.digitalcollections.model.list.filtering.FilterCriterion> filterCriteria, @RequestParam(name="filtering",required=false) de.digitalcollections.model.list.filtering.Filtering filtering) throws ServiceException - Throws:
ServiceException
-
getByRefId
@GetMapping(value={"/v6/topics/{refId:[0-9]+}","/v5/topics/{refId:[0-9]+}","/v3/topics/{refId:[0-9]+}","/latest/topics/{refId:[0-9]+}"}, produces="application/json") public org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.Topic> getByRefId(@PathVariable long refId) throws ServiceException - Overrides:
getByRefIdin classAbstractEntityController<de.digitalcollections.model.identifiable.entity.Topic>- Throws:
ServiceException
-
getByUuid
@GetMapping(value={"/v6/topics/{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}$}","/v5/topics/{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}$}","/v2/topics/{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}$}","/latest/topics/{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}$}"}, produces="application/json") public org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.Topic> getByUuid(@PathVariable("uuid") UUID uuid, @RequestParam(name="pLocale",required=false) Locale pLocale) throws ServiceException - Throws:
ServiceException
-
getChildren
@GetMapping(value={"/v6/topics/{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}$}/children","/v5/topics/{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}$}/children","/v3/topics/{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}$}/children","/latest/topics/{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}$}/children"}, produces="application/json") public List<de.digitalcollections.model.identifiable.entity.Topic> getChildren(@PathVariable UUID uuid) throws ServiceException - Throws:
ServiceException
-
getLanguagesOfEntities
@GetMapping(value={"/v6/topics/{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}$}/entities/languages","/v5/topics/{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}$}/entities/languages"}, produces="application/json") public List<Locale> getLanguagesOfEntities(@PathVariable UUID uuid) throws ServiceException - Throws:
ServiceException
-
getLanguagesOfFileResources
@GetMapping(value={"/v6/topics/{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}$}/fileresources/languages","/v5/topics/{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}$}/fileresources/languages"}, produces="application/json") public List<Locale> getLanguagesOfFileResources(@PathVariable UUID uuid) throws ServiceException - Throws:
ServiceException
-
getParent
@GetMapping(value={"/v6/topics/{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}$}/parent","/v5/topics/{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}$}/parent","/v3/topics/{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}$}/parent","/latest/topics/{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}$}/parent"}, produces="application/json") public de.digitalcollections.model.identifiable.entity.Topic getParent(@PathVariable UUID uuid) throws ServiceException - Throws:
ServiceException
-
getService
- Specified by:
getServicein classAbstractEntityController<de.digitalcollections.model.identifiable.entity.Topic>
-
getSubtopics
-
getTopicsOfEntity
@GetMapping(value={"/v6/topics/entity/{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}$}","/v5/topics/entity/{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}$}","/v3/topics/entity/{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}$}","/latest/topics/entity/{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}$}"}, produces="application/json") public List<de.digitalcollections.model.identifiable.entity.Topic> getTopicsOfEntity(@PathVariable UUID uuid) throws ServiceException - Throws:
ServiceException
-
getTopicsOfFileResource
@GetMapping(value={"/v6/topics/fileresource/{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}$}","/v5/topics/fileresource/{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}$}","/v3/topics/fileresource/{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}$}","/latest/topics/fileresource/{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}$}"}, produces="application/json") public List<de.digitalcollections.model.identifiable.entity.Topic> getTopicsOfFileResource(@PathVariable UUID uuid) throws ServiceException - Throws:
ServiceException
-
getTopTopicsLanguages
@GetMapping(value={"/v6/topics/top/languages","/v5/topics/top/languages","/v3/topics/top/languages","/latest/topics/top/languages"}, produces="application/json") public List<Locale> getTopTopicsLanguages() throws ServiceException- Throws:
ServiceException
-
removeChild
@DeleteMapping(value={"/v6/topics/{parentTopicUuid}/children/{subtopicUuid}","/v5/topics/{parentTopicUuid}/children/{subtopicUuid}","/v3/topics/{parentTopicUuid}/children/{subtopicUuid}","/latest/topics/{parentTopicUuid}/children/{subtopicUuid}"}, produces="application/json") public org.springframework.http.ResponseEntity<Boolean> removeChild(@PathVariable UUID parentTopicUuid, @PathVariable UUID subtopicUuid) throws ServiceException - Throws:
ServiceException
-
save
@PostMapping(value={"/v6/topics","/v5/topics","/v2/topics","/latest/topics"}, produces="application/json") public de.digitalcollections.model.identifiable.entity.Topic save(@RequestBody de.digitalcollections.model.identifiable.entity.Topic topic, org.springframework.validation.BindingResult errors) throws ServiceException, ValidationException - Overrides:
savein classAbstractUniqueObjectController<de.digitalcollections.model.identifiable.entity.Topic>- Throws:
ServiceExceptionValidationException
-
saveWithParentTopic
@PostMapping(value={"/v6/topics/{parentTopicUuid}/subtopic","/v5/topics/{parentTopicUuid}/subtopic","/v3/topics/{parentTopicUuid}/subtopic","/latest/topics/{parentTopicUuid}/subtopic"}, produces="application/json") public de.digitalcollections.model.identifiable.entity.Topic saveWithParentTopic(@PathVariable UUID parentTopicUuid, @RequestBody de.digitalcollections.model.identifiable.entity.Topic topic, org.springframework.validation.BindingResult errors) throws ServiceException, ValidationException - Throws:
ServiceExceptionValidationException
-
setEntities
@PostMapping(value={"/v6/topics/{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}$}/entities","/v5/topics/{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}$}/entities","/v3/topics/{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}$}/entities","/latest/topics/{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}$}/entities"}, produces="application/json") public List<de.digitalcollections.model.identifiable.entity.Entity> setEntities(@PathVariable UUID uuid, @RequestBody List<de.digitalcollections.model.identifiable.entity.Entity> entities) throws ServiceException - Throws:
ServiceException
-
setFileresources
@PostMapping(value={"/v6/topics/{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}$}/fileresources","/v5/topics/{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}$}/fileresources","/v3/topics/{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}$}/fileresources","/latest/topics/{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}$}/fileresources"}, produces="application/json") public List<de.digitalcollections.model.identifiable.resource.FileResource> setFileresources(@PathVariable UUID uuid, @RequestBody List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources) throws ServiceException - Throws:
ServiceException
-
update
@PutMapping(value={"/v6/topics/{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}$}","/v5/topics/{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}$}","/v2/topics/{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}$}","/latest/topics/{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}$}"}, produces="application/json") public de.digitalcollections.model.identifiable.entity.Topic update(@PathVariable UUID uuid, @RequestBody de.digitalcollections.model.identifiable.entity.Topic topic, org.springframework.validation.BindingResult errors) throws ServiceException, ValidationException - Overrides:
updatein classAbstractUniqueObjectController<de.digitalcollections.model.identifiable.entity.Topic>- Throws:
ServiceExceptionValidationException
-