atg.commerce.fulfillment.processor
Class ProcDeliverElectronicGoodByListener

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

public class ProcDeliverElectronicGoodByListener
extends java.lang.Object
implements PipelineProcessor

This processor delivers an electronic item by the email Listener action


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
ProcDeliverElectronicGoodByListener()
           
 
Method Summary
protected  java.lang.String createEmailMessageBody(ElectronicFulfiller of, java.lang.String pClaimCode)
          Creates the email message body that will be put into the email.
protected  EmailEvent createEmailObject(ElectronicFulfiller of, java.lang.String pRecipientEmailAddress, java.lang.String pClaimCode)
          This method will create an EmailEvent that corresponds to the message to send out.
 int[] getRetCodes()
          Returns the valid return codes 1 - The processor completed
 int runProcess(java.lang.Object pParam, PipelineResult pResult)
          Delivers an electronic item by the email Listener.
 
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

ProcDeliverElectronicGoodByListener

public ProcDeliverElectronicGoodByListener()
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
Delivers an electronic item by the email Listener. This method requires that an 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 an 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)

createEmailObject

protected EmailEvent createEmailObject(ElectronicFulfiller of,
                                       java.lang.String pRecipientEmailAddress,
                                       java.lang.String pClaimCode)
This method will create an EmailEvent that corresponds to the message to send out. It will send the message to the supplied email address. Additionally, it can take a claim code which is tied to the claimable repository. That is, by default the claim code can be used to obtain something from the claimable repository. The EmailEvent is created with the message body that is returned by the createEmailMessageBody method. Also, the from address is set to the defaultFromAddress property of this class.

Parameters:
pRecipientEmailAddress - email address that this email will be sent to
pClaimCode - code to claim something from the ClaimableRepository
Returns:
a value of type 'EmailEvent'

createEmailMessageBody

protected java.lang.String createEmailMessageBody(ElectronicFulfiller of,
                                                  java.lang.String pClaimCode)
Creates the email message body that will be put into the email. By default it just appends the claim code onto the defaultMessageBody property.

Parameters:
pClaimCode - code that is used to claim things from the ClaimbleRepository
Returns:
the email message body