Class DefaultYmktConsentService
java.lang.Object
com.hybris.ymkt.consent.service.impl.DefaultYmktConsentService
- All Implemented Interfaces:
YmktConsentService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected de.hybris.platform.servicelayer.config.ConfigurationServiceprotected static final Stringprotected de.hybris.platform.commercefacades.consent.ConsentFacadeprotected de.hybris.platform.servicelayer.search.FlexibleSearchServiceprotected de.hybris.platform.servicelayer.session.SessionServiceprotected static final Stringprotected de.hybris.platform.servicelayer.user.UserService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleangetAnonymousUserConsent(String consentID) Read and return consent value from cookie for the current anonymous user's session given a consent template ID.getConsentTemplateID(String consentID) Look-up consent template ID from provided configuration propertyprotected booleangetRegisteredUserConsent(String consentID) Read and return consent value for the current logged-in user given a consent template ID.booleangetUserConsent(String consentID) Consent verification for current session user.booleangetUserConsent(String customerId, String consentId) Consent verification for provided customer.voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) voidsetConsentFacade(de.hybris.platform.commercefacades.consent.ConsentFacade consentFacade) voidsetFlexibleSearchService(de.hybris.platform.servicelayer.search.FlexibleSearchService flexibleSearchService) voidsetSessionService(de.hybris.platform.servicelayer.session.SessionService sessionService) voidsetUserService(de.hybris.platform.servicelayer.user.UserService userService)
-
Field Details
-
CONSENT_GIVEN
- See Also:
-
USER_CONSENTS
- See Also:
-
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 Details
-
DefaultYmktConsentService
public DefaultYmktConsentService()
-
-
Method Details
-
getAnonymousUserConsent
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
Look-up consent template ID from provided configuration property- Parameters:
consentID- String configuration property containing consent template ID- Returns:
- String consent template ID
-
getRegisteredUserConsent
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
Description copied from interface:YmktConsentServiceConsent verification for current session user.- Specified by:
getUserConsentin interfaceYmktConsentService- Parameters:
consentID- Property prefix of yMKT consent Id.- Returns:
trueif the user has consent,falseotherwise.
-
getUserConsent
Description copied from interface:YmktConsentServiceConsent verification for provided customer.- Specified by:
getUserConsentin interfaceYmktConsentService- Parameters:
customerId- Value ofCustomer.customerID.consentId- Value of yMKTConsentTemplate.id.- Returns:
trueif the customer has consent,falseotherwise.
-
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)
-