Class DefaultAnonymousConsentFacade
java.lang.Object
de.hybris.platform.commercefacades.consent.impl.DefaultAnonymousConsentFacade
- All Implemented Interfaces:
AnonymousConsentFacade
Default implementation of
AnonymousConsentFacade.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidErase CONSENT_TEMPLATES from session on language changeprotected AnonymousConsentChangeEventFactoryprotected ConsentFacadeprotected Optional<ConsentTemplateData>getConsentTemplateById(List<ConsentTemplateData> consentTemplates, String id) protected List<ConsentTemplateData>protected CustomerAccountServiceprotected EventServiceprotected SessionServiceprotected StoreSessionFacadeprotected UserFacadeprotected AnonymousConsentDatapopulateAnonymousConsentsIntoSession(List<AnonymousConsentData> anonymousConsents) protected voidpublishConsentEvent(String template, String previousValue, String currentValue, Map<String, String> currentConsentMap) voidsetAnonymousConsentChangeEventFactory(AnonymousConsentChangeEventFactory anonymousConsentChangeEventFactory) voidsetConsentFacade(ConsentFacade consentFacade) voidsetCustomerAccountService(CustomerAccountService customerAccountService) voidsetEventService(EventService eventService) voidsetPopulatingConsentsEnabled(boolean populatingConsentsEnabled) Enables populating consents flag in commerceservicesvoidsetSessionService(SessionService sessionService) voidsetStoreSessionFacade(StoreSessionFacade storeSessionFacade) voidsetUserFacade(UserFacade userFacade) voidsynchronizeAnonymousConsents(Supplier<List<AnonymousConsentData>> anonymousConsentReader, Consumer<List<AnonymousConsentData>> anonymousConsentWriter) Synchronizes the supplied list of anonymous consents with its current state and forwards the resulted list.protected List<AnonymousConsentData>updateAnonymousConsents(List<AnonymousConsentData> anonymousConsents) protected voidupdateAnonymousConsentsInSession(List<AnonymousConsentData> anonymousConsents)
-
Constructor Details
-
DefaultAnonymousConsentFacade
public DefaultAnonymousConsentFacade()
-
-
Method Details
-
synchronizeAnonymousConsents
public void synchronizeAnonymousConsents(Supplier<List<AnonymousConsentData>> anonymousConsentReader, Consumer<List<AnonymousConsentData>> anonymousConsentWriter) Description copied from interface:AnonymousConsentFacadeSynchronizes the supplied list of anonymous consents with its current state and forwards the resulted list.- Specified by:
synchronizeAnonymousConsentsin interfaceAnonymousConsentFacade- Parameters:
anonymousConsentReader- anonymous consent reader to supply the list of anonymous consents to synchronizeanonymousConsentWriter- anonymous consent writer to consume the result of synchronization
-
setPopulatingConsentsEnabled
public void setPopulatingConsentsEnabled(boolean populatingConsentsEnabled) Description copied from interface:AnonymousConsentFacadeEnables populating consents flag in commerceservices- Specified by:
setPopulatingConsentsEnabledin interfaceAnonymousConsentFacade
-
checkLanguageChange
protected void checkLanguageChange()Erase CONSENT_TEMPLATES from session on language change -
updateAnonymousConsents
protected List<AnonymousConsentData> updateAnonymousConsents(List<AnonymousConsentData> anonymousConsents) -
getConsentTemplateById
protected Optional<ConsentTemplateData> getConsentTemplateById(List<ConsentTemplateData> consentTemplates, String id) -
populateAnonymousConsentFromTemplate
-
getConsentTemplates
-
updateAnonymousConsentsInSession
-
publishConsentEvent
-
populateAnonymousConsentsIntoSession
protected Map<String,String> populateAnonymousConsentsIntoSession(List<AnonymousConsentData> anonymousConsents) -
getConsentFacade
-
setConsentFacade
-
getSessionService
-
setSessionService
-
getStoreSessionFacade
-
setStoreSessionFacade
-
getUserFacade
-
setUserFacade
-
getEventService
-
setEventService
-
getAnonymousConsentChangeEventFactory
-
setAnonymousConsentChangeEventFactory
public void setAnonymousConsentChangeEventFactory(AnonymousConsentChangeEventFactory anonymousConsentChangeEventFactory) -
getCustomerAccountService
-
setCustomerAccountService
-