public class OrderFulfillerModificationHandler extends java.lang.Object implements ModificationHandler
The OrderFulfillerModificationHandler deals with the ModifyOrder and ModifyOrderNotifications messages received by the OrderFulfiller. The OrderFulfiller contains a ModificationHandler property, which is set by default to the OrderFulfillerModificationHandler. This class is similar to the HardgoodFulfillerModificationHandler.
To change the handling behavior of ModifyOrder and ModifyOrderNotification messages, extend the OrderFulfillerModificationHandler class and change the ModificationHandler property OrderFulfiller to point to the new class.
The default implementation deals with the following ModifyOrder modification: Remove an order: Remove an order by sending a ModifyOrder message containing a Modification of type REMOVE. The OrderFulfiller receives this message. If the order and its shipping group are not in a NO_PENDING_ACTION state, then ModifyOrder messages are sent to the various fulfillers handling the shipping groups. Every fulfiller who can cancel the shipping group responds by setting the state of the shipping group to PENDING_REMOVE. If all of the shipping group states are change to PENDING_REMOVE, then the order state changes to REMOVED and all of the shipping group states can be changed to REMOVED. An order cannot be canceled if any of its shipping groups have been shipped. If a GenericRemove modification is attempted on an order that cannot be removed (e.g. one of the shipping groups in the order has shipped) then the order is set to PENDING_MERCHANT_ACTION. Ship a shipping group: Notify the fulfillment system that a shipping group has shipped by sending a ModifyOrder message with a GenericUpdate (link to GenericUpdate section, it has this example) that changes the state of the shipping group from PENDING_SHIPMENT to NO_PENDING_ACTION. The OrderFulfiller will receive this message and forward it to the responsible fulfiller
It also handles the following ModifyOrderNotification modification: Shipping group state change: Shipping group's state changes to NO_PENDING_ACTION, PENDING_MERCHANT_ACTION, PENDING_REMOVE, or failure to change to PENDING_REMOVE. ShippingGroupUpdate: When a customer updates a shipping group, the OrderFulfiller sends a ModifyOrderNotification message to the fulfiller responsible for this shipping group. This forces a reprocessing of the shipping group. Created: Mon Jan 24 15:21:02 2000
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
Constructor and Description |
---|
OrderFulfillerModificationHandler() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
areAllGroupsPendingRemove(Order pOrder)
Deprecated.
Replaced by the pipeline processor
|
protected boolean |
areAllGroupsRemoved(Order pOrder)
Deprecated.
Replaced by the pipeline processor
|
protected void |
cancelRemoveOrder(Order pOrder,
java.util.List pModificationList)
Deprecated.
Replaced by the pipeline processor
|
protected boolean |
cancelRemoveShippingGroup(ShippingGroup pShippingGroup,
java.util.List pModificationList)
Deprecated.
Replaced by the pipeline processor
|
protected boolean |
creditOrder(Order pOrder,
java.util.List pModificationList)
Deprecated.
Replaced by the pipeline processor
|
protected void |
finishRemovingOrder(Order pOrder,
java.util.List pModificationList)
Deprecated.
Replaced by the pipeline processor
|
protected void |
finishRemovingShippingGroup(ShippingGroup pShippingGroup,
java.util.List pModificationList)
Deprecated.
Replaced by the pipeline processor
|
java.util.Properties |
getChainToRunMap() |
OrderFulfiller |
getOrderFulfiller() |
protected void |
handleIdTargetModification(ModifyOrderNotification pMessage,
Order pOrder,
IdTargetModification pModification,
java.util.List pModificationList)
Deprecated.
Replaced by the pipeline processor
|
protected void |
handleItemModification(ModifyOrderNotification pMessage,
Order pOrder,
Modification pModification,
java.util.List pPerformedModifications)
Deprecated.
Replaced by the pipeline processor
|
void |
handleModifyOrder(java.lang.String pPortName,
javax.jms.ObjectMessage pMessage)
This method is called to handle all messages of type
ModifyOrder.
|
void |
handleModifyOrderNotification(java.lang.String pPortName,
javax.jms.ObjectMessage pMessage)
This method is called to handle all messages of type
ModifyOrderNotification.
|
protected void |
handleOrderModification(ModifyOrderNotification pMessage,
Order pOrder,
Modification pModification,
java.util.List pPerformedModifications)
Deprecated.
Replaced by the pipeline processor
|
protected void |
handlePaymentGroupUpdateModification(ModifyOrderNotification pMessage,
Order pOrder,
PaymentGroupUpdate pModification,
java.util.List pPerformedModifications)
Deprecated.
Replaced by the pipeline processor
|
protected void |
handleRelationshipModification(ModifyOrderNotification pMessage,
Order pOrder,
Modification pModification,
java.util.List pPerformedModifications)
Deprecated.
Replaced by the pipeline processor
|
protected void |
handleShippingGroupModification(ModifyOrderNotification pMessage,
Order pOrder,
Modification pModification,
java.util.List pPerformedModifications)
Deprecated.
Replaced by the pipeline processor
|
protected void |
handleShippingGroupUpdateModification(ModifyOrderNotification pMessage,
Order pOrder,
ShippingGroupUpdate pModification,
java.util.List pPerformedModifications)
Deprecated.
Replaced by the pipeline processor
|
protected void |
performIdTargetModification(ModifyOrder pMessage,
Order pOrder,
IdTargetModification pModification,
java.util.List pModificationList)
Deprecated.
Replaced by the pipeline processor
|
protected void |
performItemModification(ModifyOrder pMessage,
Order pOrder,
Modification pModification,
java.util.List pPerformedModifications)
Deprecated.
Replaced by the pipeline processor
|
protected void |
performOrderModification(ModifyOrder pMessage,
Order pOrder,
Modification pModification,
java.util.List pPerformedModifications)
Deprecated.
Replaced by the pipeline processor
|
protected void |
performRelationshipModification(ModifyOrder pMessage,
Order pOrder,
Modification pModification,
java.util.List pPerformedModifications)
Deprecated.
Replaced by the pipeline processor
|
protected void |
performShippingGroupModification(ModifyOrder pMessage,
Order pOrder,
Modification pModification,
java.util.List pPerformedModifications)
Deprecated.
Replaced by the pipeline processor
|
protected boolean |
removeOrder(Order pOrder,
Modification pUpdate,
java.util.List pPerformedModifications)
Deprecated.
Replaced by the pipeline processor
|
void |
setChainToRunMap(java.util.Properties pChainToRunMap) |
void |
setOrderFulfiller(OrderFulfiller pOrderFulfiller) |
protected void |
shipItemRelWasRemoved(Order pOrder,
ShippingGroupCommerceItemRelationship pShipItemRel)
Deprecated.
Replaced by the pipeline processor
|
public void setOrderFulfiller(OrderFulfiller pOrderFulfiller)
public OrderFulfiller getOrderFulfiller()
public java.util.Properties getChainToRunMap()
public void setChainToRunMap(java.util.Properties pChainToRunMap)
public void handleModifyOrder(java.lang.String pPortName, javax.jms.ObjectMessage pMessage) throws javax.jms.JMSException
This method is called to handle all messages of type ModifyOrder. Should developers wish to change the behavior of the OrderFulfiller class on handling a ModifyOrder message this method should be overridden. This method calls to the pipeline chain to process the message.
handleModifyOrder
in interface ModificationHandler
pPortName
- The port from which this message was received.pMessage
- The message that was received.javax.jms.JMSException
ModifyOrder
,
performIdTargetModification(atg.commerce.fulfillment.ModifyOrder, atg.commerce.order.Order, atg.commerce.fulfillment.IdTargetModification, java.util.List)
,
IdTargetModification
public void handleModifyOrderNotification(java.lang.String pPortName, javax.jms.ObjectMessage pMessage) throws javax.jms.JMSException
This method is called to handle all messages of type ModifyOrderNotification. Should developers wish to change the behavior of the OrderFulfiller class on handling a ModifyOrderNotification message this method should be overridden. This method calls to the pipeline chain to process the message.
handleModifyOrderNotification
in interface ModificationHandler
pPortName
- The port from which this message was received.pMessage
- The message that was received.javax.jms.JMSException
ModifyOrderNotification
,
handleShippingGroupUpdateModification(atg.commerce.fulfillment.ModifyOrderNotification, atg.commerce.order.Order, atg.commerce.fulfillment.ShippingGroupUpdate, java.util.List)
,
ShippingGroupUpdate
,
handleIdTargetModification(atg.commerce.fulfillment.ModifyOrderNotification, atg.commerce.order.Order, atg.commerce.fulfillment.IdTargetModification, java.util.List)
,
IdTargetModification
protected void performIdTargetModification(ModifyOrder pMessage, Order pOrder, IdTargetModification pModification, java.util.List pModificationList)
IdTargetModification
,
ModifyOrder
,
performOrderModification(atg.commerce.fulfillment.ModifyOrder, atg.commerce.order.Order, atg.commerce.fulfillment.Modification, java.util.List)
,
performShippingGroupModification(atg.commerce.fulfillment.ModifyOrder, atg.commerce.order.Order, atg.commerce.fulfillment.Modification, java.util.List)
,
performItemModification(atg.commerce.fulfillment.ModifyOrder, atg.commerce.order.Order, atg.commerce.fulfillment.Modification, java.util.List)
,
performRelationshipModification(atg.commerce.fulfillment.ModifyOrder, atg.commerce.order.Order, atg.commerce.fulfillment.Modification, java.util.List)
,
Modification
protected void performOrderModification(ModifyOrder pMessage, Order pOrder, Modification pModification, java.util.List pPerformedModifications)
pMessage
- The original message that contained the modificationspOrder
- The order that was modified.pModification
- The modification that was performedpPerformedModifications
- All new modifications are stored here.GenericRemove
,
removeOrder(atg.commerce.order.Order, atg.commerce.fulfillment.Modification, java.util.List)
protected void performShippingGroupModification(ModifyOrder pMessage, Order pOrder, Modification pModification, java.util.List pPerformedModifications)
pMessage
- The original message that contained the modificationspOrder
- The order that was modified.pModification
- The modification that was performedpPerformedModifications
- Place to store notifications of changesprotected void performItemModification(ModifyOrder pMessage, Order pOrder, Modification pModification, java.util.List pPerformedModifications)
pMessage
- The original message that contained the modificationspOrder
- The order that was modified.pModification
- The modification that was performedpPerformedModifications
- All new modifications are stored here.protected void performRelationshipModification(ModifyOrder pMessage, Order pOrder, Modification pModification, java.util.List pPerformedModifications)
pMessage
- The original message that contained the modificationspOrder
- The order that was modified.pModification
- The modification that was performedpPerformedModifications
- All new modifications are stored here.protected void handleIdTargetModification(ModifyOrderNotification pMessage, Order pOrder, IdTargetModification pModification, java.util.List pModificationList) throws javax.jms.JMSException
javax.jms.JMSException
IdTargetModification
,
ModifyOrderNotification
,
handleOrderModification(atg.commerce.fulfillment.ModifyOrderNotification, atg.commerce.order.Order, atg.commerce.fulfillment.Modification, java.util.List)
,
handleShippingGroupModification(atg.commerce.fulfillment.ModifyOrderNotification, atg.commerce.order.Order, atg.commerce.fulfillment.Modification, java.util.List)
,
handleItemModification(atg.commerce.fulfillment.ModifyOrderNotification, atg.commerce.order.Order, atg.commerce.fulfillment.Modification, java.util.List)
,
handleRelationshipModification(atg.commerce.fulfillment.ModifyOrderNotification, atg.commerce.order.Order, atg.commerce.fulfillment.Modification, java.util.List)
,
Modification
protected void handleOrderModification(ModifyOrderNotification pMessage, Order pOrder, Modification pModification, java.util.List pPerformedModifications)
pMessage
- the ModifyOrderNotification receivedpOrder
- The order that was modified.pModification
- The modification that was performedpPerformedModifications
- All new modifications are stored here.protected void handleShippingGroupModification(ModifyOrderNotification pMessage, Order pOrder, Modification pModification, java.util.List pPerformedModifications) throws javax.jms.JMSException
pMessage
- the ModifyOrderNotification receivedpOrder
- The order that was modified.pModification
- The modification that was performedpPerformedModifications
- All new modifications are stored here.javax.jms.JMSException
GenericRemove
,
GenericUpdate
,
ShippingGroupStates
,
OrderStates
,
finishRemovingOrder(atg.commerce.order.Order, java.util.List)
protected void handleItemModification(ModifyOrderNotification pMessage, Order pOrder, Modification pModification, java.util.List pPerformedModifications)
pMessage
- the ModifyOrderNotification receivedpOrder
- The order that was modified.pModification
- The modification that was performedpPerformedModifications
- All new modifications are stored here.protected void handleRelationshipModification(ModifyOrderNotification pMessage, Order pOrder, Modification pModification, java.util.List pPerformedModifications)
pMessage
- the ModifyOrderNotification receivedpOrder
- The order that was modified.pModification
- The modification that was performedpPerformedModifications
- All new modifications are stored here.GenericUpdate
,
ShipItemRelationshipStates
,
shipItemRelWasRemoved(atg.commerce.order.Order, atg.commerce.order.ShippingGroupCommerceItemRelationship)
protected void handleShippingGroupUpdateModification(ModifyOrderNotification pMessage, Order pOrder, ShippingGroupUpdate pModification, java.util.List pPerformedModifications) throws javax.jms.JMSException
pMessage
- The ModifyOrderNotification receivedpOrder
- The order that was modifiedpModification
- The modification containing the shipping group ids that were updatedpPerformedModifications
- All new modifications are stored here.javax.jms.JMSException
protected void handlePaymentGroupUpdateModification(ModifyOrderNotification pMessage, Order pOrder, PaymentGroupUpdate pModification, java.util.List pPerformedModifications) throws javax.jms.JMSException
pMessage
- The ModifyOrderNotification receivedpOrder
- The order that was modifiedpModification
- The modification containing the payment group ids that were updatedpPerformedModifications
- All new modifications are stored here.javax.jms.JMSException
protected boolean removeOrder(Order pOrder, Modification pUpdate, java.util.List pPerformedModifications)
pOrder
- The order being removed.pUpdate
- The modification originally requesting that this order be removedpPerformedModifications
- A place to store all new modifications.protected boolean areAllGroupsPendingRemove(Order pOrder)
pOrder
- The order we are checkingprotected boolean areAllGroupsRemoved(Order pOrder)
pOrder
- The order we are checkingprotected void finishRemovingOrder(Order pOrder, java.util.List pModificationList)
pOrder
- the order we are changingpModificationList
- A place to store our modificationsprotected void finishRemovingShippingGroup(ShippingGroup pShippingGroup, java.util.List pModificationList)
pShippingGroup
- the shipping group we are changingpModificationList
- A place to store our modificationsprotected void shipItemRelWasRemoved(Order pOrder, ShippingGroupCommerceItemRelationship pShipItemRel)
pOrder
- The order containing both the ShipItemRelpShipItemRel
- The ShippingGroupCommerceItemRelationship that was removedprotected void cancelRemoveOrder(Order pOrder, java.util.List pModificationList)
pOrder
- The order that should not be removed.pModificationList
- A place to store all modifications.protected boolean cancelRemoveShippingGroup(ShippingGroup pShippingGroup, java.util.List pModificationList)
pShippingGroup
- the shipping group we are changingpModificationList
- A place to store our modificationsprotected boolean creditOrder(Order pOrder, java.util.List pModificationList)
pOrder
- The order being creditedpModificationList
- A place to store all new modifications.