Class DefaultSapC4cCustomerInterceptor
java.lang.Object
com.sap.hybris.c4c.customer.interceptor.DefaultSapC4cCustomerInterceptor
- All Implemented Interfaces:
de.hybris.platform.servicelayer.interceptor.Interceptor,de.hybris.platform.servicelayer.interceptor.ValidateInterceptor<CustomerModel>
public class DefaultSapC4cCustomerInterceptor
extends Object
implements de.hybris.platform.servicelayer.interceptor.ValidateInterceptor<CustomerModel>
Intercepts any changes in customer and creates customer update event if any replicated relavant fields are changed
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionde.hybris.platform.servicelayer.config.ConfigurationServicede.hybris.platform.servicelayer.event.EventServicevoidonValidate(CustomerModel customerModel, de.hybris.platform.servicelayer.interceptor.InterceptorContext ctx) voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) voidsetCustomerUtil(SapC4cCustomerUtils customerUtil) voidsetEventService(de.hybris.platform.servicelayer.event.EventService eventService) protected booleanshouldReplicate(CustomerModel customerModel, de.hybris.platform.servicelayer.interceptor.InterceptorContext ctx) Checks if any replicated relavant fields are modified and returns a boolean
-
Constructor Details
-
DefaultSapC4cCustomerInterceptor
public DefaultSapC4cCustomerInterceptor()
-
-
Method Details
-
onValidate
public void onValidate(CustomerModel customerModel, de.hybris.platform.servicelayer.interceptor.InterceptorContext ctx) throws de.hybris.platform.servicelayer.interceptor.InterceptorException - Specified by:
onValidatein interfacede.hybris.platform.servicelayer.interceptor.ValidateInterceptor<CustomerModel>- Throws:
de.hybris.platform.servicelayer.interceptor.InterceptorException
-
shouldReplicate
protected boolean shouldReplicate(CustomerModel customerModel, de.hybris.platform.servicelayer.interceptor.InterceptorContext ctx) Checks if any replicated relavant fields are modified and returns a boolean -
getEventService
public de.hybris.platform.servicelayer.event.EventService getEventService()- Returns:
- the eventService
-
setEventService
public void setEventService(de.hybris.platform.servicelayer.event.EventService eventService) - Parameters:
eventService- the eventService to set
-
getCustomerUtil
- Returns:
- the customerUtil
-
setCustomerUtil
- Parameters:
customerUtil- the customerUtil to set
-
getConfigurationService
public de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService() -
setConfigurationService
public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService)
-