public abstract class AbstractPlatformFilterChain
extends OncePerRequestFilter
<bean id="aggregationFilter" class="de.hybris.platform.servicelayer.web.AggregationFilter">
<constructor-arg>
<list>
<ref bean="profileFilter"/>
<ref bean="log4jFilter"/>
<ref bean="tenantActivationFilter"/>
<ref bean="sessionFilter"/>
<ref bean="simpleCatalogVersionFilter"/>
</list>
</constructor-arg>
</bean>
In order to use this configured bean instance in your web application, you now have to configure the
DelegatingFilterProxy in the web.xml your web application in order to for your configured aggregationFilter
to be called during request processing. Do not forget to also define the filter mapping to be used:
<filter-mapping>
<filter-name>platformFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Right now there are no filters which allow you to have the following functionality, which have been provided by the
HybrisInitFilter & WebSessionFunctions:
* Dynamic tenant handling: Switching the tenant dynamically by specifying the tenantId as a query parameter. * System Init check: Checking for each request if the hybris system is initialized. * Status pages: Serving special pages to the client if the system is currently shutting down or a special info token is provided.
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractPlatformFilterChain.InternalFilterChain
Simple & straight forward implementation of the FilterChain interface used by the PlatformFilterChain for it's
internal chain.
|
| Constructor and Description |
|---|
AbstractPlatformFilterChain(List<Filter> internalFilters) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doFilterInternal(HttpServletRequest request,
HttpServletResponse response,
FilterChain filterChain) |
protected Collection<String> |
getExcludedUrlPaths() |
protected abstract boolean |
isBackOfficeFilterChain()
Returns true if filter is used in backoffice application.
|
void |
setExcludedUrlPaths(List<String> excludedUrlPaths) |
protected boolean |
shouldBreakFiltering(String requestURI) |
protected static <E extends Throwable> |
throwAnyException(Throwable exception) |
protected static void |
throwUncheckedException(Throwable exception) |
public AbstractPlatformFilterChain(List<Filter> internalFilters)
protected Collection<String> getExcludedUrlPaths()
protected void doFilterInternal(HttpServletRequest request,
HttpServletResponse response,
FilterChain filterChain)
throws ServletException,
IOException
ServletExceptionIOExceptionprotected abstract boolean isBackOfficeFilterChain()
protected boolean shouldBreakFiltering(String requestURI)
protected static void throwUncheckedException(Throwable exception)
Copyright © 2017 SAP SE. All Rights Reserved.