Interface OrderPartOfMembersCloningStrategy
- All Known Implementing Classes:
DefaultOrderPartOfMembersCloningStrategy,PaymentOrderPartOfMembersCloningStrategy
public interface OrderPartOfMembersCloningStrategy
Defines a strategy for cloning the order's contract members. Regulates the rules whether:
need to be cloned for the given case. Allow to trigger cloning actions.
need to be cloned for the given case. Allow to trigger cloning actions.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddressNeedsCloning(AddressModel address, OrderModel order) Checks according to business strategies whether given address needs to be cloned as a part of order's contract.cloneAddressForOrder(AddressModel address, OrderModel order) Clones an address and sets the order as the clone's owner.clonePaymentInfoForOrder(PaymentInfoModel paymentInfo, OrderModel order) Clones a payment info and sets the order as the clone's owner.booleanpaymentInfoNeedsCloning(PaymentInfoModel paymentInfo, OrderModel order) Checks according to business strategies whether given payment info needs to be cloned as a part of order's contract.
-
Method Details
-
cloneAddressForOrder
Clones an address and sets the order as the clone's owner.- Parameters:
address- address to cloneorder- owning order- Returns:
- cloned but not persisted
AddressModelinstance.
-
addressNeedsCloning
Checks according to business strategies whether given address needs to be cloned as a part of order's contract.- Parameters:
address-order-- Returns:
- true if this address needs to be cloned.
- Throws:
IllegalArgumentException- if order is null
-
clonePaymentInfoForOrder
Clones a payment info and sets the order as the clone's owner.- Parameters:
paymentInfo- payment info to cloneorder- owning order- Returns:
- cloned but not persisted
PaymentInfoModelinstance.
-
paymentInfoNeedsCloning
Checks according to business strategies whether given payment info needs to be cloned as a part of order's contract.- Parameters:
paymentInfo-order-- Returns:
- true if this address needs to be cloned.
- Throws:
IllegalArgumentException- if order is null
-