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

Method Summary
 java.util.Collection getAllPossibleStatemachines(java.lang.Object oSubmachineState)
          Returns all statemachines that can be the statemachine the given submachinestate represents.
 MStateVertex getDestination(MTransition 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.
 MStateVertex getSource(MTransition 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(MStateMachine 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
 

Method Detail

getHelper

public static StateMachinesHelper getHelper()
Singleton instance access method.


getSource

public MStateVertex getSource(MTransition 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 MStateVertex getDestination(MTransition 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.

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.


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(MStateMachine 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.

Returns:
Collection


ArgoUML © 1996-2003 (20040216)ArgoUML Project HomeArgoUML Cookbook