Class DefaultSAPCustomerAddressConsistencyInterceptor

  • All Implemented Interfaces:
    de.hybris.platform.servicelayer.interceptor.Interceptor, de.hybris.platform.servicelayer.interceptor.PrepareInterceptor
    Direct Known Subclasses:
    SapCpiB2BUnitAddressInterceptor

    public class DefaultSAPCustomerAddressConsistencyInterceptor
    extends java.lang.Object
    implements de.hybris.platform.servicelayer.interceptor.PrepareInterceptor
    PrepareInterceptor for the handling of SAP addresses insure that the address for all which are related to a SAP ERP Customer are in sync
    • Constructor Detail

      • DefaultSAPCustomerAddressConsistencyInterceptor

        public DefaultSAPCustomerAddressConsistencyInterceptor()
    • Method Detail

      • onPrepare

        public void onPrepare​(java.lang.Object model,
                              de.hybris.platform.servicelayer.interceptor.InterceptorContext context)
                       throws de.hybris.platform.servicelayer.interceptor.InterceptorException
        Specified by:
        onPrepare in interface de.hybris.platform.servicelayer.interceptor.PrepareInterceptor
        Throws:
        de.hybris.platform.servicelayer.interceptor.InterceptorException
      • getRelatedAddresses

        protected java.util.List<AddressModel> getRelatedAddresses​(java.lang.String sapCustomerId)
        Retrieves addresses which are related to sapCustomerId
        Parameters:
        sapCustomerId -
        Returns:
      • updateAddress

        protected void updateAddress​(de.hybris.platform.servicelayer.interceptor.InterceptorContext context,
                                     AddressModel source,
                                     AddressModel target)
        Updates an address to match a source
        Parameters:
        context -
        source - Source address
        target - target (related) address
      • compareAddress

        protected boolean compareAddress​(AddressModel source,
                                         AddressModel target)
        Compares two addresses to determine is they are different based on selected fields
        Parameters:
        source -
        target -
        Returns:
        true if one or more fields are different, false is they are identical or it's the same PK
      • setFlexibleSearchService

        public void setFlexibleSearchService​(de.hybris.platform.servicelayer.search.FlexibleSearchService flexibleSearchService)