|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.campaign.action.Action
Base class for a campaign/scenario action.
An Action defines the behavior that will result from a rule firing in
a Scenario. Actions should have the following objects set on after
init() is called, but before run()
is called:
Event
that
triggered this action.
Request
that triggered this action.
Scenario
this action is executed for.
ScenarioContainer
the scenario is part of. This
should be a Campaign.
ServiceLocator
to use to find services.
Session
that
triggered this action.
Constructor Summary | |
Action()
|
Method Summary | |
Event |
getEvent()
Get the event that initially triggered this action. |
java.lang.Number |
getRandom()
Get the random that was used in the scenario rules. |
Request |
getRequest()
Get the request this Action is executing in. |
Scenario |
getScenario()
Get the scenario that created this Action. |
ScenarioContainer |
getScenarioContainer()
Get the that this action was created under. |
java.lang.String |
getScenarioContainerName()
Get the name of the ScenarioContainer |
java.lang.String |
getScenarioId()
Get the id of the scenario that created this Action |
java.lang.String |
getScenarioName()
Get the name of the scenario that created this Action |
ServiceLocator |
getServiceLocator()
Get the ServiceLocator given to this action |
Session |
getSession()
Get the session this Action is executing in. |
java.sql.Timestamp |
getTimestamp()
Get the timestamp of the event that caused this action. |
ProfileWrapper |
getUser()
Get the user this Action is executing for. |
java.lang.String |
getUserId()
Get the userId associated with the event that triggered this Action |
abstract void |
init(java.util.Map params)
Initialize the action with an arbitrary set of parameters. |
java.lang.Object |
locateService(java.lang.String name)
Use this Action's ServiceLocator to lookup a service |
abstract void |
run()
Run the behavior defined in the implementation of this Action. |
void |
setEvent(Event evt)
Set the event that initially triggered this action This will be called by the ScenarioService prior to running the Action. |
void |
setRandom(java.lang.Number n)
Set the random number that was used in the scenario rules. |
void |
setRequest(Request aRequest)
Set the request this Action is executing in This will be called by the ScenarioService prior to running the Action. |
void |
setScenario(Scenario s)
Set the scenario that created this Action This will be called by the ScenarioService prior to running the Action. |
void |
setScenarioContainer(ScenarioContainer s)
Set the ScenarioContainer that this action was created under This will be called by the ScenarioService prior to running the Action. |
void |
setServiceLocator(ServiceLocator s)
Set a ServiceLocator for this Action to use. |
void |
setSession(Session aSession)
Set the session this Action is executing in This will be called by the ScenarioService prior to running the Action. |
void |
setTimestamp(java.sql.Timestamp s)
Set the timestamp of the event that caused this action This will be called by the ScenarioService prior to running the Action. |
void |
setUser(ProfileWrapper aUser)
Set the user this Action is executing for This will be called by the ScenarioService prior to running the Action. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Action()
Method Detail |
public abstract void run() throws ActionException
public abstract void init(java.util.Map params) throws java.lang.IllegalArgumentException
params
- A map of name/value pairspublic void setServiceLocator(ServiceLocator s)
s
- the ServiceLocatorpublic ServiceLocator getServiceLocator()
public java.lang.Object locateService(java.lang.String name)
name
- the name of the servicepublic void setEvent(Event evt)
public Event getEvent()
public void setUser(ProfileWrapper aUser)
public ProfileWrapper getUser()
public java.lang.String getUserId()
public void setRequest(Request aRequest)
public Request getRequest()
public void setSession(Session aSession)
public Session getSession()
public void setScenario(Scenario s)
public Scenario getScenario()
public java.lang.String getScenarioName()
public java.lang.String getScenarioId()
public void setScenarioContainer(ScenarioContainer s)
public ScenarioContainer getScenarioContainer()
public java.lang.String getScenarioContainerName()
public void setTimestamp(java.sql.Timestamp s)
public java.sql.Timestamp getTimestamp()
public void setRandom(java.lang.Number n)
public java.lang.Number getRandom()
|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |