com.bankframe.fe.statemachine.ext.apploaders.sax
Class Event

java.lang.Object
  extended bycom.bankframe.fe.statemachine.base.apploaders.Event
      extended bycom.bankframe.fe.statemachine.ext.apploaders.sax.Event
All Implemented Interfaces:
IEvent, IEvent, IProcessUser

public class Event
extends Event
implements IEvent

This class represents an event in the application. The loader will create an instance of this class whenever it finds Event elements in the xml document. It will then add the new event to the State object that owns it.

Author:
engineering

Constructor Summary
Event(org.xml.sax.Attributes atts, Application application)
          This constructor creates a new Event, the Event is initialised with the attribute set given.
 
Method Summary
 boolean acceptsSession(IUserSession session)
          Returns true if the given user session has permission to fire this event.
 void addInputDefinition(IInputDefinition definition)
           
 void addTransition(StateTransition trans)
           
 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.
 IInputRequirements getInputRequirements()
           
 java.lang.String getName()
          Returns the name of this Event.
 java.util.Iterator getProcesses()
          This method returns the processes used by this object.
 java.util.ArrayList getProcessNamesList()
          Returns the processNamesList.
 ProcessUser getProcessUser()
          Returns the processUser.
 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()
          This method is currently not implemented, returns null.
 java.util.Properties getUserProperties()
          This method is currently not implemented, returns null.
 void initializeProcessUser(java.util.Map processMap)
           
 boolean isDefaultEvent()
          This method returns true if this Event represents a default event.
 boolean requiresValidation()
           
 void setControllerProperties(java.util.Properties newControllerProperties)
           
 void setProcessNamesList(java.util.ArrayList processNamesList)
          Sets the processNamesList.
 void setRequiresValidation(boolean newRequiresValidation)
           
 
Methods inherited from class com.bankframe.fe.statemachine.base.apploaders.Event
getTitle, getUserProperties
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Event

public Event(org.xml.sax.Attributes atts,
             Application application)
This constructor creates a new Event, the Event is initialised with the attribute set given.

The attribute set should contain the following attributes:
name, the event
controller, the name of the class that handles the even
isDefault should be set to true if this event is a default event, this attribute is optional.

Parameters:
atts - org.xml.sax.Attributes
application - com.bankframe.fe.sm.saxapploader.Application the application this Event belongs to.
Method Detail

addTransition

public void addTransition(StateTransition trans)
Parameters:
trans -

allowsResult

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

Specified by:
allowsResult in interface IEvent
Overrides:
allowsResult in class Event
Parameters:
state -
Returns:
boolean
See Also:
IEvent.allowsResult(IState)

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
Overrides:
allowsResult in class Event
Parameters:
transition -
Returns:
transition
See Also:
IEvent.allowsResult(IStateTransition)

getController

public IController getController()
                          throws ControllerNotFoundException
Description copied from interface: IEvent
Returns the IController implementor which handles this Event.

Specified by:
getController in interface IEvent
Overrides:
getController in class Event
Returns:
IController instance
Throws:
ControllerNotFoundException
See Also:
exception ControllerNotFoundException

getName

public java.lang.String getName()
Description copied from interface: IEvent
Returns the name of this Event.

Specified by:
getName in interface IEvent
Overrides:
getName in class Event
Returns:
name
See Also:
IEvent.getName()

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
Overrides:
getStateTransitions in class Event
Returns:
stateTransition
See Also:
IEvent.getStateTransitions()

getTransition

public IStateTransition getTransition(java.lang.String name)
Description copied from interface: IEvent
Returns the state transition with the given name.

Specified by:
getTransition in interface IEvent
Overrides:
getTransition in class Event
Parameters:
name -
Returns:
IStateTransition instance
See Also:
IEvent.getTransition(String)

getUnitOfWork

public IUnitOfWork getUnitOfWork()
This method is currently not implemented, returns null.

Specified by:
getUnitOfWork in interface IEvent
Overrides:
getUnitOfWork in class Event
Returns:
boolean

getUserProperties

public java.util.Properties getUserProperties()
This method is currently not implemented, returns null.

Specified by:
getUserProperties in interface IEvent
Overrides:
getUserProperties in class Event
Returns:
boolean
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
Overrides:
getControllerProperties in class Event

setControllerProperties

public void setControllerProperties(java.util.Properties newControllerProperties)
Specified by:
setControllerProperties in interface IEvent

isDefaultEvent

public boolean isDefaultEvent()
This method returns true if this Event represents a default event.

Returns:
boolean

acceptsSession

public boolean acceptsSession(IUserSession session)
Description copied from interface: IEvent
Returns true if the given user session has permission to fire this event.

Specified by:
acceptsSession in interface IEvent
Overrides:
acceptsSession in class Event
Parameters:
session - the user session to check
Returns:
true if the session has an acceptable set of auth tokens.
See Also:
IEvent.acceptsSession(IUserSession)

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
Overrides:
getTitle in class Event
See Also:
IEvent.getTitle()

getProcesses

public java.util.Iterator getProcesses()
Description copied from interface: IProcessUser
This method returns the processes used by this object.

Specified by:
getProcesses in interface IProcessUser
See Also:
IProcessUser.getProcesses()

getInputRequirements

public IInputRequirements getInputRequirements()
Specified by:
getInputRequirements in interface IEvent
See Also:
IEvent.getInputRequirements()

addInputDefinition

public void addInputDefinition(IInputDefinition definition)

getProcessUser

public ProcessUser getProcessUser()
Returns the processUser.

Returns:
ProcessUser

getProcessNamesList

public java.util.ArrayList getProcessNamesList()
Returns the processNamesList.

Returns:
ArrayList

setProcessNamesList

public void setProcessNamesList(java.util.ArrayList processNamesList)
Sets the processNamesList.

Parameters:
processNamesList - The processNamesList to set

initializeProcessUser

public void initializeProcessUser(java.util.Map processMap)

requiresValidation

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

setRequiresValidation

public void setRequiresValidation(boolean newRequiresValidation)


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