Class DefaultSapC4cAddressInterceptor
- java.lang.Object
-
- com.sap.hybris.c4c.customer.interceptor.DefaultSapC4cAddressInterceptor
-
- All Implemented Interfaces:
de.hybris.platform.servicelayer.interceptor.Interceptor,de.hybris.platform.servicelayer.interceptor.RemoveInterceptor<AddressModel>,de.hybris.platform.servicelayer.interceptor.ValidateInterceptor<AddressModel>
public class DefaultSapC4cAddressInterceptor extends java.lang.Object implements de.hybris.platform.servicelayer.interceptor.ValidateInterceptor<AddressModel>, de.hybris.platform.servicelayer.interceptor.RemoveInterceptor<AddressModel>
Intercepts any changes in address and creates customer update event if any replicated relavant fields are changed
-
-
Constructor Summary
Constructors Constructor Description DefaultSapC4cAddressInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>getAddressAttributeList()de.hybris.platform.servicelayer.config.ConfigurationServicegetConfigurationService()SapC4cCustomerUtilsgetCustomerUtil()de.hybris.platform.servicelayer.event.EventServicegetEventService()voidonRemove(AddressModel addressModel, de.hybris.platform.servicelayer.interceptor.InterceptorContext ctx)voidonValidate(AddressModel addressModel, de.hybris.platform.servicelayer.interceptor.InterceptorContext ctx)voidsetAddressAttributeList(java.util.List<java.lang.String> addressAttributeList)voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService)voidsetCustomerUtil(SapC4cCustomerUtils customerUtil)voidsetEventService(de.hybris.platform.servicelayer.event.EventService eventService)protected booleanshouldReplicate(AddressModel addressModel, de.hybris.platform.servicelayer.interceptor.InterceptorContext ctx)Checks if any replicated relevant fields are modified and returns a boolean
-
-
-
Method Detail
-
onValidate
public void onValidate(AddressModel addressModel, de.hybris.platform.servicelayer.interceptor.InterceptorContext ctx) throws de.hybris.platform.servicelayer.interceptor.InterceptorException
- Specified by:
onValidatein interfacede.hybris.platform.servicelayer.interceptor.ValidateInterceptor<AddressModel>- Throws:
de.hybris.platform.servicelayer.interceptor.InterceptorException
-
onRemove
public void onRemove(AddressModel addressModel, de.hybris.platform.servicelayer.interceptor.InterceptorContext ctx) throws de.hybris.platform.servicelayer.interceptor.InterceptorException
- Specified by:
onRemovein interfacede.hybris.platform.servicelayer.interceptor.RemoveInterceptor<AddressModel>- Throws:
de.hybris.platform.servicelayer.interceptor.InterceptorException
-
shouldReplicate
protected boolean shouldReplicate(AddressModel addressModel, de.hybris.platform.servicelayer.interceptor.InterceptorContext ctx)
Checks if any replicated relevant 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
public SapC4cCustomerUtils getCustomerUtil()
- Returns:
- the customerUtil
-
setCustomerUtil
public void setCustomerUtil(SapC4cCustomerUtils customerUtil)
- Parameters:
customerUtil- the customerUtil to set
-
getAddressAttributeList
public java.util.List<java.lang.String> getAddressAttributeList()
- Returns:
- list of address attributes
-
setAddressAttributeList
public void setAddressAttributeList(java.util.List<java.lang.String> addressAttributeList)
- Parameters:
addressAttributeList- list of address attributes
-
getConfigurationService
public de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService()
-
setConfigurationService
public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService)
-
-