Class 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 Detail

      • DefaultSapC4cAddressInterceptor

        public DefaultSapC4cAddressInterceptor()
    • Method Detail

      • 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
      • 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)