public class DefaultConsentFacade extends java.lang.Object implements ConsentFacade
ConsentFacade.| Constructor and Description |
|---|
DefaultConsentFacade() |
| Modifier and Type | Method and Description |
|---|---|
protected BaseSiteService |
getBaseSiteService() |
protected CommerceConsentService |
getCommerceConsentService() |
protected Converter<ConsentTemplateModel,ConsentTemplateData> |
getConsentTemplateConverter() |
java.util.List<ConsentTemplateData> |
getConsentTemplatesWithConsents()
Gets the list of consent templates available for the current base site (in their latest version) along with
current user consents embedded in
ConsentTemplateData.consentData. |
ConsentTemplateData |
getLatestConsentTemplate(java.lang.String consentTemplateId)
Gets the latest consent template for the specified
consentTemplateId and the current base site. |
protected UserService |
getUserService() |
void |
giveConsent(java.lang.String consentTemplateId,
java.lang.Integer consentTemplateVersion)
Gives consent for the specified
consentTemplateId and consentTemplateVersion, the
current base site and current user. |
void |
setBaseSiteService(BaseSiteService baseSiteService) |
void |
setCommerceConsentService(CommerceConsentService commerceConsentService) |
void |
setConsentTemplateConverter(Converter<ConsentTemplateModel,ConsentTemplateData> consentTemplateConverter) |
void |
setUserService(UserService userService) |
void |
withdrawConsent(java.lang.String consentCode)
Withdraws consent for the specified
consentCode. |
public ConsentTemplateData getLatestConsentTemplate(java.lang.String consentTemplateId)
ConsentFacadeconsentTemplateId and the current base site.getLatestConsentTemplate in interface ConsentFacadeconsentTemplateId - the id of the consent template to retrieve the consent for. Should be a valid id for a
ConsentTemplateModel.public java.util.List<ConsentTemplateData> getConsentTemplatesWithConsents()
ConsentFacadeConsentTemplateData.consentData.getConsentTemplatesWithConsents in interface ConsentFacadepublic void giveConsent(java.lang.String consentTemplateId,
java.lang.Integer consentTemplateVersion)
ConsentFacadeconsentTemplateId and consentTemplateVersion, the
current base site and current user. If no Consent is found for the specified Consent Template, or if a Consent
exists but is withdrawn (i.e. the withdrawal date is not null), a new Consent is created with the current date set
to consentGivenDate attribute.giveConsent in interface ConsentFacadeconsentTemplateId - the id of the consent template to give the consent for. Should be a valid id for a
ConsentTemplateModel.consentTemplateVersion - the version of the consent template to give the consent forCommerceConsentService.giveConsent(CustomerModel,
ConsentTemplateModel)public void withdrawConsent(java.lang.String consentCode)
ConsentFacadeconsentCode. If the given Consent has been withdrawn already,
nothing happenswithdrawConsent in interface ConsentFacadeconsentCode - the code of the user consent to withdrawCommerceConsentService.withdrawConsent(de.hybris.platform.commerceservices.model.consent.ConsentModel)protected UserService getUserService()
public void setUserService(UserService userService)
protected CommerceConsentService getCommerceConsentService()
public void setCommerceConsentService(CommerceConsentService commerceConsentService)
protected Converter<ConsentTemplateModel,ConsentTemplateData> getConsentTemplateConverter()
public void setConsentTemplateConverter(Converter<ConsentTemplateModel,ConsentTemplateData> consentTemplateConverter)
protected BaseSiteService getBaseSiteService()
public void setBaseSiteService(BaseSiteService baseSiteService)
Copyright © 2018 SAP SE. All Rights Reserved.