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

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

public class StateMachinesFactory
extends AbstractUmlModelFactory

Factory to create UML classes for the UML BehaviorialElements::StateMachines package. MEvent and MStateVertex do not have create methods since they are abstract classes in the NSUML model.

Since:
ARGO0.11.2

Method Summary
 MCallEvent buildCallEvent()
          Builds a callevent whose namespace (and therefore the ownership) is the rootmodel.
 MChangeEvent buildChangeEvent()
          Builds a changeevent whose namespace (and therefore the ownership) is the rootmodel.
 MCompositeState buildCompositeState(MStateMachine statemachine)
          Builds a compositestate as top for some statemachine
 MFinalState buildFinalState(java.lang.Object compositeState)
          Builds a finalstate.
 MGuard buildGuard(java.lang.Object transition)
          Builds a guard condition with a given transition.
 MTransition buildInternalTransition(java.lang.Object state)
          Builds an internal transition for a given state.
 MPseudostate buildPseudoState(java.lang.Object compositeState)
          Builds a pseudostate initialized as a branch pseudostate.
 MSignalEvent buildSignalEvent()
          Builds a signalevent whose namespace (and therefore the ownership) is the rootmodel.
 MSimpleState buildSimpleState(java.lang.Object compositeState)
          Builds a simplestate.
 MStateMachine buildStateMachine(java.lang.Object oContext)
          Builds a state machine owned by the given context
 MStubState buildStubState(java.lang.Object compositeState)
          Builds a stubstate initalized with an empty referenced state.
 MSubmachineState buildSubmachineState(java.lang.Object compositeState)
          Builds a submachinestate.
 MSynchState buildSynchState(java.lang.Object compositeState)
          Builds a synchstate initalized with bound 0.
 MTimeEvent buildTimeEvent()
          Builds a timeevent whose namespace (and therefore the ownership) is the rootmodel.
 MTransition buildTransition(MCompositeState owningState, MStateVertex source, MStateVertex dest)
          Builds a complete transition including all associations (composite state the transition belongs to, source the transition is coming from, destination the transition is going to).
 MTransition buildTransition(java.lang.Object source, java.lang.Object target)
          Build a transition between a source state and a target state.
 MCallEvent createCallEvent()
          Create an empty but initialized instance of a UML CallEvent.
 MChangeEvent createChangeEvent()
          Create an empty but initialized instance of a UML ChangeEvent.
 MCompositeState createCompositeState()
          Create an empty but initialized instance of a UML CompositeState.
 MFinalState createFinalState()
          Create an empty but initialized instance of a UML FinalState.
 MGuard createGuard()
          Create an empty but initialized instance of a UML Guard.
 MPseudostate createPseudostate()
          Create an empty but initialized instance of a UML Pseudostate.
 MSignalEvent createSignalEvent()
          Create an empty but initialized instance of a UML SignalEvent.
 MSimpleState createSimpleState()
          Create an empty but initialized instance of a UML SimpleState.
 MState createState()
          Create an empty but initialized instance of a UML State.
 MStateMachine createStateMachine()
          Create an empty but initialized instance of a UML StateMachine.
 MStubState createStubState()
          Create an empty but initialized instance of a UML StubState.
 MSubmachineState createSubmachineState()
          Create an empty but initialized instance of a UML SubmachineState.
 MSynchState createSynchState()
          Create an empty but initialized instance of a UML SynchState.
 MTimeEvent createTimeEvent()
          Create an empty but initialized instance of a UML TimeEvent.
 MTransition createTransition()
          Create an empty but initialized instance of a UML Transition.
 void deleteCallEvent(MCallEvent elem)
           
 void deleteChangeEvent(MChangeEvent elem)
           
 void deleteCompositeState(MCompositeState elem)
          deletes any associated subVertices.
 void deleteEvent(MEvent elem)
           
 void deleteFinalState(MFinalState elem)
           
 void deleteGuard(MGuard elem)
           
 void deletePseudostate(MPseudostate elem)
           
 void deleteSignalEvent(MSignalEvent elem)
           
 void deleteSimpleState(MSimpleState elem)
           
 void deleteState(MState elem)
           
 void deleteStateMachine(MStateMachine elem)
          deletes its top state, which is a composite state (state vertex).
 void deleteStateVertex(MStateVertex elem)
          Deletes the outgoing and incoming transitions of a statevertex.
 void deleteStubState(MStubState elem)
           
 void deleteSubmachineState(MSubmachineState elem)
           
 void deleteSynchState(MSynchState elem)
           
 void deleteTimeEvent(MTimeEvent elem)
           
 void deleteTransition(MTransition elem)
           
