Class WebsiteController
java.lang.Object
de.digitalcollections.cudami.server.controller.identifiable.entity.WebsiteController
@RestController
@Api(description="The website controller",
name="Website controller")
public class WebsiteController
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description WebsiteController() -
Method Summary
Modifier and Type Method Description longcount()de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.Website>findAll(int pageNumber, int pageSize, java.lang.String sortField, de.digitalcollections.model.api.paging.enums.Direction sortDirection, de.digitalcollections.model.api.paging.enums.NullHandling nullHandling)de.digitalcollections.model.api.identifiable.entity.WebsitefindById(java.util.UUID uuid)de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.parts.Webpage>getRootPages(java.util.UUID uuid, int pageNumber, int pageSize, java.lang.String sortField, de.digitalcollections.model.api.paging.enums.Direction sortDirection, de.digitalcollections.model.api.paging.enums.NullHandling nullHandling)de.digitalcollections.model.api.identifiable.entity.Websitesave(de.digitalcollections.model.api.identifiable.entity.Website website, org.springframework.validation.BindingResult errors)de.digitalcollections.model.api.identifiable.entity.Websiteupdate(java.util.UUID uuid, de.digitalcollections.model.api.identifiable.entity.Website website, org.springframework.validation.BindingResult errors)org.springframework.http.ResponseEntityupdateRootPagesOrder(java.util.UUID uuid, java.util.List<de.digitalcollections.model.api.identifiable.entity.parts.Webpage> rootPages)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
WebsiteController
public WebsiteController()
-
-
Method Details
-
findAll
@ApiMethod(description="Get all websites") @GetMapping(value={"/latest/websites","/v2/websites"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.Website> findAll(@RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="25") int pageSize, @RequestParam(name="sortField",required=false,defaultValue="lastModified") java.lang.String sortField, @RequestParam(name="sortDirection",required=false,defaultValue="DESC") de.digitalcollections.model.api.paging.enums.Direction sortDirection, @RequestParam(name="nullHandling",required=false,defaultValue="NATIVE") de.digitalcollections.model.api.paging.enums.NullHandling nullHandling) -
findById
@ApiMethod(description="Get website by uuid") @GetMapping(value={"/latest/websites/{uuid}","/v2/websites/{uuid}"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.Website findById(@PathVariable java.util.UUID uuid) -
save
@ApiMethod(description="Save a newly created website") @PostMapping(value={"/latest/websites","/v2/websites"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.Website save(@RequestBody de.digitalcollections.model.api.identifiable.entity.Website website, org.springframework.validation.BindingResult errors) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
update
@ApiMethod(description="Update a website") @PutMapping(value={"/latest/websites/{uuid}","/v2/websites/{uuid}"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.Website update(@PathVariable java.util.UUID uuid, @RequestBody de.digitalcollections.model.api.identifiable.entity.Website website, org.springframework.validation.BindingResult errors) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
count
@ApiMethod(description="Get count of content trees") @GetMapping(value={"/latest/websites/count","/v2/websites/count"}, produces="application/json") @ApiResponseObject public long count() -
getRootPages
@ApiMethod(description="Get paged root pages of a website") @GetMapping(value={"/latest/websites/{uuid}/rootpages","/v3/websites/{uuid}/rootpages"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.parts.Webpage> getRootPages(@ApiPathParam(description="UUID of the parent webpage, e.g. <tt>599a120c-2dd5-11e8-b467-0ed5f89f718b</tt>") @PathVariable("uuid") java.util.UUID uuid, @RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="25") int pageSize, @RequestParam(name="sortField",required=false) java.lang.String sortField, @RequestParam(name="sortDirection",required=false,defaultValue="DESC") de.digitalcollections.model.api.paging.enums.Direction sortDirection, @RequestParam(name="nullHandling",required=false,defaultValue="NATIVE") de.digitalcollections.model.api.paging.enums.NullHandling nullHandling) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
updateRootPagesOrder
@ApiMethod(description="Update the order of a website\'s rootpages") @PutMapping(value={"/latest/websites/{uuid}/rootpages","/v3/websites/{uuid}/rootpages"}, produces="application/json") @ApiResponseObject public org.springframework.http.ResponseEntity updateRootPagesOrder(@ApiPathParam(description="UUID of the website") @PathVariable("uuid") java.util.UUID uuid, @ApiPathParam(description="List of the rootpages") @RequestBody java.util.List<de.digitalcollections.model.api.identifiable.entity.parts.Webpage> rootPages)
-