Class ProductConfigUserChangedEventListener
- java.lang.Object
-
- de.hybris.platform.servicelayer.event.impl.AbstractEventListener<AfterSessionUserChangeEvent>
-
- de.hybris.platform.sap.productconfig.services.event.impl.ProductConfigUserChangedEventListener
-
- All Implemented Interfaces:
java.util.EventListener,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<AfterSessionUserChangeEvent>
- Direct Known Subclasses:
ProductConfigUserChangedEventListenerTest.ProductConfigUserChangedEventListenerForTest
public class ProductConfigUserChangedEventListener extends AbstractEventListener<AfterSessionUserChangeEvent>
This bean listens to theAfterSessionUserChangeEvent. It will clear the read cache of the configuration engine for any configuration stored in the user session. This will ensure that configuration data is re-read and that rule evaluation is re-triggered. So rule framework and configuration engine can immediately react on the user change.
Otherwise configuration engine and rules changes would only be visible after the next change of the corresponding configuration.
-
-
Constructor Summary
Constructors Constructor Description ProductConfigUserChangedEventListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ConfigurationLifecycleStrategygetConfigurationLifecycleStrategy()protected UsergetCurrentUser(AfterSessionUserChangeEvent evt)protected ProductConfigEventListenerUtilgetProductConfigEventListenerUtil()protected voidlogUserInfo(AfterSessionUserChangeEvent evt)protected voidonEvent(AfterSessionUserChangeEvent evt)This method is called byApplicationListener.onApplicationEvent(ApplicationEvent)and processes the given event.-
Methods inherited from class de.hybris.platform.servicelayer.event.impl.AbstractEventListener
afterPropertiesSet, onApplicationEvent, setApplicationContext, setClusterService, setTenantService
-
-
-
-
Method Detail
-
onEvent
protected void onEvent(AfterSessionUserChangeEvent evt)
Description copied from class:AbstractEventListenerThis method is called byApplicationListener.onApplicationEvent(ApplicationEvent)and processes the given event.- Specified by:
onEventin classAbstractEventListener<AfterSessionUserChangeEvent>- Parameters:
evt- the event to be processed- See Also:
ApplicationListener.onApplicationEvent(ApplicationEvent)
-
getConfigurationLifecycleStrategy
protected ConfigurationLifecycleStrategy getConfigurationLifecycleStrategy()
-
getProductConfigEventListenerUtil
protected ProductConfigEventListenerUtil getProductConfigEventListenerUtil()
-
logUserInfo
protected void logUserInfo(AfterSessionUserChangeEvent evt)
-
getCurrentUser
protected User getCurrentUser(AfterSessionUserChangeEvent evt)
-
-