atg.commerce.fulfillment.processor
Class ProcRetrieveShippingGroupsToBeSplit

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

public class ProcRetrieveShippingGroupsToBeSplit
extends java.lang.Object
implements PipelineProcessor

This processor finds all shipping groups in an order that need to be split across multiple fulfillers (shipping groups that are to be fulfilled by more than one fulfiller)


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
ProcRetrieveShippingGroupsToBeSplit()
           
 
Method Summary
 int[] getRetCodes()
          Returns the valid return codes 1 - The processor completed
protected  java.util.List retrieveShippingGroupsToBeSplit(OrderFulfiller of, Order pOrder)
          This method will take an order and return a List of the shipping groups that need to be split up into multiple shipping groups.
 int runProcess(java.lang.Object pParam, PipelineResult pResult)
          This processor finds all shipping groups in an order that need to be split across multiple fulfillers (shipping groups that are to be fulfilled by more than one fulfiller) This method requires that an Order and OrderFulfiller object be supplied in pParam in a HashMap.
 
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

ProcRetrieveShippingGroupsToBeSplit

public ProcRetrieveShippingGroupsToBeSplit()
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
This processor finds all shipping groups in an order that need to be split across multiple fulfillers (shipping groups that are to be fulfilled by more than one fulfiller) 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)

retrieveShippingGroupsToBeSplit

protected java.util.List retrieveShippingGroupsToBeSplit(OrderFulfiller of,
                                                         Order pOrder)
                                                  throws CommerceException
This method will take an order and return a List of the shipping groups that need to be split up into multiple shipping groups. The default implementation will flag shipping groups to be split if a shipping groups contains items that are fulfilled by multiple fulfillers.
The default implementation uses OrderFulfillmentTools.isShippingGroupSingleFulfiller to determine if all the items are fulfilled by one fulfiller.

Parameters:
pOrder - the order that contains the shipping groups
Returns:
a List of the shipping groups that should be split.
Throws:
CommerceException
See Also:
OrderFulfillmentTools.isShippingGroupSingleFulfiller(atg.commerce.order.ShippingGroup)