Class DefaultSAPCustomerAddressConsistencyInterceptor

java.lang.Object
com.sap.hybris.sapcustomerb2b.inbound.DefaultSAPCustomerAddressConsistencyInterceptor
All Implemented Interfaces:
de.hybris.platform.servicelayer.interceptor.Interceptor, de.hybris.platform.servicelayer.interceptor.PrepareInterceptor
Direct Known Subclasses:
SapCpiB2BUnitAddressInterceptor

public class DefaultSAPCustomerAddressConsistencyInterceptor extends 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 Details

    • DefaultSAPCustomerAddressConsistencyInterceptor

      public DefaultSAPCustomerAddressConsistencyInterceptor()
  • Method Details

    • onPrepare

      public void onPrepare(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 List<AddressModel> getRelatedAddresses(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)