Class WebpageController
java.lang.Object
de.digitalcollections.cudami.server.controller.AbstractPagingAndSortingController
de.digitalcollections.cudami.server.controller.AbstractUniqueObjectController<T>
de.digitalcollections.cudami.server.controller.identifiable.AbstractIdentifiableController<de.digitalcollections.model.identifiable.web.Webpage>
de.digitalcollections.cudami.server.controller.identifiable.web.WebpageController
@RestController
public class WebpageController
extends AbstractIdentifiableController<de.digitalcollections.model.identifiable.web.Webpage>
-
Field Summary
Fields inherited from class de.digitalcollections.cudami.server.controller.AbstractUniqueObjectController
LOGGER -
Constructor Summary
ConstructorsConstructorDescriptionWebpageController(LocaleService localeService, WebpageService webpageService) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRelatedFileResource(UUID uuid, UUID fileResourceUuid) de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.web.Webpage>find(int pageNumber, int pageSize, List<de.digitalcollections.model.list.sorting.Order> sortBy, List<de.digitalcollections.model.list.filtering.FilterCriterion> filterCriteria, de.digitalcollections.model.list.filtering.Filtering filtering) de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource>findRelatedFileResources(UUID uuid) de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.web.Webpage>findSubpages(UUID uuid, int pageNumber, int pageSize, List<de.digitalcollections.model.list.sorting.Order> sortBy, List<de.digitalcollections.model.list.filtering.FilterCriterion> filterCriteria, de.digitalcollections.model.list.filtering.Filtering filtering, String active) org.springframework.http.ResponseEntity<de.digitalcollections.model.view.BreadcrumbNavigation>getBreadcrumbNavigation(UUID uuid, Locale pLocale) de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.web.Webpage>getByManyUuids(List<UUID> uuids) org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.web.Webpage>de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.web.Webpage>getByUuids(List<UUID> uuids) List<de.digitalcollections.model.identifiable.web.Webpage>getChildrenTree(UUID uuid, String active) de.digitalcollections.model.identifiable.web.Webpageprotected IdentifiableService<de.digitalcollections.model.identifiable.web.Webpage>de.digitalcollections.model.identifiable.entity.WebsitegetWebsite(UUID uuid) de.digitalcollections.model.identifiable.web.WebpagesaveWithParentWebpage(UUID parentWebpageUuid, de.digitalcollections.model.identifiable.web.Webpage webpage, org.springframework.validation.BindingResult errors) de.digitalcollections.model.identifiable.web.WebpagesaveWithParentWebsite(UUID parentWebsiteUuid, de.digitalcollections.model.identifiable.web.Webpage webpage, org.springframework.validation.BindingResult errors) de.digitalcollections.model.identifiable.web.Webpageupdate(UUID uuid, de.digitalcollections.model.identifiable.web.Webpage webpage, org.springframework.validation.BindingResult errors) org.springframework.http.ResponseEntityupdateChildrenOrder(UUID uuid, List<de.digitalcollections.model.identifiable.web.Webpage> rootPages) Methods inherited from class de.digitalcollections.cudami.server.controller.identifiable.AbstractIdentifiableController
extractNamespaceAndId, getByIdentifier, getLanguagesMethods inherited from class de.digitalcollections.cudami.server.controller.AbstractUniqueObjectController
buildExamplesWithUuids, buildExampleWithUuid, count, delete, delete, getByUuid, getByUuidAndLocale, saveMethods inherited from class de.digitalcollections.cudami.server.controller.AbstractPagingAndSortingController
createPageRequest, getFieldType, mergeFilters
-
Constructor Details
-
WebpageController
-
-
Method Details
-
addRelatedFileResource
@PostMapping({"/v6/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/related/fileresources/{fileResourceUuid}","/v5/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/related/fileresources/{fileResourceUuid}","/v2/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/related/fileresources/{fileResourceUuid}","/latest/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/related/fileresources/{fileResourceUuid}"}) @ResponseStatus(OK) public void addRelatedFileResource(@PathVariable UUID uuid, @PathVariable UUID fileResourceUuid) throws ServiceException - Throws:
ServiceException
-
find
@GetMapping(value="/v6/webpages", produces="application/json") public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.web.Webpage> find(@RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="25") int pageSize, @RequestParam(name="sortBy",required=false) List<de.digitalcollections.model.list.sorting.Order> sortBy, @RequestParam(name="filter",required=false) List<de.digitalcollections.model.list.filtering.FilterCriterion> filterCriteria, @RequestParam(name="filtering",required=false) de.digitalcollections.model.list.filtering.Filtering filtering) throws ServiceException - Overrides:
findin classAbstractUniqueObjectController<de.digitalcollections.model.identifiable.web.Webpage>- Throws:
ServiceException
-
findSubpages
@GetMapping(value="/v6/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/children", produces="application/json") public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.web.Webpage> findSubpages(@PathVariable("uuid") UUID uuid, @RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="25") int pageSize, @RequestParam(name="sortBy",required=false) List<de.digitalcollections.model.list.sorting.Order> sortBy, @RequestParam(name="filter",required=false) List<de.digitalcollections.model.list.filtering.FilterCriterion> filterCriteria, @RequestParam(name="filtering",required=false) de.digitalcollections.model.list.filtering.Filtering filtering, @RequestParam(name="active",required=false) String active) throws ServiceException - Throws:
ServiceException
-
getByUuid
@GetMapping(value={"/v6/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}","/v5/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}","/latest/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}"}, produces="application/json") public org.springframework.http.ResponseEntity<de.digitalcollections.model.identifiable.web.Webpage> getByUuid(@PathVariable("uuid") UUID uuid, @RequestParam(name="pLocale",required=false) Locale pLocale, @RequestParam(name="active",required=false) String active) throws ServiceException - Throws:
ServiceException
-
getByUuids
@GetMapping(value="/v6/webpages/list/{uuids}", produces="application/json") public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.web.Webpage> getByUuids(@PathVariable List<UUID> uuids) throws ServiceException - Overrides:
getByUuidsin classAbstractUniqueObjectController<de.digitalcollections.model.identifiable.web.Webpage>- Throws:
ServiceException
-
getByManyUuids
@PostMapping(value="/v6/webpages/list", produces="application/json") public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.web.Webpage> getByManyUuids(@RequestBody List<UUID> uuids) throws ServiceException - Throws:
ServiceException
-
getChildrenTree
@GetMapping(value={"/v6/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/childrentree","/v5/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/childrentree","/latest/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/childrentree"}, produces="application/json") public List<de.digitalcollections.model.identifiable.web.Webpage> getChildrenTree(@PathVariable("uuid") UUID uuid, @RequestParam(name="active",required=false) String active) throws ServiceException - Throws:
ServiceException
-
getParent
@GetMapping(value={"/v6/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/parent","/v5/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/parent","/v3/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/parent","/latest/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/parent"}, produces="application/json") public de.digitalcollections.model.identifiable.web.Webpage getParent(@PathVariable("uuid") UUID uuid) throws ServiceException - Throws:
ServiceException
-
findRelatedFileResources
@GetMapping(value={"/v6/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/related/fileresources","/v5/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/related/fileresources","/v2/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/related/fileresources","/latest/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/related/fileresources"}, produces="application/json") public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource> findRelatedFileResources(@PathVariable UUID uuid) throws ServiceException - Throws:
ServiceException
-
getService
- Specified by:
getServicein classAbstractIdentifiableController<de.digitalcollections.model.identifiable.web.Webpage>
-
getWebsite
@GetMapping(value={"/v6/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/website","/v5/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/website","/v3/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/website","/latest/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/website"}, produces="application/json") public de.digitalcollections.model.identifiable.entity.Website getWebsite(@PathVariable("uuid") UUID uuid) throws ServiceException - Throws:
ServiceException
-
saveWithParentWebpage
@PostMapping(value={"/v6/webpages/{parentWebpageUuid}/webpage","/v5/webpages/{parentWebpageUuid}/webpage","/v2/webpages/{parentWebpageUuid}/webpage","/latest/webpages/{parentWebpageUuid}/webpage"}, produces="application/json") public de.digitalcollections.model.identifiable.web.Webpage saveWithParentWebpage(@PathVariable UUID parentWebpageUuid, @RequestBody de.digitalcollections.model.identifiable.web.Webpage webpage, org.springframework.validation.BindingResult errors) throws ServiceException, ValidationException - Throws:
ServiceExceptionValidationException
-
saveWithParentWebsite
@PostMapping(value={"/v6/websites/{parentWebsiteUuid}/webpage","/v5/websites/{parentWebsiteUuid}/webpage","/v2/websites/{parentWebsiteUuid}/webpage","/latest/websites/{parentWebsiteUuid}/webpage"}, produces="application/json") public de.digitalcollections.model.identifiable.web.Webpage saveWithParentWebsite(@PathVariable UUID parentWebsiteUuid, @RequestBody de.digitalcollections.model.identifiable.web.Webpage webpage, org.springframework.validation.BindingResult errors) throws ServiceException - Throws:
ServiceException
-
update
@PutMapping(value={"/v6/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}","/v5/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}","/v2/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}","/latest/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}"}, produces="application/json") public de.digitalcollections.model.identifiable.web.Webpage update(@PathVariable UUID uuid, @RequestBody de.digitalcollections.model.identifiable.web.Webpage webpage, org.springframework.validation.BindingResult errors) throws ServiceException, ValidationException - Overrides:
updatein classAbstractUniqueObjectController<de.digitalcollections.model.identifiable.web.Webpage>- Throws:
ServiceExceptionValidationException
-
updateChildrenOrder
@PutMapping(value={"/v6/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/children","/v5/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/children","/v3/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/children","/latest/webpages/{uuid:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$}/children"}, produces="application/json") public org.springframework.http.ResponseEntity updateChildrenOrder(@PathVariable("uuid") UUID uuid, @RequestBody List<de.digitalcollections.model.identifiable.web.Webpage> rootPages) throws ServiceException - Throws:
ServiceException
-