ScenarioService Interface

com.bea.campaign
ScenarioService Interface

public interface ScenarioService

    extends EJBObject, ServiceLocator

The EJB object interface of the scenario service.


All Superinterfaces
EJBObject, Remote, ServiceLocator

Method Summary

public void
clearEndStates(ScenarioContainer container)
Clear the user end states for the specified scenario container.
public void
clearEndStates(String scenarioId)
Clear the user end states for the specified scenario.
public Collection
getActiveScenarios()
Get the list of active scenarios.
public Collection
getDeployedScenarios()
Get the list of deployed scenarios.
public RulesManager
getRulesManager()
Get a reference to the rules service this uses.
public Scenario
getScenario(String id)
Get the specified deployed scenario.
public Collection
getUserEndStates(String userId, ScenarioContainer container, Collection scenarioIds)
Get the list of scenario ids for which the user has reached an end state, under the specified container.
public boolean
handleEvent(Map scenarioIdMap, Event evt)
Handle an event by executing the rules associated with the specified scenarios.
public boolean
handleEvent(ScenarioContainer container, Event evt, Collection scenarioIds)
Handle an event by executing the rules associated to the specified scenarios.
public void
setUserEndState(String userId, ScenarioContainer container, String scenarioId)
Set that a user reached an end state in container/scenario combination.
 
Methods from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 
Methods from interface com.bea.campaign.ServiceLocator
locateService
   

Method Detail

clearEndStates(ScenarioContainer) Method

public void clearEndStates(ScenarioContainer container)
throws RemoteException, EJBException
Clear the user end states for the specified scenario container.

Parameters

container
the ScenarioContainer.

Exceptions

RemoteException
thrown on a communications error.
EJBException
thrown on an error.

clearEndStates(String) Method

public void clearEndStates(String scenarioId)
throws RemoteException, EJBException
Clear the user end states for the specified scenario.

Parameters

scenarioId
the scenario id.

Exceptions

RemoteException
thrown on a communications error.
EJBException
thrown on an error.

getActiveScenarios() Method

public Collection getActiveScenarios()
throws RemoteException, EJBException
Get the list of active scenarios.

This will be a subset of the deployed scenarios.

Exceptions

RemoteException
thrown on a communications error.
EJBException
thrown on an error.

getDeployedScenarios() Method

public Collection getDeployedScenarios()
throws RemoteException, EJBException
Get the list of deployed scenarios.

Exceptions

RemoteException
thrown on a communications error.
EJBException
thrown on an error.

getRulesManager() Method

public RulesManager getRulesManager()
throws RemoteException, EJBException
Get a reference to the rules service this uses.

Exceptions

RemoteException
thrown on a communications error.
EJBException
thrown on an error.

getScenario(String) Method

public Scenario getScenario(String id)
throws RemoteException, EJBException
Get the specified deployed scenario.

Returns

the scenario, or null if not found.

Exceptions

RemoteException
thrown on a communications error.
EJBException
thrown on an error.

getUserEndStates(String, ScenarioContainer, Collection) Method

public Collection getUserEndStates(String userId, 
                                   ScenarioContainer container, 
                                   Collection scenarioIds)
throws RemoteException, EJBException
Get the list of scenario ids for which the user has reached an end state, under the specified container.

Parameters

userId
the user id.
container
the ScenarioContainer.
scenarioIds
the list of ids of scenarios (null or empty for all).

Returns

the list of scenario ids for which the user has reached an end state.

Exceptions

RemoteException
thrown on a communications error.
EJBException
thrown on an error.

handleEvent(Map, Event) Method

public boolean handleEvent(Map scenarioIdMap, 
                           Event evt)
throws RemoteException, EJBException
Handle an event by executing the rules associated with the specified scenarios.

Parameters

scenarioIdMap
the map of ScenarioContainer to scenario ids to execute.
evt
the event.

Returns

true if the event was valid, false if it was not.

Exceptions

RemoteException
thrown on a communications error.
EJBException
thrown on an error.

handleEvent(ScenarioContainer, Event, Collection) Method

public boolean handleEvent(ScenarioContainer container, 
                           Event evt, 
                           Collection scenarioIds)
throws RemoteException, EJBException
Handle an event by executing the rules associated to the specified scenarios.

Parameters

container
the scenario container to execute under.
evt
the event.
scenarioIds
the list of ids of scenarios to run this against (empty or null for all).

Returns

true if the event was valid, false if it was not.

Exceptions

RemoteException
thrown on a communications error.
EJBException
thrown on an error.

setUserEndState(String, ScenarioContainer, String) Method

public void setUserEndState(String userId, 
                            ScenarioContainer container, 
                            String scenarioId)
throws RemoteException, EJBException
Set that a user reached an end state in container/scenario combination.

Parameters

userId
the user id.
container
the ScenarioContainer.
scenarioId
the scenario id.

Exceptions

RemoteException
thrown on a communications error.
EJBException
thrown on an error.