Class AbstractPageController
java.lang.Object
de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
- Direct Known Subclasses:
AbstractCartPageController,AbstractCheckoutController,AbstractProductConfigController,AbstractRegisterPageController,AbstractSearchPageController,AnonymousConsentController,ChineseBusinessUnitManagementPageController,ChineseMobileBindingController,ConfigureController,CustomerReviewController,DefaultPageController,DefaultPunchOutController,EmailPageController,GuestOrderController,HomePageController,ImportCSVPageController,MyCartPageController,NotificationPreferencePageController,PasswordResetPageController,PreviewContentPageController,ProductPageController,ProductQrPageController,ProductTextfieldConfiguratorController,QuickOrderPageController,StockNotificationPageController,StorePageController,VerificationCodeController,WeChatPayController
Base controller for all page controllers. Provides common functionality for all page controllers.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
AbstractController.HttpNotFoundException -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
FORWARD_PREFIX, REDIRECT_PREFIX, ROOT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddRegistrationConsentDataToModel(org.springframework.ui.Model model) protected StringcheckRequestUrl(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String resolvedUrlPath) Checks request URL against properly resolved URL and returns null if url is proper or redirection string if not.protected MetaElementDatacreateMetaElement(String name, String content) protected StringdecodeWithScheme(String source, String enc) Decodes a string with encoding using a specific encoding scheme.protected BaseSiteServiceprotected StringMethod used to determine the checkout redirect URL that will handle the checkout process.protected CMSPageServiceprotected CMSPreviewServiceprotected CMSSiteServiceprotected ConfigurationServiceprotected ConsentFacadeprotected ContentPageModelgetContentPageForLabelOrId(String labelOrId) Finds a content page by label or id and evaluates the cms restrictions associated to the page and components on the page.protected CustomerFacadeprotected HostConfigServiceprotected I18NServiceprotected org.springframework.context.MessageSourceprotected PageTitleResolverprotected RequestContextDatagetRequestContextData(javax.servlet.http.HttpServletRequest request) protected SessionServiceprotected SiteConfigServiceprotected StoreSessionFacadegetUser()protected UserFacadeprotected Stringprotected StringgetViewForPage(org.springframework.ui.Model model) protected voidprepareNotFoundPage(org.springframework.ui.Model model, javax.servlet.http.HttpServletResponse response) Prepares Not Found (404) Pageprotected voidsetUpMetaData(org.springframework.ui.Model model, String metaKeywords, String metaDescription) protected voidsetUpMetaDataForContentPage(org.springframework.ui.Model model, ContentPageModel contentPage) protected voidstoreCmsPageInModel(org.springframework.ui.Model model, AbstractPageModel cmsPage) protected voidstoreContentPageTitleInModel(org.springframework.ui.Model model, String title) protected voidstoreContinueUrl(javax.servlet.http.HttpServletRequest request) protected StringUrl encode.Methods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
addRequestToModel, getBean
-
Field Details
-
PAGE_ROOT
- See Also:
-
CMS_PAGE_MODEL
- See Also:
-
CMS_PAGE_TITLE
- See Also:
-
REDIRECT_TO_LOGIN_FOR_CHECKOUT
- See Also:
-
REDIRECT_TO_MULTISTEP_CHECKOUT
- See Also:
-
REGISTRATION_CONSENT_ID
- See Also:
-
UTF_8
- See Also:
-
-
Constructor Details
-
AbstractPageController
public AbstractPageController()
-
-
Method Details
-
getSiteConfigService
-
getCmsSiteService
-
getCmsPageService
-
getStoreSessionFacade
-
getCustomerFacade
-
getSessionService
-
getHostConfigService
-
getMessageSource
protected org.springframework.context.MessageSource getMessageSource() -
getI18nService
-
getUserFacade
-
getConfigurationService
-
getBaseSiteService
-
getConsentFacade
-
getCmsPreviewService
-
getLanguages
-
getCurrencies
-
getCurrentLanguage
-
getCurrentCurrency
-
getSiteName
-
getSiteUid
-
getUser
-
storeCmsPageInModel
-
storeContentPageTitleInModel
-
getViewForPage
-
getViewForPage
-
checkRequestUrl
protected String checkRequestUrl(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String resolvedUrlPath) throws UnsupportedEncodingException Checks request URL against properly resolved URL and returns null if url is proper or redirection string if not.- Parameters:
request- - request that contains current URLresponse- - response to write "301 Moved Permanently" status to if redirectedresolvedUrlPath- - properly resolved URL- Returns:
- null if url is properly resolved or redirection string if not
- Throws:
UnsupportedEncodingException
-
getContentPageForLabelOrId
protected ContentPageModel getContentPageForLabelOrId(String labelOrId) throws CMSItemNotFoundException Finds a content page by label or id and evaluates the cms restrictions associated to the page and components on the page.- Parameters:
labelOrId- the label or id used for the look-up- Returns:
- a content page
- Throws:
CMSItemNotFoundException- when no page is found for the provided label or id
-
getPageTitleResolver
-
storeContinueUrl
protected void storeContinueUrl(javax.servlet.http.HttpServletRequest request) -
setUpMetaData
-
createMetaElement
-
setUpMetaDataForContentPage
protected void setUpMetaDataForContentPage(org.springframework.ui.Model model, ContentPageModel contentPage) -
getRequestContextData
-
urlEncode
Url encode.- Parameters:
url- the url- Returns:
- the encoded string
- Throws:
IllegalArgumentException- if url is null
-
prepareNotFoundPage
protected void prepareNotFoundPage(org.springframework.ui.Model model, javax.servlet.http.HttpServletResponse response) throws CMSItemNotFoundException Prepares Not Found (404) Page- Parameters:
model- The model to pass with the pageresponse- object represents http response needed for setting not found status.- Throws:
CMSItemNotFoundException- when cannot find ContentPage with "notFound" id
-
getCheckoutRedirectUrl
Method used to determine the checkout redirect URL that will handle the checkout process.- Returns:
- A
Stringobject of the URL to redirect to.
-
addRegistrationConsentDataToModel
protected void addRegistrationConsentDataToModel(org.springframework.ui.Model model) -
decodeWithScheme
Decodes a string with encoding using a specific encoding scheme.- Parameters:
source- A string to decodeenc- The name of a supported character encoding. Default value is UTF-8 if no value is provided.- Returns:
- A decoded string
-