|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.commerce.order.edit.CloneEditHandler atg.commerce.order.edit.CollectionEditHandler atg.commerce.order.edit.ListEditHandler atg.commerce.order.edit.RelationshipEditHandler
public class RelationshipEditHandler
This handler updates relationships between the clone and original order.
ListEditHandler
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
protected CommerceItemEditHandler |
mCommerceItemEditHandler
|
protected PaymentGroupEditHandler |
mPaymentGroupEditHandler
|
protected ShippingGroupEditHandler |
mShippingGroupEditHandler
|
Fields inherited from class atg.commerce.order.edit.CollectionEditHandler |
---|
mCollectionPropertyName, mSortPropertyName, mSubPropertyHandlers, mThrowExceptionsForCollectionChanges, STATE_CLONETOORIGINAL_MAP, STATE_ORIGINALTOCLONE_MAP |
Fields inherited from class atg.commerce.order.edit.CloneEditHandler |
---|
mFulfillmentMessageSender, mKeyPropertyName, mOrderFulfillmentTools, mPropertiesToCopyOnUpdate, STATE_ADD_ITEMS, STATE_DELETE_ITEMS, STATE_UPDATE_ITEMS |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
RelationshipEditHandler()
|
Method Summary | |
---|---|
protected void |
addItem(CloneEditState pCloneEditState,
AddItem pAddItem)
Overrides add item to use the commerce item container interfaces to add the new item. |
protected void |
adjustCommerceItemRelationship(CloneEditState pCloneEditState,
CommerceItemRelationship pCommerceItemRelationship)
Updates a CommerceItemRelationship so that the commerce item side of the relationship points to the original order's commerce item. |
protected void |
adjustOrderRelationship(CloneEditState pCloneEditState,
OrderRelationship pOrderRelationship)
Updates the relationships for a payment group. |
protected void |
adjustPaymentGroupRelationship(CloneEditState pCloneEditState,
PaymentGroupRelationship pPaymentGroupRelationship)
Updates a PaymentGroupRelationship so that the payment group side of the relationship points to the original order's payment group. |
protected void |
adjustRelationship(CloneEditState pCloneEditState,
Relationship pRelationship)
adjusts a relationships properites so they correspond to the original order's objects. |
protected void |
adjustShippingGroupRelationship(CloneEditState pCloneEditState,
ShippingGroupRelationship pShippingGroupRelationship)
Updates a pShippingGroupRelationship so that the shipping group side of the relationship points to the original order's shipping group. |
protected void |
deleteItem(CloneEditState pCloneEditState,
DeleteItem pDeleteItem)
Overrides delete item to use the relationship container interfaces to remove the relationship |
protected Relationship |
findRelationshipsCloneCounterpart(CloneEditState pCloneEditState,
Relationship pOriginalRelationship)
Finds the counterpart relationship to the given original relationship item |
CommerceItemEditHandler |
getCommerceItemEditHandler()
Returns the Commerce Item Edit Handler |
PaymentGroupEditHandler |
getPaymentGroupEditHandler()
Returns the PaymentGroupEditHandler |
ShippingGroupEditHandler |
getShippingGroupEditHandler()
Returns the Shipping Group Edit Handler |
protected void |
removeRelationshipFromContainers(CloneEditState pCloneEditState,
DeleteItem pDeleteItem)
Removes the deleted relationship from the containers on both sides on the relationship |
void |
setCommerceItemEditHandler(CommerceItemEditHandler pCommerceItemEditHandler)
|
void |
setPaymentGroupEditHandler(PaymentGroupEditHandler pPaymentGroupEditHandler)
|
void |
setShippingGroupEditHandler(ShippingGroupEditHandler pShippingGroupEditHandler)
|
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
protected CommerceItemEditHandler mCommerceItemEditHandler
protected ShippingGroupEditHandler mShippingGroupEditHandler
protected PaymentGroupEditHandler mPaymentGroupEditHandler
Constructor Detail |
---|
public RelationshipEditHandler()
Method Detail |
---|
public CommerceItemEditHandler getCommerceItemEditHandler()
public void setCommerceItemEditHandler(CommerceItemEditHandler pCommerceItemEditHandler)
public ShippingGroupEditHandler getShippingGroupEditHandler()
public void setShippingGroupEditHandler(ShippingGroupEditHandler pShippingGroupEditHandler)
public PaymentGroupEditHandler getPaymentGroupEditHandler()
public void setPaymentGroupEditHandler(PaymentGroupEditHandler pPaymentGroupEditHandler)
protected void addItem(CloneEditState pCloneEditState, AddItem pAddItem) throws CommerceException
addItem
in class ListEditHandler
pCloneEditState
- pAddItem
-
CommerceException
RelationshipContainer.addRelationship(Relationship, int)
protected void deleteItem(CloneEditState pCloneEditState, DeleteItem pDeleteItem) throws CommerceException
deleteItem
in class CollectionEditHandler
pCloneEditState
- pDeleteItem
- the DeleteItem object
CommerceException
removeRelationshipFromContainers(CloneEditState, DeleteItem)
protected void removeRelationshipFromContainers(CloneEditState pCloneEditState, DeleteItem pDeleteItem) throws CommerceException
pCloneEditState
- pDeleteItem
- the DeleteItem
that represents the deleted relationship.
CommerceException
protected void adjustRelationship(CloneEditState pCloneEditState, Relationship pRelationship) throws CommerceException
pCloneEditState
- pRelationship
-
CommerceException
adjustCommerceItemRelationship(CloneEditState, CommerceItemRelationship)
,
adjustPaymentGroupRelationship(CloneEditState, PaymentGroupRelationship)
,
adjustShippingGroupRelationship(CloneEditState, ShippingGroupRelationship)
,
adjustOrderRelationship(CloneEditState, OrderRelationship)
protected void adjustCommerceItemRelationship(CloneEditState pCloneEditState, CommerceItemRelationship pCommerceItemRelationship) throws CommerceException
If the relationship is new, the relationship was moved from the clone order to the original order and the commerce item the relationship points to must be changed to the its original counterpart.
If the relationship is being updated, the relationship was originally on the original order but it may have been moved from one item to another. In this case, we change the commerce item to point to the counterpart relationship's commerce item's counterpart.
pCloneEditState
- pCommerceItemRelationship
-
CommerceException
protected Relationship findRelationshipsCloneCounterpart(CloneEditState pCloneEditState, Relationship pOriginalRelationship)
pCloneEditState
- pOriginalRelationship
-
protected void adjustShippingGroupRelationship(CloneEditState pCloneEditState, ShippingGroupRelationship pShippingGroupRelationship) throws CommerceException
If the relationship is new, the relationship was moved from the clone order to the original order and the shipping group the relationship points to must be changed to the its original counterpart.
If the relationship is being updated, the relationship was originally on the original order but it may have been moved from one item to another on the clone. In this case, we change the shipping group to point to the counterpart relationship's shippig group's counterpart.
pCloneEditState
- pShippingGroupRelationship
-
CommerceException
protected void adjustPaymentGroupRelationship(CloneEditState pCloneEditState, PaymentGroupRelationship pPaymentGroupRelationship) throws CommerceException
If the relationship is new, the relationship was moved from the clone order to the original order and the payment group the relationship points to must be changed to the its original counterpart.
If the relationship is being updated, the relationship was originally on the original order but it may have been moved from one item to another. In this case, we change the payment group to point to the counterpart relationship's payment group's counterpart.
pCloneEditState
- pPaymentGroupRelationship
-
CommerceException
protected void adjustOrderRelationship(CloneEditState pCloneEditState, OrderRelationship pOrderRelationship) throws CommerceException
pCloneEditState
- pOrderRelationship
-
CommerceException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |