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
  • 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:
      doFilterInternal in class org.springframework.web.filter.OncePerRequestFilter
      Throws:
      javax.servlet.ServletException
      IOException
    • 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:
      shouldNotFilter in class org.springframework.web.filter.OncePerRequestFilter
      Throws:
      javax.servlet.ServletException
    • getConsentService

      public ConsentService getConsentService()
    • setConsentService

      public void setConsentService(ConsentService consentService)
    • isEnabled

      public boolean isEnabled()
    • setEnabled

      public void setEnabled(boolean enabled)
    • getProfileConfigurationService

      public ProfileConfigurationService getProfileConfigurationService()
    • setProfileConfigurationService

      public void setProfileConfigurationService(ProfileConfigurationService profileConfigurationService)
    • setExcludeUrlPatterns

      public void setExcludeUrlPatterns(String excludeUrlPatterns)
    • getSessionService

      public SessionService getSessionService()
    • getUserService

      public UserService getUserService()
    • setUserService

      public void setUserService(UserService userService)
    • setSessionService

      public void setSessionService(SessionService sessionService)