© 2001 BEA Systems, Inc.

com.bea.commerce.campaign
Interface ScenarioService

All Superinterfaces:
ServiceLocator

public interface ScenarioService
extends 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.
 RulesManager getRulesManager()
          Get a reference to the rules service this uses.
 java.util.Collection getUserEndStates(java.lang.String userId, ScenarioContainer container, java.util.Collection scenarioIds)
          Get the list of scenario ids for which the user has reached an end state, under the specified container.
 boolean handleEvent(java.util.Map scenarioIdMap, Event evt)
          Handle an event by executing the rules associated with the specified scenarios.
 boolean handleEvent(ScenarioContainer container, Event evt, java.util.Collection scenarioIds)
          Handle an event by executing the rules associated to the specified scenarios.
 void setUserEndState(java.lang.String userId, ScenarioContainer container, java.lang.String scenarioId)
          Set that a user reached an end state in container/scenario combination.
 
Methods inherited from interface com.bea.commerce.campaign.ServiceLocator
locateService
 

Method Detail

handleEvent

public boolean handleEvent(java.util.Map scenarioIdMap,
                           Event evt)
                    throws java.rmi.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:
EJBException - thrown on an error.
java.rmi.RemoteException - thrown on a communications error.

handleEvent

public boolean handleEvent(ScenarioContainer container,
                           Event evt,
                           java.util.Collection scenarioIds)
                    throws java.rmi.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:
EJBException - thrown on an error.
java.rmi.RemoteException - thrown on a communications error.

getRulesManager

public RulesManager getRulesManager()
                             throws java.rmi.RemoteException,
                                    javax.ejb.EJBException
Get a reference to the rules service this uses.
Throws:
EJBException - thrown on an error.
java.rmi.RemoteException - thrown on a communications error.

getUserEndStates

public java.util.Collection getUserEndStates(java.lang.String userId,
                                             ScenarioContainer container,
                                             java.util.Collection scenarioIds)
                                      throws java.rmi.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:
EJBException - thrown on an error.
java.rmi.RemoteException - thrown on a communications error.

setUserEndState

public void setUserEndState(java.lang.String userId,
                            ScenarioContainer container,
                            java.lang.String scenarioId)
                     throws java.rmi.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:
EJBException - thrown on an error.
java.rmi.RemoteException - thrown on a communications error.

clearEndStates

public void clearEndStates(ScenarioContainer container)
                    throws java.rmi.RemoteException,
                           javax.ejb.EJBException
Clear the user end states for the specified scenario container.
Parameters:
container - the ScenarioContainer.
Throws:
EJBException - thrown on an error.
java.rmi.RemoteException - thrown on a communications error.

© 2001 BEA Systems, Inc.

Copyright © 2001 BEA Systems, Inc. All Rights Reserved