org.argouml.model.uml.behavioralelements.statemachines
Class StateMachinesHelper

java.lang.Object
  |
  +--org.argouml.model.uml.behavioralelements.statemachines.StateMachinesHelper

public class StateMachinesHelper
extends java.lang.Object

Helper class for UML BehavioralElements::StateMachines Package. Current implementation is a placeholder.

Since:
ARGO0.11.2

Field Summary
private static StateMachinesHelper SINGLETON
          Singleton instance.
 
Constructor Summary
private StateMachinesHelper()
          Don't allow instantiation.
 
Method Summary
 java.util.Collection getAllPossibleStatemachines(java.lang.Object oSubmachineState)
          Returns all statemachines that can be the statemachine the given submachinestate represents.
 java.lang.Object getDestination(java.lang.Object trans)
          Returns the destination of the given transition.
static StateMachinesHelper getHelper()
          Singleton instance access method.
 java.util.Collection getOutgoingStates(java.lang.Object ostatevertex)
          Gets all statevertices that are a target to transitions outgoing from the given statevertex.
 java.lang.Object getSource(java.lang.Object trans)
          Returns the source of the given transition.
 MStateMachine getStateMachine(java.lang.Object oStateVertex)
          Gets the statemachine that contains the given parameter oState.
 MState getTop(java.lang.Object sm)
           
 boolean isAddingStatemachineAllowed(java.lang.Object context)
          Returns true if a statemachine may be added to the given context.
 void setEventAsTrigger(java.lang.Object transition, java.lang.Object event)
          Couples a given event to the given transition as being trigger event.
 void setStatemachineAsSubmachine(java.lang.Object oSubmachineState, java.lang.Object oStatemachine)
          Connects a given statemachine to a submachinestate as being the statemachine the submachinestate represents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SINGLETON

private static StateMachinesHelper SINGLETON
Singleton instance.

Constructor Detail

StateMachinesHelper

private StateMachinesHelper()
Don't allow instantiation.

Method Detail

getHelper

public static StateMachinesHelper getHelper()
Singleton instance access method.


getSource

public java.lang.Object getSource(java.lang.Object trans)
Returns the source of the given transition. This operation is here to give a full implementation of all getSource and getDestination methods on the uml helpers.

Parameters:
trans -
Returns:
MStateVertex

getDestination

public java.lang.Object getDestination(java.lang.Object trans)
Returns the destination of the given transition. This operation is here to give a full implementation of all getSource and getDestination methods on the uml helpers.

Parameters:
trans -
Returns:
MStateVertex

getStateMachine

public MStateMachine getStateMachine(java.lang.Object oStateVertex)
Gets the statemachine that contains the given parameter oState. Traverses the state hierarchy of the statemachine untill the statemachine is reached. To decouple ArgoUML as much as possible from the NSUML model, the parameter of the method is of type Object.

Parameters:
oStateVertex - The state for which we want to know the statemachine
Returns:
MStateMachine The statemachine the state belongs too or null if the given parameter is not a state or null itself.

setEventAsTrigger

public void setEventAsTrigger(java.lang.Object transition,
                              java.lang.Object event)
Couples a given event to the given transition as being trigger event. To decouple ArgoUML as much as possible from the NSUML model, the parameters of the method are of type Object.

Parameters:
transition -
event -

isAddingStatemachineAllowed

public boolean isAddingStatemachineAllowed(java.lang.Object context)
Returns true if a statemachine may be added to the given context. To decouple ArgoUML as much as possible from the NSUML model, the parameter of the method is of type Object.

Parameters:
context -
Returns:
boolean

getAllPossibleStatemachines

public java.util.Collection getAllPossibleStatemachines(java.lang.Object oSubmachineState)
Returns all statemachines that can be the statemachine the given submachinestate represents. To decouple ArgoUML as much as possible from the NSUML model, the parameter of the method is of type Object.

Parameters:
oSubmachineState - The submachinestate we are searching the statemachines for.
Returns:
Collection The collection with found statemachines.

setStatemachineAsSubmachine

public void setStatemachineAsSubmachine(java.lang.Object oSubmachineState,
                                        java.lang.Object oStatemachine)
Connects a given statemachine to a submachinestate as being the statemachine the submachinestate represents. To decouple ArgoUML as much as possible from the NSUML model, the parameters of the method are of type Object.

Parameters:
oSubmachineState - The submachinestate for which we want to set the property submachine
oStatemachine - The statemachine

getTop

public MState getTop(java.lang.Object sm)

getOutgoingStates

public java.util.Collection getOutgoingStates(java.lang.Object ostatevertex)
Gets all statevertices that are a target to transitions outgoing from the given statevertex.

Parameters:
ostatevertex -
Returns:
Collection


ArgoUML © 1996-2004 (20040306)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook