Class DefaultYmktConsentService

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected de.hybris.platform.servicelayer.config.ConfigurationService configurationService  
      protected static java.lang.String CONSENT_GIVEN  
      protected de.hybris.platform.commercefacades.consent.ConsentFacade consentFacade  
      protected de.hybris.platform.servicelayer.search.FlexibleSearchService flexibleSearchService  
      protected de.hybris.platform.servicelayer.session.SessionService sessionService  
      protected static java.lang.String USER_CONSENTS  
      protected de.hybris.platform.servicelayer.user.UserService userService  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean getAnonymousUserConsent​(java.lang.String consentID)
      Read and return consent value from cookie for the current anonymous user's session given a consent template ID.
      protected java.util.Optional<java.lang.String> getConsentTemplateID​(java.lang.String consentID)
      Look-up consent template ID from provided configuration property
      protected boolean getRegisteredUserConsent​(java.lang.String consentID)
      Read and return consent value for the current logged-in user given a consent template ID.
      boolean getUserConsent​(java.lang.String consentID)
      Consent verification for current session user.
      boolean getUserConsent​(java.lang.String customerId, java.lang.String consentId)
      Consent verification for provided customer.
      void setConfigurationService​(de.hybris.platform.servicelayer.config.ConfigurationService configurationService)  
      void setConsentFacade​(de.hybris.platform.commercefacades.consent.ConsentFacade consentFacade)  
      void setFlexibleSearchService​(de.hybris.platform.servicelayer.search.FlexibleSearchService flexibleSearchService)  
      void setSessionService​(de.hybris.platform.servicelayer.session.SessionService sessionService)  
      void setUserService​(de.hybris.platform.servicelayer.user.UserService userService)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • configurationService

        protected de.hybris.platform.servicelayer.config.ConfigurationService configurationService
      • consentFacade

        protected de.hybris.platform.commercefacades.consent.ConsentFacade consentFacade
      • flexibleSearchService

        protected de.hybris.platform.servicelayer.search.FlexibleSearchService flexibleSearchService
      • sessionService

        protected de.hybris.platform.servicelayer.session.SessionService sessionService
      • userService

        protected de.hybris.platform.servicelayer.user.UserService userService
    • Constructor Detail

      • DefaultYmktConsentService

        public DefaultYmktConsentService()
    • Method Detail

      • getAnonymousUserConsent

        protected boolean getAnonymousUserConsent​(java.lang.String consentID)
        Read and return consent value from cookie for the current anonymous user's session given a consent template ID.
        Parameters:
        consentID - String configuration property containing consent template ID
        Returns:
        true if current anonymous user has given consent, false otherwise
      • getConsentTemplateID

        protected java.util.Optional<java.lang.String> getConsentTemplateID​(java.lang.String consentID)
        Look-up consent template ID from provided configuration property
        Parameters:
        consentID - String configuration property containing consent template ID
        Returns:
        String consent template ID
      • getRegisteredUserConsent

        protected boolean getRegisteredUserConsent​(java.lang.String consentID)
        Read and return consent value for the current logged-in user given a consent template ID.
        Parameters:
        consentID - String configuration property containing consent template ID
        Returns:
        true if current logged in user has given consent, false otherwise
      • getUserConsent

        public boolean getUserConsent​(java.lang.String consentID)
        Description copied from interface: YmktConsentService
        Consent verification for current session user.
        Specified by:
        getUserConsent in interface YmktConsentService
        Parameters:
        consentID - Property prefix of yMKT consent Id.
        Returns:
        true if the user has consent, false otherwise.
      • getUserConsent

        public boolean getUserConsent​(java.lang.String customerId,
                                      java.lang.String consentId)
        Description copied from interface: YmktConsentService
        Consent verification for provided customer.
        Specified by:
        getUserConsent in interface YmktConsentService
        Parameters:
        customerId - Value of Customer.customerID.
        consentId - Value of yMKT ConsentTemplate.id.
        Returns:
        true if the customer has consent, false otherwise.
      • setConfigurationService

        public void setConfigurationService​(de.hybris.platform.servicelayer.config.ConfigurationService configurationService)
      • setConsentFacade

        public void setConsentFacade​(de.hybris.platform.commercefacades.consent.ConsentFacade consentFacade)
      • setFlexibleSearchService

        public void setFlexibleSearchService​(de.hybris.platform.servicelayer.search.FlexibleSearchService flexibleSearchService)
      • setSessionService

        public void setSessionService​(de.hybris.platform.servicelayer.session.SessionService sessionService)
      • setUserService

        public void setUserService​(de.hybris.platform.servicelayer.user.UserService userService)