atg.commerce.fulfillment.processor
Class ProcSendFulfillOrderFragment

java.lang.Object
  extended by atg.commerce.fulfillment.processor.ProcSendFulfillOrderFragment
All Implemented Interfaces:
PipelineProcessor

public class ProcSendFulfillOrderFragment
extends java.lang.Object
implements PipelineProcessor

This processor sends the FulfillOrderFragment messages to the fulfillers. The messages contain the shipping groups the fulfillers are responsible for.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from interface atg.service.pipeline.PipelineProcessor
STOP_CHAIN_EXECUTION, STOP_CHAIN_EXECUTION_AND_COMMIT, STOP_CHAIN_EXECUTION_AND_ROLLBACK
 
Constructor Summary
ProcSendFulfillOrderFragment()
           
 
Method Summary
 int[] getRetCodes()
          Returns the valid return codes 1 - The processor completed
 int runProcess(java.lang.Object pParam, PipelineResult pResult)
          Send the FulfillOrderFragment messages with the shipping groups to be processed to the fulfillers by calling the sendOrderToFulfiller method.
protected  void setShippingGroupStateProcessing(OrderFulfiller of, Order pOrder, java.util.List pListShipGroupIds, java.util.List pModificationList)
          Set the shipping group states to processing and add the Modification objects created to the ModificationList that is passed.
protected  void setShippingGroupSubmittedDate(OrderFulfiller of, ShippingGroup pShippingGroup, java.util.List pModificationList)
          This method sets the submitted date of the shipping group to the current time.
 
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

ProcSendFulfillOrderFragment

public ProcSendFulfillOrderFragment()
Method Detail

getRetCodes

public int[] getRetCodes()
Returns the valid return codes 1 - The processor completed

Specified by:
getRetCodes in interface PipelineProcessor
Returns:
an integer array of the valid return codes.

runProcess

public int runProcess(java.lang.Object pParam,
                      PipelineResult pResult)
               throws java.lang.Exception
Send the FulfillOrderFragment messages with the shipping groups to be processed to the fulfillers by calling the sendOrderToFulfiller method. This method requires that an Order and OrderFulfiller object be supplied in pParam in a HashMap. Use the PipelineConstants class' static members to key the objects in the HashMap.

Specified by:
runProcess in interface PipelineProcessor
Parameters:
pParam - a HashMap which must contain an Order and OrderFulfiller object
pResult - a PipelineResult object which stores any information which must be returned from this method invokation
Returns:
an integer specifying the processor's return code
Throws:
java.lang.Exception - throws any exception back to the caller
See Also:
PipelineProcessor.runProcess(Object, PipelineResult)

setShippingGroupStateProcessing

protected void setShippingGroupStateProcessing(OrderFulfiller of,
                                               Order pOrder,
                                               java.util.List pListShipGroupIds,
                                               java.util.List pModificationList)
Set the shipping group states to processing and add the Modification objects created to the ModificationList that is passed. This method also sets the submittedDate of the order.The caller of this method is responsible for packaging the changes in a ModifyOrderNotification object and sending it out. This method can be overriden if the state detail information should be changed to something else or if any other work needs to be done when the shippin group state change occurs.

Parameters:
pOrder - the order to be operated on.
pShipGroupIds - the ids of the shipping groups whose state will change
pModificationList - the list to which the modification objects created will be added.

setShippingGroupSubmittedDate

protected void setShippingGroupSubmittedDate(OrderFulfiller of,
                                             ShippingGroup pShippingGroup,
                                             java.util.List pModificationList)
This method sets the submitted date of the shipping group to the current time. To ensure this only happens once, it checks first to make sure it is not currently set.

Parameters:
pShippingGroup - The shipping group to set.
pModificationList - Place to store new modifications.