Class TopicController


  • @RestController
    public class TopicController
    extends Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.springframework.http.ResponseEntity<Boolean> addChild​(UUID parentTopicUuid, UUID subtopicUuid)  
      long count()  
      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, String searchTerm)  
      de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity> findEntities​(UUID topicUuid, int pageNumber, int pageSize, de.digitalcollections.model.list.filtering.FilterCriterion<String> entityType)  
      de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource> findFileResources​(UUID uuid, int pageNumber, int pageSize)  
      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, String searchTerm)  
      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, String searchTerm)  
      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> getByUuid​(UUID uuid, Locale pLocale)  
      List<de.digitalcollections.model.identifiable.entity.Entity> getEntities​(UUID uuid)  
      List<Locale> getLanguagesOfEntities​(UUID uuid)  
      List<Locale> getLanguagesOfFileResources​(UUID uuid)  
      List<Locale> getTopTopicsLanguages()  
      de.digitalcollections.model.identifiable.entity.Topic save​(de.digitalcollections.model.identifiable.entity.Topic topic, org.springframework.validation.BindingResult errors)  
      de.digitalcollections.model.identifiable.entity.Topic saveWithParentTopic​(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.Topic update​(UUID uuid, de.digitalcollections.model.identifiable.entity.Topic topic, org.springframework.validation.BindingResult errors)  
    • Method Detail

      • 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 IdentifiableServiceException
        Throws:
        IdentifiableServiceException
      • count

        @GetMapping(value={"/v6/topics/count","/v5/topics/count","/v2/topics/count","/latest/topics/count"},
                    produces="application/json")
        public long count()
      • 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="searchTerm",required=false)
                                                                                                                                String searchTerm)
      • findEntities

        @GetMapping(value="/v6/topics/{uuid}/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="entityType",required=false)
                                                                                                                                         de.digitalcollections.model.list.filtering.FilterCriterion<String> entityType)
      • findFileResources

        @GetMapping(value="/v6/topics/{uuid}/fileresources",
                    produces="application/json")
        public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource> findFileResources​(@PathVariable
                                                                                                                                                      UUID uuid,
                                                                                                                                                      @RequestParam(name="pageNumber",required=false,defaultValue="0")
                                                                                                                                                      int pageNumber,
                                                                                                                                                      @RequestParam(name="pageSize",required=false,defaultValue="25")
                                                                                                                                                      int pageSize)
      • findSubtopics

        @GetMapping(value="/v6/topics/{uuid}/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="searchTerm",required=false)
                                                                                                                                         String searchTerm)
      • 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="searchTerm",required=false)
                                                                                                                                         String searchTerm)
      • getBreadcrumbNavigation

        @GetMapping(value={"/v6/topics/{uuid}/breadcrumb","/v5/topics/{uuid}/breadcrumb","/v3/topics/{uuid}/breadcrumb","/latest/topics/{uuid}/breadcrumb"},
                    produces="application/json")
        public org.springframework.http.ResponseEntity<de.digitalcollections.model.view.BreadcrumbNavigation> getBreadcrumbNavigation​(@PathVariable("uuid")
                                                                                                                                      UUID uuid,
                                                                                                                                      @RequestParam(name="pLocale",required=false)
                                                                                                                                      Locale pLocale)
      • 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 IdentifiableServiceException
        Throws:
        IdentifiableServiceException
      • 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 IdentifiableServiceException
        Throws:
        IdentifiableServiceException
      • getEntities

        @GetMapping(value={"/v6/topics/{uuid}/entities/all","/v5/topics/{uuid}/entities/all","/v3/topics/{uuid}/entities/all","/latest/topics/{uuid}/entities/all"},
                    produces="application/json")
        public List<de.digitalcollections.model.identifiable.entity.Entity> getEntities​(@PathVariable
                                                                                        UUID uuid)
      • getLanguagesOfEntities

        @GetMapping(value={"/v6/topics/{uuid}/entities/languages","/v5/topics/{uuid}/entities/languages"},
                    produces="application/json")
        public List<Locale> getLanguagesOfEntities​(@PathVariable
                                                   UUID uuid)
      • getLanguagesOfFileResources

        @GetMapping(value={"/v6/topics/{uuid}/fileresources/languages","/v5/topics/{uuid}/fileresources/languages"},
                    produces="application/json")
        public List<Locale> getLanguagesOfFileResources​(@PathVariable
                                                        UUID uuid)
      • 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()
      • 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 IdentifiableServiceException,
                                                                                         ValidationException
        Throws:
        IdentifiableServiceException
        ValidationException
      • setEntities

        @PostMapping(value={"/v6/topics/{uuid}/entities","/v5/topics/{uuid}/entities","/v3/topics/{uuid}/entities","/latest/topics/{uuid}/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)
      • setFileresources

        @PostMapping(value={"/v6/topics/{uuid}/fileresources","/v5/topics/{uuid}/fileresources","/v3/topics/{uuid}/fileresources","/latest/topics/{uuid}/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)