Class RestSessionDataInjectionFilter
- java.lang.Object
-
- org.springframework.web.filter.GenericFilterBean
-
- de.hybris.platform.cmswebservices.filter.RestSessionDataInjectionFilter
-
- All Implemented Interfaces:
javax.servlet.Filter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.EnvironmentAware,org.springframework.core.env.EnvironmentCapable,org.springframework.web.context.ServletContextAware
public class RestSessionDataInjectionFilter extends org.springframework.web.filter.GenericFilterBeanFilter that creates a new session for the request and injects data into the session with restrictions disabled. This filter is designed to create a new session and to inject any pertinent data into the current session, e.g. all the catalog versions, before dispatching to the controller.This filter wraps the
ServletRequestinto aMultiReadHttpServletRequestsuch that the request body can be read multiple times without closing the input stream. This is useful forde.hybris.platform.cmswebservices.interceptor.CatalogVersionPermissionInterceptor#preHandle()when processing POST requests.
-
-
Constructor Summary
Constructors Constructor Description RestSessionDataInjectionFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain filterChain)protected CatalogVersionServicegetCatalogVersionService()protected SearchRestrictionServicegetSearchRestrictionService()protected SessionServicegetSessionService()voidsetCatalogVersionService(CatalogVersionService catalogVersionService)voidsetSearchRestrictionService(SearchRestrictionService searchRestrictionService)voidsetSessionService(SessionService sessionService)
-
-
-
Method Detail
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain filterChain) throws java.io.IOException, javax.servlet.ServletException- Throws:
java.io.IOExceptionjavax.servlet.ServletException
-
getSessionService
protected SessionService getSessionService()
-
setSessionService
public void setSessionService(SessionService sessionService)
-
getSearchRestrictionService
protected SearchRestrictionService getSearchRestrictionService()
-
setSearchRestrictionService
public void setSearchRestrictionService(SearchRestrictionService searchRestrictionService)
-
getCatalogVersionService
protected CatalogVersionService getCatalogVersionService()
-
setCatalogVersionService
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
-
-