Class AbstractPageController
java.lang.Object
de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
- Direct Known Subclasses:
AbstractCartPageController,AbstractCheckoutController,AbstractRegisterPageController,AbstractSearchPageController,ProductPageController,TmaEntryGroupEditPageController,TmaProcessTypeSelectionController
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 de.hybris.platform.site.BaseSiteServiceprotected StringMethod used to determine the checkout redirect URL that will handle the checkout process.protected de.hybris.platform.cms2.servicelayer.services.CMSPageServiceprotected de.hybris.platform.cms2.servicelayer.services.CMSPreviewServiceprotected de.hybris.platform.cms2.servicelayer.services.CMSSiteServiceprotected de.hybris.platform.servicelayer.config.ConfigurationServiceprotected de.hybris.platform.commercefacades.consent.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 de.hybris.platform.commercefacades.customer.CustomerFacadeprotected de.hybris.platform.acceleratorservices.config.HostConfigServiceprotected de.hybris.platform.servicelayer.i18n.I18NServiceprotected org.springframework.context.MessageSourceprotected de.hybris.platform.acceleratorservices.storefront.util.PageTitleResolverprotected RequestContextDatagetRequestContextData(javax.servlet.http.HttpServletRequest request) protected de.hybris.platform.servicelayer.session.SessionServiceprotected de.hybris.platform.acceleratorservices.config.SiteConfigServiceprotected de.hybris.platform.commercefacades.storesession.StoreSessionFacadegetUser()protected de.hybris.platform.commercefacades.user.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
protected de.hybris.platform.acceleratorservices.config.SiteConfigService getSiteConfigService() -
getCmsSiteService
protected de.hybris.platform.cms2.servicelayer.services.CMSSiteService getCmsSiteService() -
getCmsPageService
protected de.hybris.platform.cms2.servicelayer.services.CMSPageService getCmsPageService() -
getStoreSessionFacade
protected de.hybris.platform.commercefacades.storesession.StoreSessionFacade getStoreSessionFacade() -
getCustomerFacade
protected de.hybris.platform.commercefacades.customer.CustomerFacade getCustomerFacade() -
getSessionService
protected de.hybris.platform.servicelayer.session.SessionService getSessionService() -
getHostConfigService
protected de.hybris.platform.acceleratorservices.config.HostConfigService getHostConfigService() -
getMessageSource
protected org.springframework.context.MessageSource getMessageSource() -
getI18nService
protected de.hybris.platform.servicelayer.i18n.I18NService getI18nService() -
getUserFacade
protected de.hybris.platform.commercefacades.user.UserFacade getUserFacade() -
getConfigurationService
protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService() -
getBaseSiteService
protected de.hybris.platform.site.BaseSiteService getBaseSiteService() -
getConsentFacade
protected de.hybris.platform.commercefacades.consent.ConsentFacade getConsentFacade() -
getCmsPreviewService
protected de.hybris.platform.cms2.servicelayer.services.CMSPreviewService 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 de.hybris.platform.cms2.exceptions.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:
de.hybris.platform.cms2.exceptions.CMSItemNotFoundException- when no page is found for the provided label or id
-
getPageTitleResolver
protected de.hybris.platform.acceleratorservices.storefront.util.PageTitleResolver 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 de.hybris.platform.cms2.exceptions.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:
de.hybris.platform.cms2.exceptions.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
-