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.AbstractController
Controller 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.Topic
create()
String
create(org.springframework.ui.Model model, String parentType, UUID parentUuid)
String
edit(UUID uuid, Locale activeLanguage, org.springframework.ui.Model model)
de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic>
findSubtopic(UUID uuid, int pageNumber, int pageSize, String searchTerm)
de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic>
findTop(int pageNumber, int pageSize, String searchTerm, List<de.digitalcollections.model.list.sorting.Order> sortBy)
de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity>
getAttachedEntites(UUID uuid, int pageNumber, int pageSize)
de.digitalcollections.model.identifiable.entity.Topic
getByUuid(UUID uuid)
de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource>
getRelatedFileResources(UUID uuid, int pageNumber, int pageSize)
String
list(org.springframework.ui.Model model)
protected String
module()
org.springframework.http.ResponseEntity
save(de.digitalcollections.model.identifiable.entity.Topic topic, UUID parentUuid)
org.springframework.http.ResponseEntity
update(UUID uuid, de.digitalcollections.model.identifiable.entity.Topic topic)
String
view(UUID uuid, org.springframework.ui.Model model)
String
viewByRefId(long refId, org.springframework.ui.Model model)
-
-
-
Constructor Detail
-
TopicsController
public TopicsController(LanguageSortingHelper languageSortingHelper, CudamiClient client)
-
-
Method Detail
-
create
@GetMapping("/topics/new") public String create(org.springframework.ui.Model model, @RequestParam(name="parentType",required=false) String parentType, @RequestParam(name="parentUuid",required=false) UUID parentUuid) throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
create
@GetMapping("/api/topics/new") @ResponseBody public de.digitalcollections.model.identifiable.entity.Topic create() throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
edit
@GetMapping("/topics/{uuid}/edit") public String edit(@PathVariable UUID uuid, @RequestParam(name="activeLanguage",required=false) Locale activeLanguage, org.springframework.ui.Model model) throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
findTop
@GetMapping("/api/topics") @ResponseBody public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> findTop(@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, @RequestParam(name="sortBy",required=false) List<de.digitalcollections.model.list.sorting.Order> sortBy) throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
findSubtopic
@GetMapping("/api/topics/{uuid}/topics") @ResponseBody public de.digitalcollections.model.list.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 de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
getAttachedEntites
@GetMapping("/api/topics/{uuid}/entities") @ResponseBody public de.digitalcollections.model.list.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 de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
getByUuid
@GetMapping("/api/topics/{uuid}") @ResponseBody public de.digitalcollections.model.identifiable.entity.Topic getByUuid(@PathVariable UUID uuid) throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
getRelatedFileResources
@GetMapping("/api/topics/{uuid}/fileresources") @ResponseBody public de.digitalcollections.model.list.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 de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
list
@GetMapping("/topics") public String list(org.springframework.ui.Model model) throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
module
@ModelAttribute("menu") protected String module()
-
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)
-
view
@GetMapping("/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 de.digitalcollections.model.exception.TechnicalException, de.digitalcollections.model.exception.ResourceNotFoundException
- Throws:
de.digitalcollections.model.exception.TechnicalException
de.digitalcollections.model.exception.ResourceNotFoundException
-
viewByRefId
@GetMapping("/topics/{refId:[0-9]+}") public String viewByRefId(@PathVariable long refId, org.springframework.ui.Model model) throws de.digitalcollections.model.exception.TechnicalException, de.digitalcollections.model.exception.ResourceNotFoundException
- Throws:
de.digitalcollections.model.exception.TechnicalException
de.digitalcollections.model.exception.ResourceNotFoundException
-
-