Class HybrisMerchandisingBeforeViewHandlerAdaptee
- java.lang.Object
-
- com.hybris.merchandising.interceptors.HybrisMerchandisingBeforeViewHandlerAdaptee
-
- All Implemented Interfaces:
BeforeViewHandlerAdaptee
public class HybrisMerchandisingBeforeViewHandlerAdaptee extends java.lang.Object implements BeforeViewHandlerAdaptee
ImplementsBeforeViewHandlerAdapteeand intercepts the view request.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String[]ACTIONS
-
Constructor Summary
Constructors Constructor Description HybrisMerchandisingBeforeViewHandlerAdaptee()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringbeforeView(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.ModelMap model, java.lang.String viewName)protected <T> TgetBean(javax.servlet.http.HttpServletRequest request, java.lang.String beanName, java.lang.Class<T> beanType)Helper method to lookup a spring bean in the context of a request.protected BreadcrumbsgetBreadcrumbs(java.util.List<Breadcrumb> breadcrumbs)protected RequestContextDatagetRequestContextData(javax.servlet.http.HttpServletRequest request)protected voidpopulateJSAddOnVariables(org.springframework.ui.ModelMap model)protected java.util.List<JavaScriptVariableData>retrieveHybrisConvertJSAddOnVariables(org.springframework.ui.ModelMap model)Retrieves the HybrisConvert AddOn JS variables from the model.voidsetConsumedDestinationLocatorStrategy(ConsumedDestinationLocatorStrategy consumedDestinationLocatorStrategy)voidsetContextService(ContextService contextService)voidsetSessionService(SessionService sessionService)protected voidstoreBreadcrumbs(Session currentSession, org.springframework.ui.ModelMap model)protected voidstoreCategory(RequestContextData requestContextData, Session currentSession, org.springframework.ui.ModelMap model)protected voidstoreFacets(Session currentSession, org.springframework.ui.ModelMap model)
-
-
-
Method Detail
-
beforeView
public java.lang.String beforeView(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.ModelMap model, java.lang.String viewName) throws java.lang.Exception- Specified by:
beforeViewin interfaceBeforeViewHandlerAdaptee- Throws:
java.lang.Exception
-
storeCategory
protected void storeCategory(RequestContextData requestContextData, Session currentSession, org.springframework.ui.ModelMap model)
-
storeBreadcrumbs
protected void storeBreadcrumbs(Session currentSession, org.springframework.ui.ModelMap model)
- Parameters:
requestContextData-currentSession-model-
-
getBreadcrumbs
protected Breadcrumbs getBreadcrumbs(java.util.List<Breadcrumb> breadcrumbs)
- Parameters:
breadcrumbs- - list ofBreadcrumb- Returns:
- current breadcrumb trail.
-
storeFacets
protected void storeFacets(Session currentSession, org.springframework.ui.ModelMap model)
-
populateJSAddOnVariables
protected void populateJSAddOnVariables(org.springframework.ui.ModelMap model)
-
retrieveHybrisConvertJSAddOnVariables
protected java.util.List<JavaScriptVariableData> retrieveHybrisConvertJSAddOnVariables(org.springframework.ui.ModelMap model)
Retrieves the HybrisConvert AddOn JS variables from the model.- Parameters:
model-- Returns:
-
getRequestContextData
protected RequestContextData getRequestContextData(javax.servlet.http.HttpServletRequest request)
-
getBean
protected <T> T getBean(javax.servlet.http.HttpServletRequest request, java.lang.String beanName, java.lang.Class<T> beanType)Helper method to lookup a spring bean in the context of a request. This should only be used to lookup beans that are request scoped. The looked up bean is cached in the request attributes so it should not have a narrower scope than request scope. This method should not be used for beans that could be injected into this bean.- Type Parameters:
T- the expected type of the bean- Parameters:
request- the current requestbeanName- the name of the bean to lookupbeanType- the expected type of the bean- Returns:
- the bean found or null
-
setSessionService
public void setSessionService(SessionService sessionService)
-
setContextService
public void setContextService(ContextService contextService)
-
setConsumedDestinationLocatorStrategy
public void setConsumedDestinationLocatorStrategy(ConsumedDestinationLocatorStrategy consumedDestinationLocatorStrategy)
-
-