@RestController
@Api(description="The webpage controller",
name="Webpage controller")
public class WebpageController
extends Object
| Constructor and Description |
|---|
WebpageController() |
| Modifier and Type | Method and Description |
|---|---|
de.digitalcollections.core.model.api.paging.PageResponse<Website> |
findAll(int pageNumber,
int pageSize,
String sortField,
de.digitalcollections.core.model.api.paging.enums.Direction sortDirection,
de.digitalcollections.core.model.api.paging.enums.NullHandling nullHandling) |
org.springframework.http.ResponseEntity<Webpage> |
getWebpage(UUID uuid,
Locale pLocale) |
Webpage |
save(UUID websiteUuid,
Webpage webpage,
org.springframework.validation.BindingResult errors) |
Webpage |
update(UUID uuid,
Webpage webpage,
org.springframework.validation.BindingResult errors) |
@ApiMethod(description="get all webpages")
@RequestMapping(value="/v1/webpages",
produces="application/json",
method=GET)
@ApiResponseObject
public de.digitalcollections.core.model.api.paging.PageResponse<Website> findAll(@RequestParam(name="pageNumber",required=false,defaultValue="0")
int pageNumber,
@RequestParam(name="pageSize",required=false,defaultValue="5")
int pageSize,
@RequestParam(name="sortField",required=false,defaultValue="uuid")
String sortField,
@RequestParam(name="sortDirection",required=false,defaultValue="ASC")
de.digitalcollections.core.model.api.paging.enums.Direction sortDirection,
@RequestParam(name="nullHandling",required=false,defaultValue="NATIVE")
de.digitalcollections.core.model.api.paging.enums.NullHandling nullHandling)
@ApiMethod(description="get a webpage as JSON or XML, depending on extension or <tt>format</tt> request parameter or accept header")
@RequestMapping(value="/v1/webpages/{uuid}",
produces={"application/json","application/xml"},
method=GET)
@ApiResponseObject
public org.springframework.http.ResponseEntity<Webpage> getWebpage(@ApiPathParam(description="UUID of the webpage, e.g. <tt>599a120c-2dd5-11e8-b467-0ed5f89f718b</tt>") @PathVariable(value="uuid")
UUID uuid,
@ApiQueryParam(name="pLocale",description="Desired locale, e.g. <tt>de_DE</tt>. If unset, contents in all languages will be returned") @RequestParam(name="pLocale",required=false)
Locale pLocale)
throws IdentifiableServiceException
IdentifiableServiceException@ApiMethod(description="save a newly created webpage")
@RequestMapping(value="/v1/websites/{websiteUuid}/webpage",
produces="application/json",
method=POST)
@ApiResponseObject
public Webpage save(@PathVariable
UUID websiteUuid,
@RequestBody
Webpage webpage,
org.springframework.validation.BindingResult errors)
throws IdentifiableServiceException
IdentifiableServiceException@ApiMethod(description="update a webpage")
@RequestMapping(value="/v1/webpages/{uuid}",
produces="application/json",
method=PUT)
@ApiResponseObject
public Webpage update(@PathVariable
UUID uuid,
@RequestBody
Webpage webpage,
org.springframework.validation.BindingResult errors)
throws IdentifiableServiceException
IdentifiableServiceExceptionCopyright © 2018. All rights reserved.