Class DefaultOrderPartOfMembersCloningStrategy
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.service.AbstractService
-
- de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
-
- de.hybris.platform.order.strategies.ordercloning.impl.DefaultOrderPartOfMembersCloningStrategy
-
- All Implemented Interfaces:
OrderPartOfMembersCloningStrategy
,java.io.Serializable
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
PaymentOrderPartOfMembersCloningStrategy
public class DefaultOrderPartOfMembersCloningStrategy extends AbstractBusinessService implements OrderPartOfMembersCloningStrategy
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
AbstractService.SerializableDTO
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
modelService, sessionService, txManager
-
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant
-
-
Constructor Summary
Constructors Constructor Description DefaultOrderPartOfMembersCloningStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addressNeedsCloning(AddressModel address, OrderModel order)
Checks according to business strategies whether given address needs to be cloned as a part of order's contract.AddressModel
cloneAddressForOrder(AddressModel address, OrderModel order)
Clones an address and sets the order as the clone's owner.PaymentInfoModel
clonePaymentInfoForOrder(PaymentInfoModel paymentInfo, OrderModel order)
Clones a payment info and sets the order as the clone's owner.boolean
paymentInfoNeedsCloning(PaymentInfoModel paymentInfo, OrderModel order)
Checks according to business strategies whether given payment info needs to be cloned as a part of order's contract.void
setAddressService(AddressService addressService)
void
setPaymentInfoCloningContext(ModelCloningContext paymentInfoCloningContext)
-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManager
-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
-
-
-
Method Detail
-
addressNeedsCloning
public boolean addressNeedsCloning(AddressModel address, OrderModel order)
Description copied from interface:OrderPartOfMembersCloningStrategy
Checks according to business strategies whether given address needs to be cloned as a part of order's contract.- Specified by:
addressNeedsCloning
in interfaceOrderPartOfMembersCloningStrategy
- Returns:
- true if this address needs to be cloned.
-
cloneAddressForOrder
public AddressModel cloneAddressForOrder(AddressModel address, OrderModel order)
Description copied from interface:OrderPartOfMembersCloningStrategy
Clones an address and sets the order as the clone's owner.- Specified by:
cloneAddressForOrder
in interfaceOrderPartOfMembersCloningStrategy
- Parameters:
address
- address to cloneorder
- owning order- Returns:
- cloned but not persisted
AddressModel
instance.
-
clonePaymentInfoForOrder
public PaymentInfoModel clonePaymentInfoForOrder(PaymentInfoModel paymentInfo, OrderModel order)
Description copied from interface:OrderPartOfMembersCloningStrategy
Clones a payment info and sets the order as the clone's owner.- Specified by:
clonePaymentInfoForOrder
in interfaceOrderPartOfMembersCloningStrategy
- Parameters:
paymentInfo
- payment info to cloneorder
- owning order- Returns:
- cloned but not persisted
PaymentInfoModel
instance.
-
paymentInfoNeedsCloning
public boolean paymentInfoNeedsCloning(PaymentInfoModel paymentInfo, OrderModel order)
Description copied from interface:OrderPartOfMembersCloningStrategy
Checks according to business strategies whether given payment info needs to be cloned as a part of order's contract.- Specified by:
paymentInfoNeedsCloning
in interfaceOrderPartOfMembersCloningStrategy
- Returns:
- true if this address needs to be cloned.
-
setAddressService
public void setAddressService(AddressService addressService)
-
setPaymentInfoCloningContext
public void setPaymentInfoCloningContext(ModelCloningContext paymentInfoCloningContext)
-
-