atg.b2bcommerce.approval.processor
Class ProcAddApproverIdsToOrder

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.logging.ApplicationLoggingImpl
          extended by atg.b2bcommerce.approval.processor.ProcAddApproverIdsToOrder
All Implemented Interfaces:
ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, PipelineProcessor

public class ProcAddApproverIdsToOrder
extends ApplicationLoggingImpl
implements PipelineProcessor

This processor adds the list of valid approver ids to the approverIds property of the order. If no approvers are defined, then an exception is thrown unless the allowCheckoutIfApproversNotDefined property is set to true. Then, the order will just be checked out without approval. The default value of allowCheckoutIfApproversNotDefined is false.


Field Summary
static java.lang.String CLASS_VERSION
           
static int SUCCESS
           
 
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
ProcAddApproverIdsToOrder()
          Creates a new ProcAddApproverIdsToOrder instance.
 
Method Summary
 boolean getAllowCheckoutIfApproversNotDefined()
          Returns the allowCheckoutIfApproversNotDefined
 java.lang.String getApproversPropertyName()
          Returns property approversPropertyName
 java.lang.String getProfileItemDescName()
          Return the profileItemDescName property.
 ProfileTools getProfileTools()
          Return the ProfileTools property.
 int[] getRetCodes()
          The return codes that this processor can return.
protected  RepositoryItem loadProfile(B2BOrder pOrder)
          Loads the profile for the given order
 int runProcess(java.lang.Object pParam, PipelineResult pResult)
          This method adds the list of valid approver ids to the approverIds property of the order.
 void setAllowCheckoutIfApproversNotDefined(boolean pAllowCheckoutIfApproversNotDefined)
          Sets the allowCheckoutIfApproversNotDefined
 void setApproversPropertyName(java.lang.String pApproversPropertyName)
          Sets property approversPropertyName
 void setProfileItemDescName(java.lang.String pProfileItemDescName)
          Set the profileItemDescName property.
 void setProfileTools(ProfileTools pProfileTools)
          Set the ProfileTools property.
 
Methods inherited from class atg.nucleus.logging.ApplicationLoggingImpl
addGlobalLogListeners, addLogListener, getLoggingForVlogging, getLoggingIdentifer, getLoggingIdentifier, 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, setLoggingIdentifier, setLoggingInfo, setLoggingTrace, setLoggingWarning
 
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

SUCCESS

public static final int SUCCESS
See Also:
Constant Field Values
Constructor Detail

ProcAddApproverIdsToOrder

public ProcAddApproverIdsToOrder()
Creates a new ProcAddApproverIdsToOrder instance.

Method Detail

getApproversPropertyName

public java.lang.String getApproversPropertyName()
Returns property approversPropertyName

Returns:
returns property approversPropertyName

setApproversPropertyName

public void setApproversPropertyName(java.lang.String pApproversPropertyName)
Sets property approversPropertyName

Parameters:
pApproversPropertyName - the value to set for property approversPropertyName

getProfileItemDescName

public java.lang.String getProfileItemDescName()
Return the profileItemDescName property.

Returns:

setProfileItemDescName

public void setProfileItemDescName(java.lang.String pProfileItemDescName)
Set the profileItemDescName property.

Parameters:
pProfileItemDescName -

getProfileTools

public ProfileTools getProfileTools()
Return the ProfileTools property.

Returns:

setProfileTools

public void setProfileTools(ProfileTools pProfileTools)
Set the ProfileTools property.

Parameters:
pProfileTools -

getAllowCheckoutIfApproversNotDefined

public boolean getAllowCheckoutIfApproversNotDefined()
Returns the allowCheckoutIfApproversNotDefined


setAllowCheckoutIfApproversNotDefined

public void setAllowCheckoutIfApproversNotDefined(boolean pAllowCheckoutIfApproversNotDefined)
Sets the allowCheckoutIfApproversNotDefined


runProcess

public int runProcess(java.lang.Object pParam,
                      PipelineResult pResult)
               throws java.lang.Exception
This method adds the list of valid approver ids to the approverIds property of the order. It gets the valid approver ids from the profile property named approvers from the order owner's profile.

Specified by:
runProcess in interface PipelineProcessor
Parameters:
pParam - list of params to pipeline
pResult - the pipeline result object
Returns:
code indicating state
Throws:
java.lang.Exception - if an error occurs

loadProfile

protected RepositoryItem loadProfile(B2BOrder pOrder)
                              throws RepositoryException
Loads the profile for the given order

Throws:
RepositoryException

getRetCodes

public int[] getRetCodes()
The return codes that this processor can return. The list of return codes are:

Specified by:
getRetCodes in interface PipelineProcessor
Returns:
an int[] of the valid return codes