Class ConsentFilter

java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
de.hybris.platform.ycommercewebservices.filter.ConsentFilter
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 ConsentFilter extends org.springframework.web.filter.OncePerRequestFilter
Filter which handle consent for customers.
For anonymous users it reads consent cookie and based on it sets proper consent in session.
For customers it reads consent from database and it sets proper consent in session.
  • Constructor Details

    • ConsentFilter

      public ConsentFilter()
  • Method Details

    • doFilterInternal

      protected void doFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain) throws javax.servlet.ServletException, IOException
      Specified by:
      doFilterInternal in class org.springframework.web.filter.OncePerRequestFilter
      Throws:
      javax.servlet.ServletException
      IOException
    • readConsentHeaders

      protected List<AnonymousConsentData> readConsentHeaders(javax.servlet.http.HttpServletRequest request)
    • writeConsentHeaders

      protected void writeConsentHeaders(javax.servlet.http.HttpServletResponse response, List<AnonymousConsentData> consents)
    • getUserFacade

      protected UserFacade getUserFacade()
    • setUserFacade

      public void setUserFacade(UserFacade userFacade)
    • getBaseSiteService

      protected BaseSiteService getBaseSiteService()
    • setBaseSiteService

      public void setBaseSiteService(BaseSiteService baseSiteService)
    • getAnonymousConsentFacade

      protected AnonymousConsentFacade getAnonymousConsentFacade()
    • setAnonymousConsentFacade

      public void setAnonymousConsentFacade(AnonymousConsentFacade anonymousConsentFacade)
    • getCustomerConsentDataStrategy

      protected CustomerConsentDataStrategy getCustomerConsentDataStrategy()
    • setCustomerConsentDataStrategy

      public void setCustomerConsentDataStrategy(CustomerConsentDataStrategy customerConsentDataStrategy)
    • isPopulatingConsentsEnabled

      protected boolean isPopulatingConsentsEnabled()
    • setPopulatingConsentsEnabled

      public void setPopulatingConsentsEnabled(boolean populatingConsentsEnabled)