public class DefaultYmktConsentService extends java.lang.Object implements YmktConsentService
| Modifier and Type | Field and Description |
|---|---|
protected ConfigurationService |
configurationService |
protected static java.lang.String |
CONSENT_GIVEN |
protected ConsentFacade |
consentFacade |
protected FlexibleSearchService |
flexibleSearchService |
protected SessionService |
sessionService |
protected static java.lang.String |
USER_CONSENTS |
protected UserService |
userService |
| Constructor and Description |
|---|
DefaultYmktConsentService() |
| Modifier and Type | Method and 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(ConfigurationService configurationService) |
void |
setConsentFacade(ConsentFacade consentFacade) |
void |
setFlexibleSearchService(FlexibleSearchService flexibleSearchService) |
void |
setSessionService(SessionService sessionService) |
void |
setUserService(UserService userService) |
protected static final java.lang.String CONSENT_GIVEN
protected static final java.lang.String USER_CONSENTS
protected ConfigurationService configurationService
protected ConsentFacade consentFacade
protected FlexibleSearchService flexibleSearchService
protected SessionService sessionService
protected UserService userService
protected boolean getAnonymousUserConsent(java.lang.String consentID)
consentID - String configuration property containing consent template IDprotected java.util.Optional<java.lang.String> getConsentTemplateID(java.lang.String consentID)
consentID - String configuration property containing consent template IDprotected boolean getRegisteredUserConsent(java.lang.String consentID)
consentID - String configuration property containing consent template IDpublic boolean getUserConsent(java.lang.String consentID)
YmktConsentServicegetUserConsent in interface YmktConsentServiceconsentID - Property prefix of yMKT consent Id.true if the user has consent, false otherwise.public boolean getUserConsent(java.lang.String customerId,
java.lang.String consentId)
YmktConsentServicegetUserConsent in interface YmktConsentServicecustomerId - Value of Customer.customerID.consentId - Value of yMKT ConsentTemplate.id.true if the customer has consent, false otherwise.public void setConfigurationService(ConfigurationService configurationService)
public void setConsentFacade(ConsentFacade consentFacade)
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
public void setSessionService(SessionService sessionService)
public void setUserService(UserService userService)
Copyright © 2018 SAP SE. All Rights Reserved.