Package de.hybris.platform.util
Class HybrisInitFilter
java.lang.Object
de.hybris.platform.util.RootRequestFilter
de.hybris.platform.util.HybrisInitFilter
- All Implemented Interfaces:
javax.servlet.Filter
- Direct Known Subclasses:
WebServicesInitFilter
Deprecated, for removal: This API element is subject to removal in a future version.
since 5.0, please use the filter chain.
Filter that will do initialization work for each web application which include:
- Getting the JaloSession from the HttpSession or, if not available, create a new JaloSession
- Activate this JaloSession so that calls to JaloSession.getCurrentSession() can be performed.
- Register the core beans (ItemBean and ObjectBean)
- Iterate through all managers and call the doPreRequest(..) method.
Install the filter in your web.xml file as follows. Note that the mapping should be changed according to your needs.
<filter> <filter-name>hybrisinitfilter</filter-name> <filter-class>de.hybris.platform.util.HybrisInitFilter</filter-class> </filter> <filter-mapping> <filter-name>hybrisinitfilter</filter-name> <url-pattern>*.jsp</url-pattern> </filter-mapping> <filter-mapping> <filter-name>hybrisinitfilter</filter-name> <url-pattern>*.do</url-pattern> </filter-mapping>
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.util.RootRequestFilter
RootRequestFilter.HybrisGZIPResponseWrapper, RootRequestFilter.HybrisRequestWrapper, RootRequestFilter.HybrisResponseWrapper, RootRequestFilter.HybrisSessionWrapper, RootRequestFilter.Params, RootRequestFilter.TenantInformation -
Field Summary
Fields inherited from class de.hybris.platform.util.RootRequestFilter
DEFAULT_MATCHER_PATTERN, DEFAULT_TENANTID_COOKIE_NAME, SERVLET_COMPATIBILITY, TENANT_ATTRIBUTE_MAP_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoiddoPostRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Deprecated, for removal: This API element is subject to removal in a future version.This method is called once after the chained request is called.booleandoPreRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Deprecated, for removal: This API element is subject to removal in a future version.This method is called once before the chained request is called.protected JaloSessiongetJaloSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean pre) Deprecated, for removal: This API element is subject to removal in a future version.protected StringDeprecated, for removal: This API element is subject to removal in a future version.voidinit(javax.servlet.FilterConfig filterConfig) Deprecated, for removal: This API element is subject to removal in a future version.protected StringDeprecated, for removal: This API element is subject to removal in a future version.protected voidnotifyExtensions(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean pre) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class de.hybris.platform.util.RootRequestFilter
adjustEncodings, assertValidTenantID, assignCurrentRequestToThread, assureNeverCalledBefore, clearCurrentRequestFromThread, destroy, doFilter, doForward, getCurrentTenant, getFilterConfig, getSlaveDataSourceID, getTenantInformationFrom, getTenantSystemID, getURI, handleSlaveSettings, handleTenantID, isSkippedInitSystemTest, matchTenantSystemIDHost, setSkippedInitSystemTest, setSlaveDataSourceID, setTenantID, touchHttpSession, wrapRequest, wrapResponse, writeShutDownPage
-
Constructor Details
-
HybrisInitFilter
public HybrisInitFilter()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
init
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
initin interfacejavax.servlet.Filter- Overrides:
initin classRootRequestFilter- Throws:
javax.servlet.ServletException
-
doPreRequest
public boolean doPreRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:RootRequestFilterThis method is called once before the chained request is called.- Overrides:
doPreRequestin classRootRequestFilter- Returns:
- true if the request should be processed
- Throws:
javax.servlet.ServletException
-
notifyExtensions
protected void notifyExtensions(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean pre) Deprecated, for removal: This API element is subject to removal in a future version. -
doPostRequest
public void doPostRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:RootRequestFilterThis method is called once after the chained request is called.- Overrides:
doPostRequestin classRootRequestFilter- Throws:
javax.servlet.ServletException
-
getLoginCookieName
Deprecated, for removal: This API element is subject to removal in a future version. -
getJaloSession
protected JaloSession getJaloSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean pre) throws JaloConnectException Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
JaloConnectException
-
matchTenantSystemIDToken
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
matchTenantSystemIDTokenin classRootRequestFilter
-