atg.commerce.fulfillment.processor
Class ProcRetrieveOrderWaitingShipMap

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

public class ProcRetrieveOrderWaitingShipMap
extends java.lang.Object
implements PipelineProcessor

This processor is called on a reception of a UpdateInventory JMS Message. Returns a HashMap where the keys are the order ids and the values are a Set of shipping group ids of the shipping groups who have items that could not be previously allocated.


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
ProcRetrieveOrderWaitingShipMap()
           
 
Method Summary
 int[] getRetCodes()
          Returns the valid return codes 1 - The processor completed
protected  java.util.HashMap makeOrderShipGroupHashMap(HardgoodFulfiller of, RepositoryItem[] pItems)
          Takes an array of repository items that correspond to shipItemRel repository items.
protected  java.util.HashMap retrieveShipMap(HardgoodFulfiller of, java.lang.String[] pCatalogRefIds, java.lang.String[] pStates)
          This method will return a HashMap where the Order ids are the keys and the values are a Set of shipping group ids whose shipItemRel state is equal to one of the pState passed in and contain the items listed in pCatalogRefIds.
protected  java.util.HashMap retrieveWaitingShipMap(HardgoodFulfiller of, java.lang.String[] pCatalogRefIds)
          Returns a HashMap where the keys are the order ids and the values are a Set of shipping group ids of the shipping groups who have items that were on preorder and are contained in the pCatalogRefIds that are passed in.
 int runProcess(java.lang.Object pParam, PipelineResult pResult)
          Returns a HashMap where the keys are the order ids and the values are a Set of shipping group ids of the shipping groups who have items that could not be previously allocated from the inventory.
 
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

ProcRetrieveOrderWaitingShipMap

public ProcRetrieveOrderWaitingShipMap()
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
Returns a HashMap where the keys are the order ids and the values are a Set of shipping group ids of the shipping groups who have items that could not be previously allocated from the inventory. This method requires that a JMS message 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 a JMS message 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)

retrieveWaitingShipMap

protected java.util.HashMap retrieveWaitingShipMap(HardgoodFulfiller of,
                                                   java.lang.String[] pCatalogRefIds)
Returns a HashMap where the keys are the order ids and the values are a Set of shipping group ids of the shipping groups who have items that were on preorder and are contained in the pCatalogRefIds that are passed in.

Parameters:
pCatalogRefIds - - the array of sku ids that have been moved off preorder
Returns:
a hashmap where the keys are the order ids and the values are a Set of shipping group ids.

retrieveShipMap

protected java.util.HashMap retrieveShipMap(HardgoodFulfiller of,
                                            java.lang.String[] pCatalogRefIds,
                                            java.lang.String[] pStates)
This method will return a HashMap where the Order ids are the keys and the values are a Set of shipping group ids whose shipItemRel state is equal to one of the pState passed in and contain the items listed in pCatalogRefIds.

Parameters:
pCatalogRefIds - - the ids of the items we are interested in finding in the shipping groups.
pState - - the array of states of the item relationship that we want to match.
Returns:
a hashmap where the keys are the order ids and the values are a Set of shipping group ids.

makeOrderShipGroupHashMap

protected java.util.HashMap makeOrderShipGroupHashMap(HardgoodFulfiller of,
                                                      RepositoryItem[] pItems)
Takes an array of repository items that correspond to shipItemRel repository items. Will return a HashMap where the keys are the order ids and the values are sets of the shipping groups.