Class PageController
java.lang.Object
de.hybris.platform.cmsoccaddon.controllers.PageController
Controller to get cms page data with a list of content slots, each of which contains a list of cms component data
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PageListWsDTOAdapter.ListAdaptedPagesformatSearchPageDataResult(String fields, SearchPageData<AbstractPageData> searchResult) Transforms theSearchPageDatacontaining the list of page data into aListAdaptedPagesobject.getAllPages(String pageType, int currentPage, int pageSize, String sort, String fields) protected CMSDataMapperprotected PageFacadevoidsetDataMapper(CMSDataMapper dataMapper) voidsetPageFacade(PageFacade pageFacade) voidsetWebPaginationUtils(WebPaginationUtils webPaginationUtils)
-
Field Details
-
DEFAULT_CURRENT_PAGE
- See Also:
-
DEFAULT_PAGE_SIZE
- See Also:
-
dataMapper
-
-
Constructor Details
-
PageController
public PageController()
-
-
Method Details
-
getPage
@SecurePortalUnauthenticatedAccess @GetMapping("/pages") @ResponseStatus(OK) @ResponseBody public PageAdapterUtil.PageAdaptedData getPage(@RequestParam(required=true,defaultValue="ContentPage") String pageType, @RequestParam(required=false) String pageLabelOrId, @RequestParam(required=false) String code, @RequestParam(defaultValue="DEFAULT") String fields) throws CMSItemNotFoundException - Throws:
CMSItemNotFoundException
-
getPage
@SecurePortalUnauthenticatedAccess @GetMapping("/pages/{pageId}") @ResponseStatus(OK) @ResponseBody public PageAdapterUtil.PageAdaptedData getPage(@PathVariable String pageId, @RequestParam(defaultValue="DEFAULT") String fields) throws CMSItemNotFoundException - Throws:
CMSItemNotFoundException
-
getAllPages
@SecurePortalUnauthenticatedAccess @GetMapping(value="/sitepages", params="currentPage") @ResponseStatus(OK) @ResponseBody public PageListWsDTOAdapter.ListAdaptedPages getAllPages(@RequestParam(required=false) String pageType, @RequestParam(required=true,defaultValue="0") int currentPage, @RequestParam(required=false,defaultValue="10") int pageSize, @RequestParam(required=false) String sort, @RequestParam(defaultValue="DEFAULT") String fields) -
formatSearchPageDataResult
protected PageListWsDTOAdapter.ListAdaptedPages formatSearchPageDataResult(String fields, SearchPageData<AbstractPageData> searchResult) Transforms theSearchPageDatacontaining the list of page data into aListAdaptedPagesobject.- Parameters:
fields- - the response configuration determining which fields to include in the responsesearchResult- - the configuration containing the search results, pagination and sorting information- Returns:
- a list of page of type
PageListWsDTOAdapter.ListAdaptedPages
-
getPageFacade
-
setPageFacade
-
getDataMapper
-
setDataMapper
-
getWebPaginationUtils
-
setWebPaginationUtils
-