Class SubtopicController


  • @RestController
    @Api(description="The subtopic controller",
         name="Subtopic controller")
    public class SubtopicController
    extends Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      de.digitalcollections.model.api.identifiable.entity.parts.Subtopic addSubtopicToParentSubtopic​(UUID parentSubtopicUuid, UUID subtopicUuid)  
      de.digitalcollections.model.api.identifiable.entity.parts.Subtopic addSubtopicToParentTopic​(UUID parentTopicUuid, UUID subtopicUuid)  
      long count()  
      de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic> findAll​(int pageNumber, int pageSize, 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​(UUID uuid, Locale pLocale)  
      List<de.digitalcollections.model.api.identifiable.entity.Entity> getEntities​(UUID uuid)  
      List<de.digitalcollections.model.api.identifiable.resource.FileResource> getFileResources​(UUID uuid)  
      org.springframework.http.ResponseEntity<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic> getSubtopic​(UUID uuid, Locale pLocale)  
      de.digitalcollections.model.api.identifiable.entity.Topic getTopic​(UUID uuid, Locale pLocale)  
      List<de.digitalcollections.model.api.identifiable.entity.Entity> saveEntities​(UUID uuid, List<de.digitalcollections.model.api.identifiable.entity.Entity> entities)  
      List<de.digitalcollections.model.api.identifiable.resource.FileResource> saveFileresources​(UUID uuid, List<de.digitalcollections.model.api.identifiable.resource.FileResource> fileResources)  
      de.digitalcollections.model.api.identifiable.entity.parts.Subtopic saveWithParentSubtopic​(UUID parentSubtopicUuid, de.digitalcollections.model.api.identifiable.entity.parts.Subtopic subtopic)  
      de.digitalcollections.model.api.identifiable.entity.parts.Subtopic saveWithParentTopic​(UUID parentTopicUuid, de.digitalcollections.model.api.identifiable.entity.parts.Subtopic subtopic, org.springframework.validation.BindingResult errors)  
      de.digitalcollections.model.api.identifiable.entity.parts.Subtopic update​(UUID uuid, de.digitalcollections.model.api.identifiable.entity.parts.Subtopic subtopic, org.springframework.validation.BindingResult errors)  
    • Constructor Detail

      • SubtopicController

        public SubtopicController()
    • Method Detail

      • 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")
                                                                                                                                               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")
                                                                                                                                       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)
                                                                                                                                       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
                                                                                                      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
                                                                                                           UUID parentTopicUuid,
                                                                                                           @ApiPathParam(name="subtopicUuid",description="The uuid of the subtopic") @PathVariable
                                                                                                           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
                                                                                                         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
                                                                                                              UUID parentSubtopicUuid,
                                                                                                              @ApiPathParam(name="subtopicUuid",description="The uuid of the subtopic") @PathVariable
                                                                                                              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
                                                                                         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 List<de.digitalcollections.model.api.identifiable.entity.Entity> getEntities​(@ApiPathParam(name="uuid",description="The uuid of the subtopic") @PathVariable
                                                                                            UUID uuid)
      • saveEntities

        @ApiMethod(description="Save entities of subtopic")
        @PostMapping(value={"/latest/subtopics/{uuid}/entities","/v2/subtopics/{uuid}/entities"},
                     produces="application/json")
        @ApiResponseObject
        public List<de.digitalcollections.model.api.identifiable.entity.Entity> saveEntities​(@PathVariable
                                                                                             UUID uuid,
                                                                                             @RequestBody
                                                                                             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 List<de.digitalcollections.model.api.identifiable.resource.FileResource> getFileResources​(@PathVariable
                                                                                                         UUID uuid)
      • saveFileresources

        @ApiMethod(description="Save fileresources of subtopic")
        @PostMapping(value={"/latest/subtopics/{uuid}/fileresources","/v2/subtopics/{uuid}/fileresources"},
                     produces="application/json")
        @ApiResponseObject
        public List<de.digitalcollections.model.api.identifiable.resource.FileResource> saveFileresources​(@PathVariable
                                                                                                          UUID uuid,
                                                                                                          @RequestBody
                                                                                                          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")
                                                                                                                                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)
                                                                                                                                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")
                                                                                  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)
                                                                                  Locale pLocale)