public class ProcValidateCostCentersForCheckout extends ApplicationLoggingImpl implements PipelineProcessor
costCenterRequired is set to true, this processor verifies
that all CommerceItems, shipping costs, and tax in the Order are assigned
to CostCenters. The processor can also be configured to run a specified
pipeline chain to validate the properties of each cost center in turn.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION |
protected int[] |
mRetCodes
Returns the valid return codes.
|
STOP_CHAIN_EXECUTION, STOP_CHAIN_EXECUTION_AND_COMMIT, STOP_CHAIN_EXECUTION_AND_ROLLBACKDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
ProcValidateCostCentersForCheckout() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getLoggingIdentifier()
Returns property LoggingIdentifier.
|
int[] |
getRetCodes()
Returns an array of all the return codes that could be returned by this PipelineProcessor.
|
java.lang.String |
getValidateCostCenterChain()
Get the name of the pipeline chain to run to validate each individual
cost center.
|
boolean |
isCostCenterRequired()
Query whether all items must be assigned a cost center, or whether
cost centers are optional.
|
int |
runProcess(java.lang.Object pParam,
PipelineResult pResult)
When
costCenterRequired is true, this method checks to see
if all the CommerceItems, shipping costs, and tax in the Order are
assigned to CostCenters. |
void |
setCostCenterRequired(boolean pCostCenterRequired)
Specify whether all items must be assigned a cost center, or whether
cost centers are optional.
|
void |
setLoggingIdentifier(java.lang.String pLoggingIdentifier)
Sets property LoggingIdentifier.
|
void |
setValidateCostCenterChain(java.lang.String pValidateCostCenterChain)
Set the name of the pipeline chain to run to validate each individual
cost center.
|
protected void |
validateCostCenters(Order pOrder,
OrderManager pOrderManager,
java.util.Locale pLocale,
PipelineResult pResult)
Run the optional cost center validation chain, if one exists, for
each non-empty cost center.
|
addGlobalLogListeners, addLogListener, getLoggingForVlogging, getLoggingIdentifer, getLogListenerCount, getLogListeners, initializeFromServiceEvent, isAutoInitListeners, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, removeLogListener, sendLogEvent, setAutoInitListeners, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarningvlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic static java.lang.String CLASS_VERSION
protected int[] mRetCodes
public int[] getRetCodes()
PipelineProcessorgetRetCodes in interface PipelineProcessorpublic void setValidateCostCenterChain(java.lang.String pValidateCostCenterChain)
public java.lang.String getValidateCostCenterChain()
public void setLoggingIdentifier(java.lang.String pLoggingIdentifier)
setLoggingIdentifier in class ApplicationLoggingImplpublic java.lang.String getLoggingIdentifier()
getLoggingIdentifier in class ApplicationLoggingImplpublic void setCostCenterRequired(boolean pCostCenterRequired)
public boolean isCostCenterRequired()
public int runProcess(java.lang.Object pParam,
PipelineResult pResult)
throws java.lang.Exception
costCenterRequired is true, this method checks to see
if all the CommerceItems, shipping costs, and tax in the Order are
assigned to CostCenters. It can also run an optional pipeline chain
to validate the properties of each individual cost center.
This method requires that an Order, an OrderManager, and optionally a Locale object be supplied in pParam in a HashMap. Use the PipelineConstants class static members to key the objects in the HashMap.
runProcess in interface PipelineProcessorpParam - a HashMap which must contain an Order, an OrderManager, and optionally
a Locale objectpResult - a PipelineResult object which stores any information which must
be returned from this method invokationjava.lang.Exception - throws any exception back to the callerPipelineProcessor.runProcess(Object, PipelineResult)protected void validateCostCenters(Order pOrder, OrderManager pOrderManager, java.util.Locale pLocale, PipelineResult pResult) throws RunProcessException
RunProcessException