com.bankframe.fe.statemachine.base.apploaders
Class StartupEvent

java.lang.Object
  extended bycom.bankframe.fe.statemachine.base.apploaders.StartupEvent
All Implemented Interfaces:
IEvent

public class StartupEvent
extends java.lang.Object
implements IEvent


Constructor Summary
StartupEvent(IState startState, java.lang.String controllerName)
          Creates new StartupEvent
 
Method Summary
 boolean acceptsSession(IUserSession session)
          Returns true if the given user session has permission to fire this event.
 boolean allowsResult(IState state)
          Returns true if the given State is allowed as a result from this Event.
 boolean allowsResult(IStateTransition transition)
          Returns true if the given state transition is allowed from this event.
 IController getController()
          Returns the IController implementor which handles this Event.
 java.util.Properties getControllerProperties()
          Returns the controllerProperties assiciated with this Event.
 java.lang.String getName()
          Returns the name of this Event.
 java.util.Enumeration getStateTransitions()
          Returns all allowed state transitions from this event as a java.util.Enumeration.
 java.lang.String getTitle()
          This method returns a descriptive name for the Event.
 IStateTransition getTransition(java.lang.String name)
          Returns the state transition with the given name.
 IUnitOfWork getUnitOfWork()
          Gets the UnitOfWork which contains this event.
 java.util.Properties getUserProperties()
          Returns the userProperties assiciated with this Event.
 boolean requiresValidation()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StartupEvent

public StartupEvent(IState startState,
                    java.lang.String controllerName)
Creates new StartupEvent

Method Detail

getUnitOfWork

public IUnitOfWork getUnitOfWork()
Gets the UnitOfWork which contains this event.

As a StartupEvent will never be in a UnitOfWork, this method returns null.

Specified by:
getUnitOfWork in interface IEvent
Returns:
the UnitOfWork containing this event, or null.

getTitle

public java.lang.String getTitle()
This method returns a descriptive name for the Event. Where appropriate, the return from this method can be used in views in place of the name.

Specified by:
getTitle in interface IEvent
Returns:
the title for this Event.

getTransition

public IStateTransition getTransition(java.lang.String name)
Returns the state transition with the given name. A StartupEvent contains only one transition, so the parameter to this method is ignored.

Specified by:
getTransition in interface IEvent
Returns:
the state transition with the given name.

getStateTransitions

public java.util.Enumeration getStateTransitions()
Returns all allowed state transitions from this event as a java.util.Enumeration.

Specified by:
getStateTransitions in interface IEvent
Returns:
all allowed state transitions from this event.

getName

public java.lang.String getName()
Returns the name of this Event.

Specified by:
getName in interface IEvent
Returns:
the name of this Event.

allowsResult

public boolean allowsResult(IStateTransition transition)
Returns true if the given state transition is allowed from this event.

Specified by:
allowsResult in interface IEvent
Returns:
true if the given state transition is allowable from thsi event.

getUserProperties

public java.util.Properties getUserProperties()
Returns the userProperties assiciated with this Event.

Specified by:
getUserProperties in interface IEvent
Returns:
userProperties;

getControllerProperties

public java.util.Properties getControllerProperties()
Returns the controllerProperties assiciated with this Event.

Specified by:
getControllerProperties in interface IEvent
Returns:
controllerProperties;

allowsResult

public boolean allowsResult(IState state)
Returns true if the given State is allowed as a result from this Event.

Specified by:
allowsResult in interface IEvent
Parameters:
state - the state to be tested
Returns:
true if the state is an allowable result from this event.

getController

public IController getController()
                          throws ControllerNotFoundException
Returns the IController implementor which handles this Event.

A controller class for the startup event can be specified through the com.bankframe.fe.statemachine.base.StartupController property. If none is specified, com.bankframe.fe.statemachine.base.apps.SimpleController is used.

Specified by:
getController in interface IEvent
Returns:
IController instance.
Throws:
ControllerNotFoundException

acceptsSession

public boolean acceptsSession(IUserSession session)
Returns true if the given user session has permission to fire this event. A startup event accepts all sessions. This method returns true.

Specified by:
acceptsSession in interface IEvent
Parameters:
session - the user session attempting to access this event.
Returns:
true if this event can accept this user session.

requiresValidation

public boolean requiresValidation()
Specified by:
requiresValidation in interface IEvent


Copyright © 2004 Siebel Systems, Inc. All rights reserved.