atg.commerce.fulfillment
Class HardgoodFulfillerModificationHandler

java.lang.Object
  extended by atg.commerce.fulfillment.HardgoodFulfillerModificationHandler
All Implemented Interfaces:
ModificationHandler

public class HardgoodFulfillerModificationHandler
extends java.lang.Object
implements ModificationHandler

The HardgoodFulfillerModificationHandler deals with the ModifyOrder and ModifyOrderNotifications messages received by the HardgoodFulfiller. The HardgoodFulfiller contains a ModificationHandler property, which is set by default to the HardgoodFulfillerModificationHandler. This class is similar to the OrderFulfillerModificationHandler.

To change the handling behavior of ModifyOrder and ModifyOrderNotification messages, extend the HardgoodFulfillerModificationHandler class and change the ModificationHandler property HardgoodFulfiller to point to the new class.

The default implementation deals with the following ModifyOrder modification: Remove the shipping group from the order: The fulfillers can remove shipping groups if they have not been shipped. Determining whether a shipping group has been shipped can be difficult because of the asynchronous nature of shipping items. Consulting the states may not be enough to determine if the group has been shipped. DCS 5.0 consults the state to make sure that it isn't in a NO_PENDING_ACTION or REMOVED state. This is sufficient because out-of-the box there is no integration with a real warehouse so shipment is indicated by changing a set of states in the order repository. Some vendors might decide to create business rules that limit the time in which cancellations can occur because it is difficult to determine the exact shipping time for a shipping group. Ship the shipping group. The HardgoodFulfiller can be notified that a shipping group has shipped through a ModifyOrder message (which is originally sent to the OrderFulfiller, then forwarded to the HardgoodFulfiller). The HardgoodFulfiller gets a GenericUpdate modification through the ModifyOrder message, checks the current state of the shipping group to ensure that it is PENDING_SHIPMENT. If everything is fine, it sets the state to NO_PENDING_ACTION and notifies the rest of the system of the change with a ModifyOrderNotification message.

It also handles the following ModifyOrderNotification modification: Shipping group update A shipping group is re-processed when the method processMultipleShippingGroups in HardgoodFulfiller is called. This method is called when a modification of type SHIPPING_GROUP_UPDATE is received. Created: Mon Jan 24 14:36:40 2000


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
HardgoodFulfillerModificationHandler()
           
 
Method Summary
 java.util.Properties getChainToRunMap()
           
 HardgoodFulfiller getHardgoodFulfiller()
          The fulfiller object that this class handles modifications for
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, java.util.List pOModifications, 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 performOrderModification(ModifyOrder pMessage, Order pOrder, java.util.List pModifications, java.util.List pPerformedModifications)
          Deprecated. Replaced by the pipeline processor
 void setChainToRunMap(java.util.Properties pChainToRunMap)
           
 void setHardgoodFulfiller(HardgoodFulfiller pHardgoodFulfiller)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

HardgoodFulfillerModificationHandler

public HardgoodFulfillerModificationHandler()
Method Detail

setHardgoodFulfiller

public void setHardgoodFulfiller(HardgoodFulfiller pHardgoodFulfiller)

getHardgoodFulfiller

public HardgoodFulfiller getHardgoodFulfiller()
The fulfiller object that this class handles modifications for


getChainToRunMap

public java.util.Properties getChainToRunMap()

setChainToRunMap

public void setChainToRunMap(java.util.Properties pChainToRunMap)

handleModifyOrder

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 HardgoodFulfiller class on handling a ModifyOrder message this method should be overridden. This method calls various methods to respond to the ModifyOrder requests. Modifications on orders are ignored since the HardgoodFulfiller does not have the authority to edit orders.

Specified by:
handleModifyOrder in interface ModificationHandler
Parameters:
pPortName - The port from which this message was received.
pMessage - The message that was received.
Throws:
javax.jms.JMSException
See Also:
ModifyOrder, 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), IdTargetModification.getTargetType(), Modification

handleModifyOrderNotification

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 HardgoodFulfiller class on handling a ModifyOrderNotification message this method should be overridden. Currently only one modification type is handled by this method. If it is an IdTargetModification then handleIdTargetModification is called.

Specified by:
handleModifyOrderNotification in interface ModificationHandler
Parameters:
pPortName - The port from which this message was received.
pMessage - The message that was received.
Throws:
javax.jms.JMSException
See Also:
ModifyOrderNotification, handleShippingGroupUpdateModification(atg.commerce.fulfillment.ModifyOrderNotification, atg.commerce.order.Order, atg.commerce.fulfillment.ShippingGroupUpdate, java.util.List), handleIdTargetModification(atg.commerce.fulfillment.ModifyOrderNotification, atg.commerce.order.Order, atg.commerce.fulfillment.IdTargetModification, java.util.List), ShippingGroupUpdate

handleShippingGroupUpdateModification

protected void handleShippingGroupUpdateModification(ModifyOrderNotification pMessage,
                                                     Order pOrder,
                                                     ShippingGroupUpdate pModification,
                                                     java.util.List pPerformedModifications)
Deprecated. Replaced by the pipeline processor

This method will reprocess each of the shipping groups in the modification Unlike the other handle methods, this only works on one kind of modification

Parameters:
pMessage - The ModifyOrderNotification received
pOrder - The order that was modified
pModification - The modification containing the shipping group ids that were updated
pPerformedModifications - All new modifications are stored here.
See Also:
HardgoodFulfiller.processMultipleShippingGroups(atg.commerce.order.Order, java.lang.String[], java.util.List)

performOrderModification

protected void performOrderModification(ModifyOrder pMessage,
                                        Order pOrder,
                                        java.util.List pModifications,
                                        java.util.List pPerformedModifications)
Deprecated. Replaced by the pipeline processor

This method is called to perform modifications on an Order level. The default implementation leaves this method as empty. All modifications made should be added to the pPerformedModifications list that is passed in.

Parameters:
pMessage - the ModifyOrder message that was sent
pOrder - the Order on which the modifications are to be performed
pModifications - the order level modifications to be made
pPerformedModifications - a list to which the modifications made in this method are added

handleIdTargetModification

protected void handleIdTargetModification(ModifyOrderNotification pMessage,
                                          Order pOrder,
                                          IdTargetModification pModification,
                                          java.util.List pModificationList)
                                   throws javax.jms.JMSException
Deprecated. Replaced by the pipeline processor

This method handles all @see IdTargetModification's that are included in a @see ModifyOrderNotification message. It calls the following methods:

Throws:
javax.jms.JMSException
See Also:
IdTargetModification, ModifyOrderNotification, 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

handleOrderModification

protected void handleOrderModification(ModifyOrderNotification pMessage,
                                       Order pOrder,
                                       java.util.List pOModifications,
                                       java.util.List pPerformedModifications)
Deprecated. Replaced by the pipeline processor

This method is called to handle ModifyOrderNotification messages that affect the order level. The default implementation leaves this method as empty. All modifications made as a result of this method should be added to the should be added to the pPerformedModifications list that is passed in. Note: When dealing with ModifyOrderNotification messages it is possible that although the modifications have occured elsewhere this method might need to write information back to the Order repository locally. See the documentation for more details on the potential to build a distributed fulfillment system.

Parameters:
pMessage - the ModifyOrderNotification message that was sent
pOrder - the Order object on which the modifications had been performed
pModifications - the order level modifications to be made
pPerformedModifications - a list to which the modifications made in this method are added

handleShippingGroupModification

protected void handleShippingGroupModification(ModifyOrderNotification pMessage,
                                               Order pOrder,
                                               Modification pModification,
                                               java.util.List pPerformedModifications)
Deprecated. Replaced by the pipeline processor

This method is called to handle ModifyOrderNotification messages that affect the shipping group level. The default implementation leaves this method as empty. All modifications made as a result of this method should be added to the should be added to the pPerformedModifications list that is passed in. Note: When dealing with ModifyOrderNotification messages it is possible that although the modifications have occured elsewhere this method might need to write information back to the Order repository locally. See the documentation for more details on the potential to build a distributed fulfillment system.

Parameters:
pMessage - the ModifyOrderNotification message that was sent
pOrder - the Order object on which the modifications had been performed
pModifications - the order level modifications to be made
pPerformedModifications - a list to which the modifications made in this method are added

handleItemModification

protected void handleItemModification(ModifyOrderNotification pMessage,
                                      Order pOrder,
                                      Modification pModification,
                                      java.util.List pPerformedModifications)
Deprecated. Replaced by the pipeline processor

This method is called to handle ModifyOrderNotification messages that affect the item level. The default implementation leaves this method as empty. All modifications made as a result of this method should be added to the should be added to the pPerformedModifications list that is passed in. Note: When dealing with ModifyOrderNotification messages it is possible that although the modifications have occured elsewhere this method might need to write information back to the Order repository locally. See the documentation for more details on the potential to build a distributed fulfillment system.

Parameters:
pMessage - the ModifyOrderNotification message that was sent
pOrder - the Order object on which the modifications had been performed
pModifications - the order level modifications to be made
pPerformedModifications - a list to which the modifications made in this method are added

handleRelationshipModification

protected void handleRelationshipModification(ModifyOrderNotification pMessage,
                                              Order pOrder,
                                              Modification pModification,
                                              java.util.List pPerformedModifications)
Deprecated. Replaced by the pipeline processor

This method is called to handle ModifyOrderNotification messages that affect the relationship level. The default implementation leaves this method as empty. All modifications made as a result of this method should be added to the should be added to the pPerformedModifications list that is passed in. Note: When dealing with ModifyOrderNotification messages it is possible that although the modifications have occured elsewhere this method might need to write information back to the Order repository locally. See the documentation for more details on the potential to build a distributed fulfillment system.

Parameters:
pMessage - the ModifyOrderNotification message that was sent
pOrder - the Order object on which the modifications had been performed
pModifications - the order level modifications to be made
pPerformedModifications - a list to which the modifications made in this method are added