© 2001 BEA Systems, Inc.

com.bea.commerce.campaign
Class EndStateAction

java.lang.Object
  |
  +--com.bea.commerce.campaign.action.Action
        |
        +--com.bea.commerce.campaign.EndStateAction
All Implemented Interfaces:
CampaignConstants, java.io.Serializable

public class EndStateAction
extends Action
implements CampaignConstants

An action which supports marking a user as done in a campaign/scenario.

This understands the following initialization parameters:

See Also:
Serialized Form

Field Summary
protected  boolean endState
          Does this constitute an end state.
 
Fields inherited from interface com.bea.commerce.campaign.CampaignConstants
ACTION_SERVICE_HOME, AD_BUCKET_SERVICE_HOME, AD_CONFLICT_RESOLVER_HOME, AD_SERVICE_HOME, CAMPAIGN_REPOSITORY_HOME, CAMPAIGN_SERVICE_HOME, PLACEHOLDER_SERVICE_HOME, SCENARIO_REPOSITORY_HOME, SCENARIO_SERVICE_HOME
 
Constructor Summary
EndStateAction()
           
 
Method Summary
static ActionDef getActionDef()
          Debug method.
 ScenarioService getScenarioService()
          Get the scenario service.
 java.lang.String getUserId()
          Get the user id (from the event).
 void init(java.util.Map params)
          Initialize this action from the action parameters.
 void run()
          Execute this action.
 
Methods inherited from class com.bea.commerce.campaign.action.Action
getEvent, getRandom, getRequest, getScenario, getScenarioContainer, getScenarioContainerName, getScenarioId, getScenarioName, getServiceLocator, getSession, getTimestamp, getUser, locateService, setEvent, setRandom, setRequest, setScenario, setScenarioContainer, setServiceLocator, setSession, setTimestamp, setUser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

endState

protected boolean endState
Does this constitute an end state.
Constructor Detail

EndStateAction

public EndStateAction()
Method Detail

getActionDef

public static ActionDef getActionDef()
Debug method.

init

public void init(java.util.Map params)
          throws java.lang.IllegalArgumentException
Initialize this action from the action parameters.
Overrides:
init in class Action
Parameters:
params - the action parameters.
Throws:
java.lang.IllegalArgumentException - thrown on invalid action parameters.

run

public void run()
         throws ActionException
Execute this action.

This will set an end state flag for the user for the scenario in the scenario container.

Overrides:
run in class Action
Throws:
ActionException - thrown on an error.

getScenarioService

public ScenarioService getScenarioService()
                                   throws javax.ejb.CreateException
Get the scenario service.
Throws:
CreateException - thrown on an error getting the scenario service.

getUserId

public java.lang.String getUserId()
Get the user id (from the event).
Overrides:
getUserId in class Action
See Also:
ScenarioHelper.getUserId(com.bea.commerce.platform.events.Event)

© 2001 BEA Systems, Inc.

Copyright © 2001 BEA Systems, Inc. All Rights Reserved