Class TopicController


  • @RestController
    @Api(description="The topic controller",
         name="Topic controller")
    public class TopicController
    extends Object
    • Constructor Summary

      Constructors 
      Constructor Description
      TopicController()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long count()  
      de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.Topic> findAll​(int pageNumber, int pageSize, List<de.digitalcollections.model.api.paging.Order> sortBy)  
      de.digitalcollections.model.api.identifiable.entity.Topic findById​(UUID uuid)  
      de.digitalcollections.model.api.identifiable.entity.Topic save​(de.digitalcollections.model.api.identifiable.entity.Topic topic, org.springframework.validation.BindingResult errors)  
      de.digitalcollections.model.api.identifiable.entity.Topic update​(UUID uuid, de.digitalcollections.model.api.identifiable.entity.Topic topic, org.springframework.validation.BindingResult errors)  
    • Constructor Detail

      • TopicController

        public TopicController()
    • Method Detail

      • findAll

        @ApiMethod(description="Get all topics")
        @GetMapping(value={"/latest/topics","/v2/topics"},
                    produces="application/json")
        @ApiResponseObject
        public de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.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.api.paging.Order> sortBy)
      • findById

        @ApiMethod(description="Get topic by uuid")
        @GetMapping(value={"/latest/topics/{uuid}","/v2/topics/{uuid}"},
                    produces="application/json")
        @ApiResponseObject
        public de.digitalcollections.model.api.identifiable.entity.Topic findById​(@PathVariable
                                                                                  UUID uuid)
      • save

        @ApiMethod(description="Save a newly created topic")
        @PostMapping(value={"/latest/topics","/v2/topics"},
                     produces="application/json")
        @ApiResponseObject
        public de.digitalcollections.model.api.identifiable.entity.Topic save​(@RequestBody
                                                                              de.digitalcollections.model.api.identifiable.entity.Topic topic,
                                                                              org.springframework.validation.BindingResult errors)
                                                                       throws IdentifiableServiceException
        Throws:
        IdentifiableServiceException
      • update

        @ApiMethod(description="Update a topic")
        @PutMapping(value={"/latest/topics/{uuid}","/v2/topics/{uuid}"},
                    produces="application/json")
        @ApiResponseObject
        public de.digitalcollections.model.api.identifiable.entity.Topic update​(@PathVariable
                                                                                UUID uuid,
                                                                                @RequestBody
                                                                                de.digitalcollections.model.api.identifiable.entity.Topic topic,
                                                                                org.springframework.validation.BindingResult errors)
                                                                         throws IdentifiableServiceException
        Throws:
        IdentifiableServiceException
      • count

        @ApiMethod(description="Get count of topics")
        @GetMapping(value={"/latest/topics/count","/v2/topics/count"},
                    produces="application/json")
        @ApiResponseObject
        public long count()