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.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> findAll​(int pageNumber, int pageSize, List<de.digitalcollections.model.paging.Order> sortBy, String searchTerm)  
      de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> findAllTop​(int pageNumber, int pageSize, List<de.digitalcollections.model.paging.Order> sortBy, String searchTerm)  
      org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.Topic> findById​(UUID uuid, Locale pLocale)  
      org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.entity.Topic> findByRefId​(long refId)  
      org.springframework.http.ResponseEntity<de.digitalcollections.model.view.BreadcrumbNavigation> getBreadcrumb​(UUID uuid, Locale pLocale)  
      List<de.digitalcollections.model.identifiable.entity.Entity> getEntities​(UUID uuid)  
      de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity> getEntities​(UUID topicUuid, int pageNumber, int pageSize, de.digitalcollections.model.filter.FilterCriterion<String> entityType)  
      de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource> getFileResources​(UUID uuid, int pageNumber, int pageSize)  
      List<Locale> getLanguagesOfEntities​(UUID uuid)  
      List<Locale> getLanguagesOfFileResources​(UUID uuid)  
      de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> getSubtopics​(UUID topicUuid, int pageNumber, int pageSize, List<de.digitalcollections.model.paging.Order> sortBy, String searchTerm)  
      List<Locale> getTopTopicsLanguages()  
      de.digitalcollections.model.identifiable.entity.Topic save​(de.digitalcollections.model.identifiable.entity.Topic topic, org.springframework.validation.BindingResult errors)  
      List<de.digitalcollections.model.identifiable.entity.Entity> saveEntities​(UUID uuid, List<de.digitalcollections.model.identifiable.entity.Entity> entities)  
      List<de.digitalcollections.model.identifiable.resource.FileResource> saveFileresources​(UUID uuid, List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources)  
      de.digitalcollections.model.identifiable.entity.Topic saveWithParentTopic​(UUID parentTopicUuid, de.digitalcollections.model.identifiable.entity.Topic topic, org.springframework.validation.BindingResult errors)  
      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={"/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={"/v5/topics/count","/v2/topics/count","/latest/topics/count"},
                    produces="application/json")
        public long count()
      • findAll

        @GetMapping(value={"/v5/topics","/v2/topics","/latest/topics"},
                    produces="application/json")
        public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> findAll​(@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.paging.Order> sortBy,
                                                                                                                              @RequestParam(name="searchTerm",required=false)
                                                                                                                              String searchTerm)
      • findAllTop

        @GetMapping(value={"/v5/topics/top","/v3/topics/top","/latest/topics/top"},
                    produces="application/json")
        public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> findAllTop​(@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.paging.Order> sortBy,
                                                                                                                                 @RequestParam(name="searchTerm",required=false)
                                                                                                                                 String searchTerm)
      • findById

        @GetMapping(value={"/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> findById​(@PathVariable("uuid")
                                                                                                                       UUID uuid,
                                                                                                                       @RequestParam(name="pLocale",required=false)
                                                                                                                       Locale pLocale)
                                                                                                                throws IdentifiableServiceException
        Throws:
        IdentifiableServiceException
      • findByRefId

        @GetMapping(value={"/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> findByRefId​(@PathVariable
                                                                                                                          long refId)
                                                                                                                   throws IdentifiableServiceException
        Throws:
        IdentifiableServiceException
      • getSubtopics

        @GetMapping(value="/v5/topics/{uuid}/subtopics",
                    produces="application/json")
        public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> getSubtopics​(@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.paging.Order> sortBy,
                                                                                                                                   @RequestParam(name="searchTerm",required=false)
                                                                                                                                   String searchTerm)
      • getBreadcrumb

        @GetMapping(value={"/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> getBreadcrumb​(@PathVariable("uuid")
                                                                                                                            UUID uuid,
                                                                                                                            @RequestParam(name="pLocale",required=false)
                                                                                                                            Locale pLocale)
      • getEntities

        @GetMapping(value={"/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)
      • getEntities

        @GetMapping(value={"/v5/topics/{uuid}/entities","/v3/topics/{uuid}/entities","/latest/topics/{uuid}/entities"},
                    produces="application/json")
        public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity> getEntities​(@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.filter.FilterCriterion<String> entityType)
      • getFileResources

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

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

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

        @GetMapping(value={"/v5/topics/top/languages","/v3/topics/top/languages","/latest/topics/top/languages"},
                    produces="application/json")
        public List<Locale> getTopTopicsLanguages()
      • save

        @PostMapping(value={"/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 IdentifiableServiceException
        Throws:
        IdentifiableServiceException
      • saveEntities

        @PostMapping(value={"/v5/topics/{uuid}/entities","/v3/topics/{uuid}/entities","/latest/topics/{uuid}/entities"},
                     produces="application/json")
        public List<de.digitalcollections.model.identifiable.entity.Entity> saveEntities​(@PathVariable
                                                                                         UUID uuid,
                                                                                         @RequestBody
                                                                                         List<de.digitalcollections.model.identifiable.entity.Entity> entities)
      • saveFileresources

        @PostMapping(value={"/v5/topics/{uuid}/fileresources","/v3/topics/{uuid}/fileresources","/latest/topics/{uuid}/fileresources"},
                     produces="application/json")
        public List<de.digitalcollections.model.identifiable.resource.FileResource> saveFileresources​(@PathVariable
                                                                                                      UUID uuid,
                                                                                                      @RequestBody
                                                                                                      List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources)
      • saveWithParentTopic

        @PostMapping(value={"/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
        Throws:
        IdentifiableServiceException
      • update

        @PutMapping(value={"/v5/topics/{uuid}","/v2/topics/{uuid}","/latest/topics/{uuid}"},
                    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 IdentifiableServiceException
        Throws:
        IdentifiableServiceException