java.lang.Object
de.digitalcollections.cudami.server.controller.identifiable.entity.parts.WebpageController

@RestController
@Api(description="The webpage controller",
     name="Webpage controller")
public class WebpageController
extends java.lang.Object
  • Constructor Summary

    Constructors
    Constructor Description
    WebpageController()  
  • Method Summary

    Modifier and Type Method Description
    void addRelatedFileResource​(java.util.UUID uuid, java.util.UUID fileResourceUuid)  
    de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.parts.Webpage> 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.filter.FilterCriterion<java.time.LocalDate> publicationStart, de.digitalcollections.model.api.filter.FilterCriterion<java.time.LocalDate> publicationEnd)  
    org.springframework.http.ResponseEntity<de.digitalcollections.model.api.view.BreadcrumbNavigation> getBreadcrumb​(java.util.UUID uuid, java.util.Locale pLocale)  
    java.util.List<de.digitalcollections.model.api.identifiable.resource.FileResource> getRelatedFileResources​(java.util.UUID uuid)  
    org.springframework.http.ResponseEntity<de.digitalcollections.model.api.identifiable.entity.parts.Webpage> getWebpage​(java.util.UUID uuid, java.util.Locale pLocale, java.lang.String active)  
    de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.parts.Webpage> getWebpageChildren​(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, java.lang.String active)  
    java.util.List<de.digitalcollections.model.api.identifiable.entity.parts.Webpage> getWebpageChildrenTree​(java.util.UUID uuid, java.lang.String active)  
    de.digitalcollections.model.api.identifiable.entity.parts.Webpage getWebpageParent​(java.util.UUID uuid)  
    de.digitalcollections.model.api.identifiable.entity.Website getWebsite​(java.util.UUID uuid)  
    de.digitalcollections.model.api.identifiable.entity.parts.Webpage saveWithParentWebpage​(java.util.UUID parentWebpageUuid, de.digitalcollections.model.api.identifiable.entity.parts.Webpage webpage, org.springframework.validation.BindingResult errors)  
    de.digitalcollections.model.api.identifiable.entity.parts.Webpage saveWithParentWebsite​(java.util.UUID parentWebsiteUuid, de.digitalcollections.model.api.identifiable.entity.parts.Webpage webpage, org.springframework.validation.BindingResult errors)  
    de.digitalcollections.model.api.identifiable.entity.parts.Webpage update​(java.util.UUID uuid, de.digitalcollections.model.api.identifiable.entity.parts.Webpage webpage, org.springframework.validation.BindingResult errors)  
    org.springframework.http.ResponseEntity updateChildrenOrder​(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

    • WebpageController

      public WebpageController()
  • Method Details

    • findAll

      @ApiMethod(description="Get all webpages") @GetMapping(value={"/latest/webpages","/v2/webpages"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.parts.Webpage> 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, @RequestParam(name="publicationStart",required=false) de.digitalcollections.model.api.filter.FilterCriterion<java.time.LocalDate> publicationStart, @RequestParam(name="publicationEnd",required=false) de.digitalcollections.model.api.filter.FilterCriterion<java.time.LocalDate> publicationEnd)
    • getWebpage

      @ApiMethod(description="Get a webpage as JSON or XML, depending on extension or <tt>format</tt> request parameter or accept header") @GetMapping(value={"/latest/webpages/{uuid}","/v3/webpages/{uuid}"}, produces={"application/json","application/xml"}) @ApiResponseObject public org.springframework.http.ResponseEntity<de.digitalcollections.model.api.identifiable.entity.parts.Webpage> getWebpage​(@ApiPathParam(description="UUID of the webpage, e.g. <tt>599a120c-2dd5-11e8-b467-0ed5f89f718b</tt>") @PathVariable("uuid") java.util.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) java.util.Locale pLocale, @ApiQueryParam(name="active",description="If set, object will only be returned if active") @RequestParam(name="active",required=false) java.lang.String active) throws IdentifiableServiceException
      Throws:
      IdentifiableServiceException
    • getWebpageChildren

      @ApiMethod(description="Get (active or all) paged children of a webpage as JSON") @GetMapping(value={"/latest/webpages/{uuid}/children","/v3/webpages/{uuid}/children"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.parts.Webpage> getWebpageChildren​(@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, @RequestParam(name="active",required=false) java.lang.String active) throws IdentifiableServiceException
      Throws:
      IdentifiableServiceException
    • getWebpageChildrenTree

      @ApiMethod(description="Get (active or all) children of a webpage recursivly as JSON") @GetMapping(value={"/latest/webpages/{uuid}/childrentree","/v3/webpages/{uuid}/childrentree"}, produces="application/json") @ApiResponseObject public java.util.List<de.digitalcollections.model.api.identifiable.entity.parts.Webpage> getWebpageChildrenTree​(@ApiPathParam(description="UUID of the root webpage, e.g. <tt>599a120c-2dd5-11e8-b467-0ed5f89f718b</tt>") @PathVariable("uuid") java.util.UUID uuid, @ApiQueryParam(name="active",description="If set, only active children will be returned") @RequestParam(name="active",required=false) java.lang.String active)
    • getWebpageParent

      @ApiMethod(description="Get parent of a webpage as JSON") @GetMapping(value={"/latest/webpages/{uuid}/parent","/v3/webpages/{uuid}/parent"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.parts.Webpage getWebpageParent​(@ApiPathParam(description="UUID of the webpage, e.g. <tt>599a120c-2dd5-11e8-b467-0ed5f89f718b</tt>") @PathVariable("uuid") java.util.UUID uuid) throws IdentifiableServiceException
      Throws:
      IdentifiableServiceException
    • getWebsite

      @ApiMethod(description="Get website of a webpage as JSON") @GetMapping(value={"/latest/webpages/{uuid}/website","/v3/webpages/{uuid}/website"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.Website getWebsite​(@ApiPathParam(description="UUID of the webpage, e.g. <tt>599a120c-2dd5-11e8-b467-0ed5f89f718b</tt>") @PathVariable("uuid") java.util.UUID uuid) throws IdentifiableServiceException
      Throws:
      IdentifiableServiceException
    • saveWithParentWebsite

      @ApiMethod(description="Save a newly created top-level webpage") @PostMapping(value={"/latest/websites/{parentWebsiteUuid}/webpage","/v2/websites/{parentWebsiteUuid}/webpage"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.parts.Webpage saveWithParentWebsite​(@PathVariable java.util.UUID parentWebsiteUuid, @RequestBody de.digitalcollections.model.api.identifiable.entity.parts.Webpage webpage, org.springframework.validation.BindingResult errors) throws IdentifiableServiceException
      Throws:
      IdentifiableServiceException
    • saveWithParentWebpage

      @ApiMethod(description="Save a newly created webpage") @PostMapping(value={"/latest/webpages/{parentWebpageUuid}/webpage","/v2/webpages/{parentWebpageUuid}/webpage"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.parts.Webpage saveWithParentWebpage​(@PathVariable java.util.UUID parentWebpageUuid, @RequestBody de.digitalcollections.model.api.identifiable.entity.parts.Webpage webpage, org.springframework.validation.BindingResult errors) throws IdentifiableServiceException
      Throws:
      IdentifiableServiceException
    • update

      @ApiMethod(description="Update a webpage") @PutMapping(value={"/latest/webpages/{uuid}","/v2/webpages/{uuid}"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.parts.Webpage update​(@PathVariable java.util.UUID uuid, @RequestBody de.digitalcollections.model.api.identifiable.entity.parts.Webpage webpage, org.springframework.validation.BindingResult errors) throws IdentifiableServiceException
      Throws:
      IdentifiableServiceException
    • getRelatedFileResources

      @ApiMethod(description="Get file resources related to webpage") @GetMapping(value={"/latest/webpages/{uuid}/related/fileresources","/v2/webpages/{uuid}/related/fileresources"}, produces="application/json") @ApiResponseObject public java.util.List<de.digitalcollections.model.api.identifiable.resource.FileResource> getRelatedFileResources​(@PathVariable java.util.UUID uuid)
    • addRelatedFileResource

      @ApiMethod(description="Add file resource related to webpage") @PostMapping({"/latest/webpages/{uuid}/related/fileresources/{fileResourceUuid}","/v2/webpages/{uuid}/related/fileresources/{fileResourceUuid}"}) @ResponseStatus(OK) @ApiResponseObject public void addRelatedFileResource​(@PathVariable java.util.UUID uuid, @PathVariable java.util.UUID fileResourceUuid)
    • getBreadcrumb

      @ApiMethod(description="Get the breadcrumb for a webpage") @GetMapping(value={"/latest/webpages/{uuid}/breadcrumb","/v3/webpages/{uuid}/breadcrumb"}, produces="application/json") @ApiResponseObject public org.springframework.http.ResponseEntity<de.digitalcollections.model.api.view.BreadcrumbNavigation> getBreadcrumb​(@ApiPathParam(description="UUID of the webpage, e.g. <tt>6119d8e9-9c92-4091-8dcb-bc4053385406</tt>") @PathVariable("uuid") java.util.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) java.util.Locale pLocale)
    • updateChildrenOrder

      @ApiMethod(description="Update the order of a webpage\'s children") @PutMapping(value={"/latest/webpages/{uuid}/children","/v3/webpages/{uuid}/children"}, produces="application/json") @ApiResponseObject public org.springframework.http.ResponseEntity updateChildrenOrder​(@ApiPathParam(description="UUID of the webpage") @PathVariable("uuid") java.util.UUID uuid, @ApiPathParam(description="List of the children") @RequestBody java.util.List<de.digitalcollections.model.api.identifiable.entity.parts.Webpage> rootPages)