public class DefaultSapC4cAddressInterceptor extends java.lang.Object implements ValidateInterceptor<AddressModel>, RemoveInterceptor<AddressModel>
| Constructor and Description |
|---|
DefaultSapC4cAddressInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
getAddressAttributeList() |
SapC4cCustomerUtils |
getCustomerUtil() |
EventService |
getEventService() |
void |
onRemove(AddressModel addressModel,
InterceptorContext ctx)
Called in the
modelService.removeAll() method. |
void |
onValidate(AddressModel addressModel,
InterceptorContext ctx)
Called in the
modelService.saveAll() method. |
void |
setAddressAttributeList(java.util.List<java.lang.String> addressAttributeList) |
void |
setCustomerUtil(SapC4cCustomerUtils customerUtil) |
void |
setEventService(EventService eventService) |
protected boolean |
shouldReplicate(AddressModel addressModel,
InterceptorContext ctx)
Checks if any replicated relevant fields are modified and returns a boolean
|
public void onValidate(AddressModel addressModel, InterceptorContext ctx) throws InterceptorException
ValidateInterceptormodelService.saveAll() method. Validates the values of the given model.onValidate in interface ValidateInterceptor<AddressModel>addressModel - the model which values has to be validatedctx - the InterceptorContextInterceptorException - if any values of the model are not valid.public void onRemove(AddressModel addressModel, InterceptorContext ctx) throws InterceptorException
RemoveInterceptormodelService.removeAll() method.onRemove in interface RemoveInterceptor<AddressModel>addressModel - the model which should be removedctx - the InterceptorContextInterceptorException - if the remove reports an errorprotected boolean shouldReplicate(AddressModel addressModel, InterceptorContext ctx)
public EventService getEventService()
public void setEventService(EventService eventService)
eventService - the eventService to setpublic SapC4cCustomerUtils getCustomerUtil()
public void setCustomerUtil(SapC4cCustomerUtils customerUtil)
customerUtil - the customerUtil to setpublic java.util.List<java.lang.String> getAddressAttributeList()
public void setAddressAttributeList(java.util.List<java.lang.String> addressAttributeList)
addressAttributeList - list of address attributesCopyright © 2018 SAP SE. All Rights Reserved.