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

java.lang.Object
  extended bycom.bankframe.fe.statemachine.base.apploaders.Event
All Implemented Interfaces:
IEvent
Direct Known Subclasses:
Event, Event

public abstract class Event
extends java.lang.Object
implements IEvent


Constructor Summary
Event()
           
 
Method Summary
 boolean acceptsSession(IUserSession session)
          This implementation of acceptsSession checks the authTokens contained in the user session against an internal list auth tokens.
 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 user properties for the state transition.
 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.
 java.lang.String getTitle(java.util.Locale locale)
          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.
 java.util.Properties getUserProperties(java.util.Locale locale)
          Returns the userProperties assiciated with this Event.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.bankframe.fe.statemachine.base.apploaders.IEvent
requiresValidation
 

Constructor Detail

Event

public Event()
Method Detail

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 test against the event's state transitions.
Returns:
boolean

getName

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

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

getController

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

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

getUnitOfWork

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

May be null.

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

getStateTransitions

public java.util.Enumeration getStateTransitions()
Description copied from interface: IEvent
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.

allowsResult

public boolean allowsResult(IStateTransition transition)
Description copied from interface: IEvent
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.

getTransition

public IStateTransition getTransition(java.lang.String name)
Returns the state transition with the given name.

Specified by:
getTransition in interface IEvent
Parameters:
name - the state transition name.
Returns:
IStateTransition instance

getUserProperties

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

Parameters:
locale -
Returns:
userProperties

getTitle

public java.lang.String getTitle(java.util.Locale locale)
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. This implementation returns the name if the title is not defined.

Parameters:
locale -
Returns:
the title for this Event.

acceptsSession

public boolean acceptsSession(IUserSession session)
This implementation of acceptsSession checks the authTokens contained in the user session against an internal list auth tokens.

This method will return ((allRequired || anySufficient) && noForbidden).
In other words, for a session to be accepted it must contain any of this state's sufficient tokens or all of the required tokens, and must not contain any forbidden tokens.

Specified by:
acceptsSession in interface IEvent
Parameters:
session - the user session to check
Returns:
true if the session has an acceptable set of auth tokens.

getTitle

public java.lang.String getTitle()
Description copied from interface: IEvent
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.
See Also:
IEvent.getTitle()

getUserProperties

public java.util.Properties getUserProperties()
Description copied from interface: IEvent
Returns the userProperties assiciated with this Event.

Specified by:
getUserProperties in interface IEvent
Returns:
userProperties;
See Also:
IEvent.getUserProperties()

getControllerProperties

public java.util.Properties getControllerProperties()
Description copied from interface: IEvent
Returns the user properties for the state transition. May be used to store information about side effects or messages, for instance.

Specified by:
getControllerProperties in interface IEvent
Returns:
userProperties


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