static StateMachinesFactory getFactory()
          Singleton instance access method.
 
Methods inherited from class org.argouml.model.uml.AbstractUmlModelFactory
addListenersToModelElement, initialize, isGuiEnabled, setGuiEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFactory

public static StateMachinesFactory getFactory()
Singleton instance access method.


createCallEvent

public MCallEvent createCallEvent()
Create an empty but initialized instance of a UML CallEvent.

Returns:
an initialized UML CallEvent instance.

createChangeEvent

public MChangeEvent createChangeEvent()
Create an empty but initialized instance of a UML ChangeEvent.

Returns:
an initialized UML ChangeEvent instance.

createCompositeState

public MCompositeState createCompositeState()
Create an empty but initialized instance of a UML CompositeState.

Returns:
an initialized UML CompositeState instance.

createFinalState

public MFinalState createFinalState()
Create an empty but initialized instance of a UML FinalState.

Returns:
an initialized UML FinalState instance.

createGuard

public MGuard createGuard()
Create an empty but initialized instance of a UML Guard.

Returns:
an initialized UML Guard instance.

createPseudostate

public MPseudostate createPseudostate()
Create an empty but initialized instance of a UML Pseudostate.

Returns:
an initialized UML Pseudostate instance.

createSignalEvent

public MSignalEvent createSignalEvent()
Create an empty but initialized instance of a UML SignalEvent.

Returns:
an initialized UML SignalEvent instance.

createSimpleState

public MSimpleState createSimpleState()
Create an empty but initialized instance of a UML SimpleState.

Returns:
an initialized UML SimpleState instance.

createState

public MState createState()
Create an empty but initialized instance of a UML State.

Returns:
an initialized UML State instance.

createStateMachine

public MStateMachine createStateMachine()
Create an empty but initialized instance of a UML StateMachine.

Returns:
an initialized UML StateMachine instance.

createStubState

public MStubState createStubState()
Create an empty but initialized instance of a UML StubState.

Returns:
an initialized UML StubState instance.

createSubmachineState

public MSubmachineState createSubmachineState()
Create an empty but initialized instance of a UML SubmachineState.

Returns:
an initialized UML SubmachineState instance.

createSynchState

public MSynchState createSynchState()
Create an empty but initialized instance of a UML SynchState.

Returns:
an initialized UML SynchState instance.

createTimeEvent

public MTimeEvent createTimeEvent()
Create an empty but initialized instance of a UML TimeEvent.

Returns:
an initialized UML TimeEvent instance.

createTransition

public MTransition createTransition()
Create an empty but initialized instance of a UML Transition.

Returns:
an initialized UML Transition instance.

buildCompositeState

public MCompositeState buildCompositeState(MStateMachine statemachine)
Builds a compositestate as top for some statemachine

Parameters:
statemachine -
Returns:
MCompositeState

buildStateMachine

public MStateMachine buildStateMachine(java.lang.Object oContext)
Builds a state machine owned by the given context

Returns:
MActivityGraph

buildTransition

public MTransition buildTransition(MCompositeState owningState,
                                   MStateVertex source,
                                   MStateVertex dest)
Builds a complete transition including all associations (composite state the transition belongs to, source the transition is coming from, destination the transition is going to). The transition is owned by the compositestate.

Parameters:
owningState -
source -
dest -
Returns:
MTransition

buildPseudoState

public MPseudostate buildPseudoState(java.lang.Object compositeState)
Builds a pseudostate initialized as a branch pseudostate. The pseudostate will be a subvertix of the given compositestate. The parameter compositeState is of type Object to decouple the factory and NSUML as much as possible from the rest of ArgoUML.

Parameters:
compositeState -
Returns:
MPseudostate

buildSynchState

public MSynchState buildSynchState(java.lang.Object compositeState)
Builds a synchstate initalized with bound 0. The synchstate will be a subvertix of the given compositestate. The parameter compositeState is of type Object to decouple the factory and NSUML as much as possible from the rest of ArgoUML.

Parameters:
compositeState -
Returns:
MSynchState

buildStubState

public MStubState buildStubState(java.lang.Object compositeState)
Builds a stubstate initalized with an empty referenced state. The stubstate will be a subvertix of the given compositestate. The parameter compositeState is of type Object to decouple the factory and NSUML as much as possible from the rest of ArgoUML.

Parameters:
compositeState -
Returns:
MSynchState

buildSimpleState

public MSimpleState buildSimpleState(java.lang.Object compositeState)
Builds a simplestate. The simplestate will be a subvertix of the given compositestate. The parameter compositeState is of type Object to decouple the factory and NSUML as much as possible. from the rest of ArgoUML.

Parameters:
compositeState -
Returns:
MSynchState

buildFinalState

public MFinalState buildFinalState(java.lang.Object compositeState)
Builds a finalstate. The finalstate will be a subvertix of the given compositestate. The parameter compositeState is of type Object to decouple the factory and NSUML as much as possible. from the rest of ArgoUML.

Parameters:
compositeState -
Returns:
MSynchState

buildSubmachineState

public MSubmachineState buildSubmachineState(java.lang.Object compositeState)
Builds a submachinestate. The submachinestate will be a subvertix of the given compositestate. The parameter compositeState is of type Object to decouple the factory and NSUML as much as possible. from the rest of ArgoUML.

Parameters:
compositeState -
Returns:
MSynchState

buildInternalTransition

public MTransition buildInternalTransition(java.lang.Object state)
Builds an internal transition for a given state. The parameter state is of type Object to decouple the factory and NSUML as much as possible.

Parameters:
state - The state the internal transition should belong to
Returns:
MTransition The internal transition constructed

buildTransition

public MTransition buildTransition(java.lang.Object source,
                                   java.lang.Object target)
Build a transition between a source state and a target state. The parameters are of type Object to decouple the factory and NSUML as much as possible.

Parameters:
source - The source state
target - The target state
Returns:
MTransition The resulting transition between source an state

buildCallEvent

public MCallEvent buildCallEvent()
Builds a callevent whose namespace (and therefore the ownership) is the rootmodel.

Returns:
MCallEvent

buildSignalEvent

public MSignalEvent buildSignalEvent()
Builds a signalevent whose namespace (and therefore the ownership) is the rootmodel.

Returns:
MSignalEvent

buildTimeEvent

public MTimeEvent buildTimeEvent()
Builds a timeevent whose namespace (and therefore the ownership) is the rootmodel.

Returns:
MTimeEvent

buildChangeEvent

public MChangeEvent buildChangeEvent()
Builds a changeevent whose namespace (and therefore the ownership) is the rootmodel.

Returns:
MChangeEvent

buildGuard

public MGuard buildGuard(java.lang.Object transition)
Builds a guard condition with a given transition. The guard condition is empty by default. The parameter is of type Object to decouple the factory and NSUML as much as possible.

Parameters:
transition - The transition that owns the resulting guard condition
Returns:
MGuard The resulting guard condition

deleteCallEvent

public void deleteCallEvent(MCallEvent elem)

deleteChangeEvent

public void deleteChangeEvent(MChangeEvent elem)

deleteCompositeState

public void deleteCompositeState(MCompositeState elem)
deletes any associated subVertices.


deleteEvent

public void deleteEvent(MEvent elem)

deleteFinalState

public void deleteFinalState(MFinalState elem)

deleteGuard

public void deleteGuard(MGuard elem)

deletePseudostate

public void deletePseudostate(MPseudostate elem)

deleteSignalEvent

public void deleteSignalEvent(MSignalEvent elem)

deleteSimpleState

public void deleteSimpleState(MSimpleState elem)

deleteState

public void deleteState(MState elem)

deleteStateMachine

public void deleteStateMachine(MStateMachine elem)
deletes its top state, which is a composite state (state vertex).


deleteStateVertex

public void deleteStateVertex(MStateVertex elem)
Deletes the outgoing and incoming transitions of a statevertex.

Parameters:
elem -

deleteStubState

public void deleteStubState(MStubState elem)

deleteSubmachineState

public void deleteSubmachineState(MSubmachineState elem)

deleteSynchState

public void deleteSynchState(MSynchState elem)

deleteTimeEvent

public void deleteTimeEvent(MTimeEvent elem)

deleteTransition

public void deleteTransition(MTransition elem)


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