public interface CommerceConsentService
ConsentModel and ConsentTemplateModel.| Modifier and Type | Method and Description |
|---|---|
ConsentModel |
getActiveConsent(CustomerModel customer,
ConsentTemplateModel consentTemplate)
Finds the latest consent for the specified customer and consent template.
|
ConsentModel |
getConsent(java.lang.String consentCode)
Finds the consent for the specified
consentCode |
ConsentTemplateModel |
getConsentTemplate(java.lang.String consentTemplateId,
java.lang.Integer consentTemplateVersion,
BaseSiteModel baseSite)
Finds the consent template for the supplied
consentTemplateId, consentTemplateVersion and
baseSite. |
java.util.List<ConsentTemplateModel> |
getConsentTemplates(BaseSiteModel baseSite)
Finds all the latest versions of consent templates for the given
baseSite. |
ConsentTemplateModel |
getLatestConsentTemplate(java.lang.String consentTemplateId,
BaseSiteModel baseSite)
Finds the latest version of a
ConsentTemplate for the given consentTemplateId and
baseSite. |
void |
giveConsent(CustomerModel customer,
ConsentTemplateModel consentTemplate)
Gives consent for the specified customer and consent template.
|
boolean |
hasEffectivelyActiveConsent(CustomerModel customer,
ConsentTemplateModel consentTemplate)
Checks if a customer has a consent that has not been withdrawn for the specified consent template.
|
void |
withdrawConsent(ConsentModel consent)
Withdraws consent for the specified ConsentModel by updating the consentWithdrawnDate.
1. |
java.util.List<ConsentTemplateModel> getConsentTemplates(BaseSiteModel baseSite)
baseSite.baseSite - the baseSite to retrieve the consent template forConsentTemplateModel getConsentTemplate(java.lang.String consentTemplateId, java.lang.Integer consentTemplateVersion, BaseSiteModel baseSite)
consentTemplateId, consentTemplateVersion and
baseSite.consentTemplateId - the id of the consent templateconsentTemplateVersion - the version of the consent templatebaseSite - the baseSite to retrieve the consent template forConsentTemplateModel getLatestConsentTemplate(java.lang.String consentTemplateId, BaseSiteModel baseSite)
ConsentTemplate for the given consentTemplateId and
baseSite.consentTemplateId - the id of the consent templatebaseSite - the baseSite to retrieve the consent template for.ConsentModel getConsent(java.lang.String consentCode)
consentCodeconsentCode - the consent code to get the consent forConsentModel getActiveConsent(CustomerModel customer, ConsentTemplateModel consentTemplate)
customer - the customer to get the consent forconsentTemplate - the consent template to get the consent forboolean hasEffectivelyActiveConsent(CustomerModel customer, ConsentTemplateModel consentTemplate)
customer - the customer to check the consent forconsentTemplate - the consent template to check the consent forvoid giveConsent(CustomerModel customer, ConsentTemplateModel consentTemplate)
Consent and sets the
consentGivenDate. CommerceConsentGivenExceptioncustomer - the customer to give the consent forconsentTemplate - the consent template to give the consent forvoid withdrawConsent(ConsentModel consent)
Consent.consentWithdrawnDate is
already set calling this method will not overwrite the existing value.consent - the consent to withdraw the consent forCopyright © 2018 SAP SE. All Rights Reserved.