atg.commerce.fulfillment.processor
Class ProcHandleModificationClassType

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.commerce.fulfillment.processor.ProcHandleModificationClassType
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, PipelineProcessor, java.util.EventListener

public class ProcHandleModificationClassType
extends GenericService
implements PipelineProcessor

This processor will route the modification execution based on the modification class type Works for both ModifyOrder and ModifyOrderNotification JMS messages


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.service.pipeline.PipelineProcessor
STOP_CHAIN_EXECUTION, STOP_CHAIN_EXECUTION_AND_COMMIT, STOP_CHAIN_EXECUTION_AND_ROLLBACK
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
ProcHandleModificationClassType()
           
 
Method Summary
 java.util.Properties getChainToRunMap()
           
 InventoryManager getInventoryManager()
          The InventoryManager that is notified when inventory is updated
 int[] getRetCodes()
          Returns the valid return codes 1 - The processor completed 2 - The modification is not supported
protected  void handleIdTargetModification(java.lang.String chainToRun, FulfillerSystem of, java.util.HashMap pMap)
          Handles a modification of the IdTargetModification class type from both the ModifyOrder and ModifyOrderNotification messages
protected  void handlePayGroupUpdateModification(java.lang.String chainToRun, FulfillerSystem of, java.util.HashMap pMap)
          Handles a modification of the PaymentGroupUpdate type from the ModifyOrderNotification message
protected  void handleShipGroupUpdateModification(java.lang.String chainToRun, FulfillerSystem of, java.util.HashMap pMap)
          Handles a modification of the ShippingGroupUpdate type from the ModifyOrderNotification message
 boolean isUpdateInventoryOnCancelOrder()
          If this is true, then cancel an order whose inventory has already been allocated will result in a call to InventoryManager.inventoryWasUpdated This defaults to true
 int runProcess(java.lang.Object pParam, PipelineResult pResult)
          This processor will route the order modification execution based on the modification class type Works for both ModifyOrder and ModifyOrderNotification JMS messages This method requires that a Commerce message and OrderFulfiller object be supplied in pParam in a HashMap.
 void setChainToRunMap(java.util.Properties pChainToRunMap)
           
 void setInventoryManager(InventoryManager pInventoryManager)
           
 void setUpdateInventoryOnCancelOrder(boolean pUpdateInventoryOnCancelOrder)
           
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
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

ProcHandleModificationClassType

public ProcHandleModificationClassType()
Method Detail

setUpdateInventoryOnCancelOrder

public void setUpdateInventoryOnCancelOrder(boolean pUpdateInventoryOnCancelOrder)

isUpdateInventoryOnCancelOrder

public boolean isUpdateInventoryOnCancelOrder()
If this is true, then cancel an order whose inventory has already been allocated will result in a call to InventoryManager.inventoryWasUpdated This defaults to true


setInventoryManager

public void setInventoryManager(InventoryManager pInventoryManager)

getInventoryManager

public InventoryManager getInventoryManager()
The InventoryManager that is notified when inventory is updated


setChainToRunMap

public void setChainToRunMap(java.util.Properties pChainToRunMap)

getChainToRunMap

public java.util.Properties getChainToRunMap()

getRetCodes

public int[] getRetCodes()
Returns the valid return codes 1 - The processor completed 2 - The modification is not supported

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 will route the order modification execution based on the modification class type Works for both ModifyOrder and ModifyOrderNotification JMS messages This method requires that a Commerce 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 Commerce 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)

handleIdTargetModification

protected void handleIdTargetModification(java.lang.String chainToRun,
                                          FulfillerSystem of,
                                          java.util.HashMap pMap)
                                   throws java.lang.Exception
Handles a modification of the IdTargetModification class type from both the ModifyOrder and ModifyOrderNotification messages

Throws:
java.lang.Exception

handleShipGroupUpdateModification

protected void handleShipGroupUpdateModification(java.lang.String chainToRun,
                                                 FulfillerSystem of,
                                                 java.util.HashMap pMap)
                                          throws java.lang.Exception
Handles a modification of the ShippingGroupUpdate type from the ModifyOrderNotification message

Throws:
java.lang.Exception

handlePayGroupUpdateModification

protected void handlePayGroupUpdateModification(java.lang.String chainToRun,
                                                FulfillerSystem of,
                                                java.util.HashMap pMap)
                                         throws java.lang.Exception
Handles a modification of the PaymentGroupUpdate type from the ModifyOrderNotification message

Throws:
java.lang.Exception