Class DefaultAnonymousConsentFacade
- java.lang.Object
-
- de.hybris.platform.commercefacades.consent.impl.DefaultAnonymousConsentFacade
-
- All Implemented Interfaces:
AnonymousConsentFacade
public class DefaultAnonymousConsentFacade extends java.lang.Object implements AnonymousConsentFacade
Default implementation ofAnonymousConsentFacade.
-
-
Constructor Summary
Constructors Constructor Description DefaultAnonymousConsentFacade()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckLanguageChange()Erase CONSENT_TEMPLATES from session on language changeprotected AnonymousConsentChangeEventFactorygetAnonymousConsentChangeEventFactory()protected ConsentFacadegetConsentFacade()protected java.util.Optional<ConsentTemplateData>getConsentTemplateById(java.util.List<ConsentTemplateData> consentTemplates, java.lang.String id)protected java.util.List<ConsentTemplateData>getConsentTemplates()protected EventServicegetEventService()protected SessionServicegetSessionService()protected StoreSessionFacadegetStoreSessionFacade()protected UserFacadegetUserFacade()protected AnonymousConsentDatapopulateAnonymousConsentFromTemplate(ConsentTemplateData template)protected java.util.Map<java.lang.String,java.lang.String>populateAnonymousConsentsIntoSession(java.util.List<AnonymousConsentData> anonymousConsents)protected voidpublishConsentEvent(java.lang.String template, java.lang.String previousValue, java.lang.String currentValue, java.util.Map<java.lang.String,java.lang.String> currentConsentMap)voidsetAnonymousConsentChangeEventFactory(AnonymousConsentChangeEventFactory anonymousConsentChangeEventFactory)voidsetConsentFacade(ConsentFacade consentFacade)voidsetEventService(EventService eventService)voidsetSessionService(SessionService sessionService)voidsetStoreSessionFacade(StoreSessionFacade storeSessionFacade)voidsetUserFacade(UserFacade userFacade)voidsynchronizeAnonymousConsents(java.util.function.Supplier<java.util.List<AnonymousConsentData>> anonymousConsentReader, java.util.function.Consumer<java.util.List<AnonymousConsentData>> anonymousConsentWriter)Synchronizes the supplied list of anonymous consents with its current state and forwards the resulted list.protected java.util.List<AnonymousConsentData>updateAnonymousConsents(java.util.List<AnonymousConsentData> anonymousConsents)protected voidupdateAnonymousConsentsInSession(java.util.List<AnonymousConsentData> anonymousConsents)
-
-
-
Method Detail
-
synchronizeAnonymousConsents
public void synchronizeAnonymousConsents(java.util.function.Supplier<java.util.List<AnonymousConsentData>> anonymousConsentReader, java.util.function.Consumer<java.util.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
-
checkLanguageChange
protected void checkLanguageChange()
Erase CONSENT_TEMPLATES from session on language change
-
updateAnonymousConsents
protected java.util.List<AnonymousConsentData> updateAnonymousConsents(java.util.List<AnonymousConsentData> anonymousConsents)
-
getConsentTemplateById
protected java.util.Optional<ConsentTemplateData> getConsentTemplateById(java.util.List<ConsentTemplateData> consentTemplates, java.lang.String id)
-
populateAnonymousConsentFromTemplate
protected AnonymousConsentData populateAnonymousConsentFromTemplate(ConsentTemplateData template)
-
getConsentTemplates
protected java.util.List<ConsentTemplateData> getConsentTemplates()
-
updateAnonymousConsentsInSession
protected void updateAnonymousConsentsInSession(java.util.List<AnonymousConsentData> anonymousConsents)
-
publishConsentEvent
protected void publishConsentEvent(java.lang.String template, java.lang.String previousValue, java.lang.String currentValue, java.util.Map<java.lang.String,java.lang.String> currentConsentMap)
-
populateAnonymousConsentsIntoSession
protected java.util.Map<java.lang.String,java.lang.String> populateAnonymousConsentsIntoSession(java.util.List<AnonymousConsentData> anonymousConsents)
-
getConsentFacade
protected ConsentFacade getConsentFacade()
-
setConsentFacade
public void setConsentFacade(ConsentFacade consentFacade)
-
getSessionService
protected SessionService getSessionService()
-
setSessionService
public void setSessionService(SessionService sessionService)
-
getStoreSessionFacade
protected StoreSessionFacade getStoreSessionFacade()
-
setStoreSessionFacade
public void setStoreSessionFacade(StoreSessionFacade storeSessionFacade)
-
getUserFacade
protected UserFacade getUserFacade()
-
setUserFacade
public void setUserFacade(UserFacade userFacade)
-
getEventService
protected EventService getEventService()
-
setEventService
public void setEventService(EventService eventService)
-
getAnonymousConsentChangeEventFactory
protected AnonymousConsentChangeEventFactory getAnonymousConsentChangeEventFactory()
-
setAnonymousConsentChangeEventFactory
public void setAnonymousConsentChangeEventFactory(AnonymousConsentChangeEventFactory anonymousConsentChangeEventFactory)
-
-