Class WebpagesController
- java.lang.Object
-
- de.digitalcollections.commons.springmvc.controller.AbstractController
-
- de.digitalcollections.cudami.admin.controller.identifiable.web.WebpagesController
-
@Controller public class WebpagesController extends de.digitalcollections.commons.springmvc.controller.AbstractController
Controller for webpage management pages.
-
-
Constructor Summary
Constructors Constructor Description WebpagesController(LanguageSortingHelper languageSortingHelper, CudamiClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description de.digitalcollections.model.identifiable.web.Webpage
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.web.Webpage>
findSubpages(UUID uuid, int pageNumber, int pageSize, String searchTerm)
de.digitalcollections.model.identifiable.web.Webpage
getByUuid(UUID uuid)
protected String
module()
org.springframework.http.ResponseEntity
save(de.digitalcollections.model.identifiable.web.Webpage webpage, String parentType, UUID parentUuid)
org.springframework.http.ResponseEntity
update(UUID uuid, de.digitalcollections.model.identifiable.web.Webpage webpage)
org.springframework.http.ResponseEntity
updateSubpagesOrder(UUID uuid, List<de.digitalcollections.model.identifiable.web.Webpage> subpages)
String
view(UUID uuid, org.springframework.ui.Model model)
-
-
-
Constructor Detail
-
WebpagesController
public WebpagesController(LanguageSortingHelper languageSortingHelper, CudamiClient client)
-
-
Method Detail
-
create
@GetMapping("/webpages/new") public String create(org.springframework.ui.Model model, @RequestParam("parentType") String parentType, @RequestParam("parentUuid") UUID parentUuid) throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
create
@GetMapping("/api/webpages/new") @ResponseBody public de.digitalcollections.model.identifiable.web.Webpage create() throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
edit
@GetMapping("/webpages/{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
-
findSubpages
@GetMapping("/api/webpages/{uuid}/webpages") @ResponseBody public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.web.Webpage> findSubpages(@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
-
getByUuid
@GetMapping("/api/webpages/{uuid}") @ResponseBody public de.digitalcollections.model.identifiable.web.Webpage getByUuid(@PathVariable UUID uuid) throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
module
@ModelAttribute("menu") protected String module()
-
save
@PostMapping("/api/webpages") public org.springframework.http.ResponseEntity save(@RequestBody de.digitalcollections.model.identifiable.web.Webpage webpage, @RequestParam("parentType") String parentType, @RequestParam("parentUuid") UUID parentUuid)
-
update
@PutMapping("/api/webpages/{uuid}") public org.springframework.http.ResponseEntity update(@PathVariable UUID uuid, @RequestBody de.digitalcollections.model.identifiable.web.Webpage webpage)
-
updateSubpagesOrder
@PutMapping("/api/webpages/{uuid}/webpages") public org.springframework.http.ResponseEntity updateSubpagesOrder(@PathVariable UUID uuid, @RequestBody List<de.digitalcollections.model.identifiable.web.Webpage> subpages) throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
view
@GetMapping("/webpages/{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
-
-