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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancompareAddress(AddressModel source, AddressModel target) Compares two addresses to determine is they are different based on selected fieldsprotected List<AddressModel>getRelatedAddresses(String sapCustomerId) Retrieves addresses which are related to sapCustomerIdvoidvoidsetFlexibleSearchService(de.hybris.platform.servicelayer.search.FlexibleSearchService flexibleSearchService) protected voidupdateAddress(de.hybris.platform.servicelayer.interceptor.InterceptorContext context, AddressModel source, AddressModel target) Updates an address to match a source
-
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:
onPreparein interfacede.hybris.platform.servicelayer.interceptor.PrepareInterceptor- Throws:
de.hybris.platform.servicelayer.interceptor.InterceptorException
-
getRelatedAddresses
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 addresstarget- target (related) address
-
compareAddress
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)
-