com.bea.campaign.action
Class MailAction

java.lang.Object
  extended by com.bea.campaign.action.Action
      extended by com.bea.campaign.action.MailAction
All Implemented Interfaces
Serializable

public class MailAction
extends Action

Action implementation to send email to a user. All params will be passed to the MailService. By default this will add the new message to a batch, but can also send messages immediately.

See Also
Serialized Form

Field Summary
static String BATCH_MODE
          parameter key to flag batch-mode (defaults to true)
static String CONTAINER_ID_JSP_PARAM
          The name of the jsp parameter that will contain the current scenario container id.
static String CONTAINER_NAME_JSP_PARAM
          The name of the jsp parameter that will contain the current scenario container name.
static String DEFAULT_FROM_ADDRESS_KEY
          Deprecated No longer used.
static String EMAIL_PROPERTY_NAME_KEY
          Deprecated No longer used.
static String EMAIL_PROPERTY_SET_KEY
          Deprecated No longer used.
static String FROM_PARAM
          parameter key for the from address
static String GLOBAL_BATCH
          global batch name (if none is provided)
static String JSP_PARAMS
          parameter key for a map of JSP parameters to pass
static String JSP_URI
          parameter key for the URI of a JSP to use to generate the message
static String MESSAGE_HEADERS
          parameter key for a map of mail headers
static String MESSAGE_TEXT_PARAM
          parameter key for the message text
static String OPT_IN_PROPERTY_NAME_KEY
          Deprecated  
static String OPT_IN_PROPERTY_SET_KEY
          Deprecated No longer used.
static String SCENARIO_ID_JSP_PARAM
          The name of the jsp parameter that will contain the current scenario id.
static String SCENARIO_NAME_JSP_PARAM
          The name of the jsp parameter that will contain the current scenario name.
static String SUBJECT_PARAM
          parameter key for the mail subject
static String TO_PARAM
          parameter key for the to address
static String USER_ID_JSP_PARAM
          The name of the jsp parameter that will contain the current user id.
 
Constructor Summary
MailAction()
           
 
Method Summary
protected  MailService getMailService()
           
 void init(Map params)
          Initialize the MailAction so that it can generate and batch a message.
 void run()
          Run the Action; in this case, create an email based on the parameters received in the init() method.
 String toString()
           
 
Methods inherited from class com.bea.campaign.action.Action
getEvent, getRandom, getRequest, getScenario, getScenarioContainer, getScenarioContainerName, getScenarioId, getScenarioName, getServiceLocator, getSession, getTimestamp, getUser, getUserId, locateService, setEvent, setRandom, setRequest, setScenario, setScenarioContainer, setServiceLocator, setSession, setTimestamp, setUser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_FROM_ADDRESS_KEY

public static final String DEFAULT_FROM_ADDRESS_KEY
Deprecated No longer used.
The name of the property which holds the "from" address to use in emails, if it is not provided

See Also
Constants Summary

EMAIL_PROPERTY_NAME_KEY

public static final String EMAIL_PROPERTY_NAME_KEY
Deprecated No longer used.
The name of the property which holds the name of the User property used to lookup the user's email address

See Also
Constants Summary

EMAIL_PROPERTY_SET_KEY

public static final String EMAIL_PROPERTY_SET_KEY
Deprecated No longer used.
The name of the property which holds the User property set to lookup the user's email address

See Also
Constants Summary

OPT_IN_PROPERTY_SET_KEY

public static final String OPT_IN_PROPERTY_SET_KEY
Deprecated No longer used.
The name of the property set which holds the email opt-in property

See Also
Constants Summary

OPT_IN_PROPERTY_NAME_KEY

public static final String OPT_IN_PROPERTY_NAME_KEY
Deprecated 
The name of the email opt-in property. If this property is false for a user, email will not be sent by the EmailAction

See Also
Constants Summary

SUBJECT_PARAM

public static final String SUBJECT_PARAM
parameter key for the mail subject

See Also
Constants Summary

MESSAGE_TEXT_PARAM

public static final String MESSAGE_TEXT_PARAM
parameter key for the message text

See Also
Constants Summary

FROM_PARAM

public static final String FROM_PARAM
parameter key for the from address

See Also
Constants Summary

TO_PARAM

public static final String TO_PARAM
parameter key for the to address

See Also
Constants Summary

JSP_URI

public static final String JSP_URI
parameter key for the URI of a JSP to use to generate the message

See Also
Constants Summary

JSP_PARAMS

public static final String JSP_PARAMS
parameter key for a map of JSP parameters to pass

See Also
Constants Summary

MESSAGE_HEADERS

public static final String MESSAGE_HEADERS
parameter key for a map of mail headers

See Also
Constants Summary

BATCH_MODE

public static final String BATCH_MODE
parameter key to flag batch-mode (defaults to true)

See Also
Constants Summary

GLOBAL_BATCH

public static final String GLOBAL_BATCH
global batch name (if none is provided)

See Also
Constants Summary

USER_ID_JSP_PARAM

public static final String USER_ID_JSP_PARAM
The name of the jsp parameter that will contain the current user id. If a parameter with this name is provided, it will be overwritten.

See Also
Constants Summary

CONTAINER_ID_JSP_PARAM

public static final String CONTAINER_ID_JSP_PARAM
The name of the jsp parameter that will contain the current scenario container id. If a parameter with this name is provided, it will be overwritten.

See Also
Constants Summary

CONTAINER_NAME_JSP_PARAM

public static final String CONTAINER_NAME_JSP_PARAM
The name of the jsp parameter that will contain the current scenario container name. If a parameter with this name is provided, it will be overwritten.

See Also
Constants Summary

SCENARIO_ID_JSP_PARAM

public static final String SCENARIO_ID_JSP_PARAM
The name of the jsp parameter that will contain the current scenario id. If a parameter with this name is provided, it will be overwritten.

See Also
Constants Summary

SCENARIO_NAME_JSP_PARAM

public static final String SCENARIO_NAME_JSP_PARAM
The name of the jsp parameter that will contain the current scenario name. If a parameter with this name is provided, it will be overwritten.

See Also
Constants Summary
Constructor Detail

MailAction

public MailAction()
Method Detail

run

public void run()
         throws ActionException
Run the Action; in this case, create an email based on the parameters received in the init() method.

Specified by:
run in class Action
Throws
ActionException - will be thrown if an error occurs

init

public void init(Map params)
          throws IllegalArgumentException
Initialize the MailAction so that it can generate and batch a message.

Parameters are:

Specified by:
init in class Action
Parameters
params - A map of name/value pairs
Throws
IllegalArgumentException - if any required params are missing

getMailService

protected MailService getMailService()
                              throws Exception
Throws
Exception

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.