Class ConsentLayerFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
com.hybris.yprofile.consent.filters.ConsentLayerFilter
- 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 ConsentLayerFilter
extends org.springframework.web.filter.OncePerRequestFilter
Generates the consent reference for the user and stores it in a cookie and in session
-
Field Summary
Fields inherited from class org.springframework.web.filter.OncePerRequestFilter
ALREADY_FILTERED_SUFFIXFields inherited from class org.springframework.web.filter.GenericFilterBean
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoFilterInternal(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, javax.servlet.FilterChain filterChain) protected booleanbooleanprotected booleanisProfileTrackingConsentGiven(javax.servlet.http.HttpServletRequest httpServletRequest) protected booleanisProfileTrackingPaused(javax.servlet.http.HttpServletRequest httpServletRequest) voidrunFilterLogic(javax.servlet.http.HttpServletRequest httpServletRequest) protected voidrunFilterLogic(javax.servlet.http.HttpServletRequest httpServletRequest, Optional<javax.servlet.http.HttpServletResponse> httpServletResponse) voidsetConsentService(ConsentService consentService) voidsetEnabled(boolean enabled) voidsetExcludeUrlPatterns(String excludeUrlPatterns) voidsetProfileConfigurationService(ProfileConfigurationService profileConfigurationService) protected voidsetProfileConsentCookieAndSession(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, boolean profileTrackingConsentGiven) protected voidsetProfileIdCookieInSession(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) voidsetSessionService(SessionService sessionService) voidsetUserService(UserService userService) protected booleanshouldNotFilter(javax.servlet.http.HttpServletRequest request) Methods inherited from class org.springframework.web.filter.OncePerRequestFilter
doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatchMethods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
-
Constructor Details
-
ConsentLayerFilter
public ConsentLayerFilter()
-
-
Method Details
-
doFilterInternal
protected void doFilterInternal(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, javax.servlet.FilterChain filterChain) throws javax.servlet.ServletException, IOException - Specified by:
doFilterInternalin classorg.springframework.web.filter.OncePerRequestFilter- Throws:
javax.servlet.ServletExceptionIOException
-
runFilterLogic
public void runFilterLogic(javax.servlet.http.HttpServletRequest httpServletRequest) -
runFilterLogic
protected void runFilterLogic(javax.servlet.http.HttpServletRequest httpServletRequest, Optional<javax.servlet.http.HttpServletResponse> httpServletResponse) -
isProfileTrackingPaused
protected boolean isProfileTrackingPaused(javax.servlet.http.HttpServletRequest httpServletRequest) -
isProfileTrackingConsentGiven
protected boolean isProfileTrackingConsentGiven(javax.servlet.http.HttpServletRequest httpServletRequest) -
setProfileConsentCookieAndSession
protected void setProfileConsentCookieAndSession(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, boolean profileTrackingConsentGiven) -
setProfileIdCookieInSession
protected void setProfileIdCookieInSession(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) -
isActiveAccount
protected boolean isActiveAccount() -
shouldNotFilter
protected boolean shouldNotFilter(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException - Overrides:
shouldNotFilterin classorg.springframework.web.filter.OncePerRequestFilter- Throws:
javax.servlet.ServletException
-
getConsentService
-
setConsentService
-
isEnabled
public boolean isEnabled() -
setEnabled
public void setEnabled(boolean enabled) -
getProfileConfigurationService
-
setProfileConfigurationService
-
setExcludeUrlPatterns
-
getSessionService
-
getUserService
-
setUserService
-
setSessionService
-