atg.commerce.approval.processor
Class ProcSendApprovalCompleteMessage

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.logging.ApplicationLoggingImpl
          extended by atg.commerce.order.processor.EventSender
              extended by atg.commerce.approval.processor.ProcSendApprovalCompleteMessage
All Implemented Interfaces:
MessageSource, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, PipelineProcessor
Direct Known Subclasses:
ProcSendApprovalCompleteMessage

public class ProcSendApprovalCompleteMessage
extends EventSender

This processor instantiates an ApprovalMessage object and populates it. The runProcess() method is inherited from the atg.commerce.order.processor.EventSender class. The EventSender class handles sending the message to the messaging system.


Field Summary
static java.lang.String CLASS_VERSION
           
 
Fields inherited from class atg.commerce.order.processor.EventSender
FAILURE, 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
ProcSendApprovalCompleteMessage()
          Creates a new ProcSendApprovalCompleteMessage instance.
 
Method Summary
 java.io.Serializable createEventToSend(java.lang.Object pParam, PipelineResult pResult)
          This method creates the ApprovalMessage object and populates it.
 java.lang.String getMessageSourceName()
          Return the messageSourceName property.
protected  void setApprovalStatus(ApprovalMessage auMessage, java.lang.String approvalStatus)
          This method sets the approvalStatus property in the ApprovalMessage object.
 void setMessageSourceName(java.lang.String pMessageSourceName)
          Set the messageSourceName property.
 
Methods inherited from class atg.commerce.order.processor.EventSender
getEventType, getEventType, getMessageIdGenerator, getMessageIdSpaceName, getMessageSourceContext, getNextMessageId, getPortName, getRetCodes, getSiteId, isAllowMessageSending, runProcess, sendObjectMessage, setAllowMessageSending, setEventType, setMessageIdGenerator, setMessageIdSpaceName, setMessageSourceContext, setPortName, startMessageSource, stopMessageSource
 
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, vlogDebugTrace, 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
Constructor Detail

ProcSendApprovalCompleteMessage

public ProcSendApprovalCompleteMessage()
Creates a new ProcSendApprovalCompleteMessage instance.

Method Detail

getMessageSourceName

public java.lang.String getMessageSourceName()
Return the messageSourceName property.

Returns:
the name of the message source

setMessageSourceName

public void setMessageSourceName(java.lang.String pMessageSourceName)
Set the messageSourceName property.

Parameters:
pMessageSourceName - the name of the message source

createEventToSend

public java.io.Serializable createEventToSend(java.lang.Object pParam,
                                              PipelineResult pResult)
                                       throws java.lang.Exception
This method creates the ApprovalMessage object and populates it.

Overrides:
createEventToSend in class EventSender
Throws:
java.lang.Exception

setApprovalStatus

protected void setApprovalStatus(ApprovalMessage auMessage,
                                 java.lang.String approvalStatus)
                          throws CommerceException
This method sets the approvalStatus property in the ApprovalMessage object. If the approval status parameter passed into runProcess is ApprovalTools.APPROVED then the status will be set to ApprovalTools.APPROVAL_PASSED. If the value is ApprovalTools.REJECTED then approval status will be set to ApprovalTools.APPROVAL_FAILED.

Parameters:
auMessage - the ApprovalMessage
approvalStatus - the value of the approval status from the approval update message
Throws:
CommerceException - if approvalStatus is neither ApprovalTools.APPROVED or ApprovalTools.REJECTED