Class TopicsController
- java.lang.Object
-
- de.digitalcollections.commons.springmvc.controller.AbstractController
-
- de.digitalcollections.cudami.admin.controller.identifiable.entity.TopicsController
-
@Controller public class TopicsController extends de.digitalcollections.commons.springmvc.controller.AbstractControllerController for topics management pages.
-
-
Constructor Summary
Constructors Constructor Description TopicsController(LanguageSortingHelper languageSortingHelper, CudamiClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description de.digitalcollections.model.identifiable.entity.Topiccreate()Stringcreate(org.springframework.ui.Model model, String parentType, String parentUuid)Stringedit(UUID uuid, Locale activeLanguage, org.springframework.ui.Model model)de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic>findAllTop(int pageNumber, int pageSize, String searchTerm)de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic>findSubtopic(UUID uuid, int pageNumber, int pageSize, String searchTerm)de.digitalcollections.model.identifiable.entity.Topicget(UUID uuid)de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity>getAttachedEntites(UUID uuid, int pageNumber, int pageSize)de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource>getRelatedFileResources(UUID uuid, int pageNumber, int pageSize)Stringlist(org.springframework.ui.Model model)protected Stringmodule()org.springframework.http.ResponseEntitysave(de.digitalcollections.model.identifiable.entity.Topic topic, UUID parentUuid)org.springframework.http.ResponseEntityupdate(UUID uuid, de.digitalcollections.model.identifiable.entity.Topic topic)Stringview(UUID uuid, org.springframework.ui.Model model)StringviewByRefId(long refId, org.springframework.ui.Model model)
-
-
-
Constructor Detail
-
TopicsController
public TopicsController(LanguageSortingHelper languageSortingHelper, CudamiClient client)
-
-
Method Detail
-
module
@ModelAttribute("menu") protected String module()
-
create
@GetMapping({"/subtopics/new","/topics/new"}) public String create(org.springframework.ui.Model model, @RequestParam(name="parentType",required=false) String parentType, @RequestParam(name="parentUuid",required=false) String parentUuid) throws Exception- Throws:
Exception
-
create
@GetMapping("/api/topics/new") @ResponseBody public de.digitalcollections.model.identifiable.entity.Topic create()
-
edit
@GetMapping({"/subtopics/{uuid}/edit","/topics/{uuid}/edit"}) public String edit(@PathVariable UUID uuid, @RequestParam(name="activeLanguage",required=false) Locale activeLanguage, org.springframework.ui.Model model) throws HttpException- Throws:
HttpException
-
findAllTop
@GetMapping("/api/topics") @ResponseBody 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="25") int pageSize, @RequestParam(name="searchTerm",required=false) String searchTerm) throws HttpException- Throws:
HttpException
-
findSubtopic
@GetMapping("/api/topics/{uuid}/subtopics") @ResponseBody public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> findSubtopic(@PathVariable UUID uuid, @RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="25") int pageSize, @RequestParam(name="searchTerm",required=false) String searchTerm) throws HttpException- Throws:
HttpException
-
get
@GetMapping("/api/topics/{uuid}") @ResponseBody public de.digitalcollections.model.identifiable.entity.Topic get(@PathVariable UUID uuid) throws HttpException- Throws:
HttpException
-
getAttachedEntites
@GetMapping("/api/topics/{uuid}/entities") @ResponseBody public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity> getAttachedEntites(@PathVariable UUID uuid, @RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="25") int pageSize) throws HttpException- Throws:
HttpException
-
getRelatedFileResources
@GetMapping("/api/topics/{uuid}/fileresources") @ResponseBody public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource> getRelatedFileResources(@PathVariable UUID uuid, @RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="25") int pageSize) throws HttpException- Throws:
HttpException
-
list
@GetMapping("/topics") public String list(org.springframework.ui.Model model) throws HttpException- Throws:
HttpException
-
save
@PostMapping("/api/topics") public org.springframework.http.ResponseEntity save(@RequestBody de.digitalcollections.model.identifiable.entity.Topic topic, @RequestParam(name="parentUuid",required=false) UUID parentUuid)
-
update
@PutMapping("/api/topics/{uuid}") public org.springframework.http.ResponseEntity update(@PathVariable UUID uuid, @RequestBody de.digitalcollections.model.identifiable.entity.Topic topic)
-
viewByRefId
@GetMapping({"/subtopics/{refId:[0-9]+}","/topics/{refId:[0-9]+}"}) public String viewByRefId(@PathVariable long refId, org.springframework.ui.Model model) throws HttpException- Throws:
HttpException
-
view
@GetMapping({"/subtopics/{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}}","/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}}"}) public String view(@PathVariable UUID uuid, org.springframework.ui.Model model) throws HttpException- Throws:
HttpException
-
-