Class ArticlesController
- java.lang.Object
-
- de.digitalcollections.commons.springmvc.controller.AbstractController
-
- de.digitalcollections.cudami.admin.controller.identifiable.entity.ArticlesController
-
@Controller public class ArticlesController extends de.digitalcollections.commons.springmvc.controller.AbstractController
Controller for articles management pages.
-
-
Constructor Summary
Constructors Constructor Description ArticlesController(LanguageSortingHelper languageSortingHelper, CudamiClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description de.digitalcollections.model.identifiable.entity.Article
create()
String
create(org.springframework.ui.Model model)
String
edit(UUID uuid, Locale activeLanguage, org.springframework.ui.Model model)
de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Article>
find(int pageNumber, int pageSize, String searchTerm, List<de.digitalcollections.model.list.sorting.Order> sortBy)
de.digitalcollections.model.identifiable.entity.Article
getByUuid(UUID uuid)
String
list(org.springframework.ui.Model model)
protected String
module()
org.springframework.http.ResponseEntity
save(de.digitalcollections.model.identifiable.entity.Article article)
org.springframework.http.ResponseEntity
update(UUID uuid, de.digitalcollections.model.identifiable.entity.Article article)
String
view(UUID uuid, org.springframework.ui.Model model)
-
-
-
Constructor Detail
-
ArticlesController
public ArticlesController(LanguageSortingHelper languageSortingHelper, CudamiClient client)
-
-
Method Detail
-
create
@GetMapping("/articles/new") public String create(org.springframework.ui.Model model) throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
create
@GetMapping("/api/articles/new") @ResponseBody public de.digitalcollections.model.identifiable.entity.Article create() throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
edit
@GetMapping("/articles/{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
-
find
@GetMapping("/api/articles") @ResponseBody public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Article> find(@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
-
getByUuid
@GetMapping("/api/articles/{uuid}") @ResponseBody public de.digitalcollections.model.identifiable.entity.Article getByUuid(@PathVariable UUID uuid) throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
list
@GetMapping("/articles") 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/articles") public org.springframework.http.ResponseEntity save(@RequestBody de.digitalcollections.model.identifiable.entity.Article article)
-
update
@PutMapping("/api/articles/{uuid}") public org.springframework.http.ResponseEntity update(@PathVariable UUID uuid, @RequestBody de.digitalcollections.model.identifiable.entity.Article article)
-
view
@GetMapping("/articles/{uuid}") 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
-
-