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 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 Details

    • DefaultSapC4cAddressInterceptor

      public DefaultSapC4cAddressInterceptor()
  • Method Details

    • onValidate

      public void onValidate(AddressModel addressModel, de.hybris.platform.servicelayer.interceptor.InterceptorContext ctx) throws de.hybris.platform.servicelayer.interceptor.InterceptorException
      Specified by:
      onValidate in interface de.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:
      onRemove in interface de.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 List<String> getAddressAttributeList()
      Returns:
      list of address attributes
    • setAddressAttributeList

      public void setAddressAttributeList(List<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)