Package de.hybris.platform.order.interceptors
package de.hybris.platform.order.interceptors
-
ClassesClassDescriptionChecks if there are any ZDMVM using the current Currency which is to be deleted and removes the ZDMVM before the currency.Checks if there are any
ZoneDeliveryModeValueModels using the zone to be deleted and removes them.Unit test forClearZDMVZoneRemoveInterceptorCredit card number validator.Before an abstract order entry gets removed, the interceptor marks the owning order as not calculated.For a newAbstractOrderModelthe interceptor adjusts theAbstractOrderModel.CODEaccording to the configuredKeyGenerator.Removes duplicates cloned for the purpose of this order:
AbstractOrderModel.PAYMENTADDRESSAbstractOrderModel.DELIVERYADDRESSAbstractOrderModel.PAYMENTINFOAutomatically clones the order's elements:AbstractOrderModel.PAYMENTINFO,AbstractOrderModel.PAYMENTADDRESSAbstractOrderModel.DELIVERYADDRESSand sets the clones as actual values.
If the cloned elements are clones themselves, the interceptor removes them.Sets default values for the following attributes of newQuoteModelinstances:QuoteModel.STATE,QuoteModel.VERSIONUnit test ofDefaultQuotePrepareInterceptor.Validates the entryGroup structure of the order to avoid cyclic dependencies between groups.Test class forEntryGroupStructureValidateInterceptorIntegration test ofDefaultOrderPrepareInterceptorUnit test ofDefaultOrderPrepareInterceptorIf theCurrencyModelis used in existing orders, the interceptor prevents remove action.If there are still orders usingDeliveryModeModelto be removed, the interceptor stops removal action withInterceptorException.The interceptor performs cascade removal ofDiscountModels having this particular currency.
NOTE:InterceptorMappinghandling this interceptor must be positioned after all interceptors which perform removal checks, i.e:
RemoveCurrencyCheckOrdersInterceptorRemoveBaseCurrencyInterceptorUnit test ofRemoveDiscountsOnCurrencyRemovalInterceptorValidator forZoneDeliveryModeValueModel.Test forZoneDeliveryModeValueValidator.