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.AbstractController
Controller for topics management pages.
  • Constructor Summary

    Constructors 
    Constructor Description
    TopicsController​(LanguageSortingHelper languageSortingHelper, CudamiClient client)  
  • Method Summary

    Modifier and Type Method Description
    de.digitalcollections.model.identifiable.entity.Topic create()  
    java.lang.String create​(org.springframework.ui.Model model, java.lang.String parentType, java.lang.String parentUuid)  
    java.lang.String edit​(java.util.UUID uuid, java.util.Locale activeLanguage, org.springframework.ui.Model model)  
    de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> findAllTop​(int pageNumber, int pageSize, java.lang.String searchTerm)  
    de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> findSubtopic​(java.util.UUID uuid, int pageNumber, int pageSize, java.lang.String searchTerm)  
    de.digitalcollections.model.identifiable.entity.Topic get​(java.util.UUID uuid)  
    de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity> getAttachedEntites​(java.util.UUID uuid, int pageNumber, int pageSize)  
    de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource> getRelatedFileResources​(java.util.UUID uuid, int pageNumber, int pageSize)  
    java.lang.String list​(org.springframework.ui.Model model)  
    protected java.lang.String module()  
    org.springframework.http.ResponseEntity save​(de.digitalcollections.model.identifiable.entity.Topic topic, java.util.UUID parentUuid)  
    org.springframework.http.ResponseEntity update​(java.util.UUID uuid, de.digitalcollections.model.identifiable.entity.Topic topic)  
    java.lang.String view​(java.util.UUID uuid, org.springframework.ui.Model model)  
    java.lang.String viewByRefId​(long refId, org.springframework.ui.Model model)  

    Methods inherited from class de.digitalcollections.commons.springmvc.controller.AbstractController

    verifyBinding

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • module

      @ModelAttribute("menu") protected java.lang.String module()
    • create

      @GetMapping({"/subtopics/new","/topics/new"}) public java.lang.String create​(org.springframework.ui.Model model, @RequestParam(name="parentType",required=false) java.lang.String parentType, @RequestParam(name="parentUuid",required=false) java.lang.String parentUuid) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • create

      @GetMapping("/api/topics/new") @ResponseBody public de.digitalcollections.model.identifiable.entity.Topic create()
    • edit

      @GetMapping({"/subtopics/{uuid}/edit","/topics/{uuid}/edit"}) public java.lang.String edit​(@PathVariable java.util.UUID uuid, @RequestParam(name="activeLanguage",required=false) java.util.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) java.lang.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 java.util.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) java.lang.String searchTerm) throws HttpException
      Throws:
      HttpException
    • get

      @GetMapping("/api/topics/{uuid}") @ResponseBody public de.digitalcollections.model.identifiable.entity.Topic get​(@PathVariable java.util.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 java.util.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 java.util.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 java.lang.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) java.util.UUID parentUuid)
    • update

      @PutMapping("/api/topics/{uuid}") public org.springframework.http.ResponseEntity update​(@PathVariable java.util.UUID uuid, @RequestBody de.digitalcollections.model.identifiable.entity.Topic topic)
    • viewByRefId

      @GetMapping({"/subtopics/{refId:[0-9]+}","/topics/{refId:[0-9]+}"}) public java.lang.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 java.lang.String view​(@PathVariable java.util.UUID uuid, org.springframework.ui.Model model) throws HttpException
      Throws:
      HttpException