com.bea.campaign
Interface ScenarioService

All Superinterfaces
javax.ejb.EJBObject, Remote, ServiceLocator

public interface ScenarioService
extends javax.ejb.EJBObject, ServiceLocator

The EJB object interface of the scenario service.


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

Method Detail

handleEvent

boolean handleEvent(Map scenarioIdMap,
                    Event evt)
                    throws RemoteException,
                           javax.ejb.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.
Throws
javax.ejb.EJBException - thrown on an error.
RemoteException - thrown on a communications error.

handleEvent

boolean handleEvent(ScenarioContainer container,
                    Event evt,
                    Collection scenarioIds)
                    throws RemoteException,
                           javax.ejb.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.
Throws
javax.ejb.EJBException - thrown on an error.
RemoteException - thrown on a communications error.

getDeployedScenarios

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

Throws
javax.ejb.EJBException - thrown on an error.
RemoteException - thrown on a communications error.

getActiveScenarios

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

This will be a subset of the deployed scenarios.

Throws
javax.ejb.EJBException - thrown on an error.
RemoteException - thrown on a communications error.

getScenario

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

Returns
the scenario, or null if not found.
Throws
javax.ejb.EJBException - thrown on an error.
RemoteException - thrown on a communications error.

getRulesManager

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

Throws
javax.ejb.EJBException - thrown on an error.
RemoteException - thrown on a communications error.

getUserEndStates

Collection getUserEndStates(String userId,
                            ScenarioContainer container,
                            Collection scenarioIds)
                            throws RemoteException,
                                   javax.ejb.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.
Throws
javax.ejb.EJBException - thrown on an error.
RemoteException - thrown on a communications error.

setUserEndState

void setUserEndState(String userId,
                     ScenarioContainer container,
                     String scenarioId)
                     throws RemoteException,
                            javax.ejb.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.
Throws
javax.ejb.EJBException - thrown on an error.
RemoteException - thrown on a communications error.

clearEndStates

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

Parameters
container - the ScenarioContainer.
Throws
javax.ejb.EJBException - thrown on an error.
RemoteException - thrown on a communications error.

clearEndStates

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

Parameters
scenarioId - the scenario id.
Throws
javax.ejb.EJBException - thrown on an error.
RemoteException - thrown on a communications error.


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.