|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRPState
The IRPState interface represents states in a statechart.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.telelogic.rhapsody.core.IRPModelElement |
---|
IRPModelElement.OSLCLink |
Method Summary | |
---|---|
IRPState |
addActivityFinal()
Adds an ActivityFinal element to an Activity. |
IRPConnector |
addConnector(java.lang.String type)
Adds a connector element of the specified type to the state. |
IRPTransition |
addInternalTransition(IRPInterfaceItem trigger)
method addInternalTransition |
IRPState |
addState(java.lang.String name)
Adds a new substate to this state. |
IRPTransition |
addStaticReaction(IRPInterfaceItem trigger)
Adds an internal transition to the state. |
IRPState |
addTerminationState()
Adds a termination state to a statechart. |
IRPTransition |
createDefaultTransition(IRPState from)
Creates a default transition within the state. |
IRPStatechart |
createNestedStatechart()
Creates a sub-statechart for the state. |
void |
deleteConnector(IRPConnector connector)
Deletes the specified connector element. |
void |
deleteInternalTransition(IRPTransition pVal)
method deleteInternalTransition |
void |
deleteStaticReaction(IRPTransition pVal)
Deletes the specified internal transition. |
IRPTransition |
getDefaultTransition()
Returns the default transition within the state. |
java.lang.String |
getEntryAction()
Returns the entry action that was defined for the state. |
java.lang.String |
getExitAction()
Returns the exit action that was defined for the state. |
java.lang.String |
getFullNameInStatechart()
Returns the full name of the state within the statechart, including information about its hierarchical position within the statechart. |
IRPState |
getInheritsFrom()
Returns the corresponding state from the statechart of the class that this class is derived from. |
IRPCollection |
getInternalTransitions()
Returns a collection of the state's internal transitions. |
int |
getIsOverridden()
Checks whether there is still an inheritance relationship between this state and the corresponding state from the statechart of the class that this class is derived from. |
int |
getIsReferenceActivity()
Checks whether this element is a call behavior element. |
IRPStatechart |
getItsStatechart()
Returns the statechart that this state belongs to. |
IRPSwimlane |
getItsSwimlane()
Returns the swimlane that the action is located in. |
IRPCollection |
getLogicalStates()
Returns a collection of all the substates of the current state and all the first-level substates of those states, meaning down to the second level. |
IRPStatechart |
getNestedStatechart()
Returns the state's sub-statechart. |
IRPModelElement |
getReferenceToActivity()
For call behavior elements, returns the activity that is referenced. |
IRPSendAction |
getSendAction()
Returns the Send Action element associated with the state. |
java.lang.String |
getStateType()
Returns the type of the state, for example, an And state or a Termination state. |
IRPCollection |
getStaticReactions()
Returns a collection of the state's internal transitions. |
IRPCollection |
getSubStates()
Returns a collection of the substates contained in this state. |
IRPCollection |
getSubStateVertices()
Returns a collection of all the first-level elements contained in this state - this includes both node elements and connector elements. |
IRPAction |
getTheEntryAction()
method getTheEntryAction |
IRPAction |
getTheExitAction()
method getTheExitAction |
int |
isAnd()
Checks whether the state contains one or more And Lines. |
int |
isCompound()
Checks whether the state is a compound state, meaning a state that contains one or more substates. |
int |
isLeaf()
Checks whether the state is a leaf state, meaning a state that does not contain any substates. |
int |
isRoot()
Checks whether the state is the root state of the statechart. |
int |
isSendActionState()
Checks whether the state is a Send Action element. |
void |
overrideInheritance()
Breaks the inheritance relationship between this state and the corresponding state from the statechart of the class that this class is derived from. |
IRPState |
resetEntryActionInheritance()
Restores the inheritance relationship between this state and the corresponding state from the statechart of the class that this class is derived from, for the entry action. |
IRPState |
resetExitActionInheritance()
Restores the inheritance relationship between this state and the corresponding state from the statechart of the class that this class is derived from, for the exit action. |
void |
setEntryAction(java.lang.String entryAction)
Sets the entry action for the state. |
void |
setExitAction(java.lang.String exitAction)
Sets the exit action for the state. |
void |
setInternalTransition(java.lang.String trigVal,
java.lang.String guardVal,
java.lang.String actionVal)
method setInternalTransition |
void |
setItsSwimlane(IRPSwimlane itsSwimlane)
Specifies the swimlane that the action should be in |
void |
setReferenceToActivity(IRPModelElement referenceToActivity)
For call behavior elements, sets the activity that is referenced by the element. |
void |
setStateType(java.lang.String stateType)
Specifies the type of the state |
void |
setStaticReaction(java.lang.String trigVal,
java.lang.String guardVal,
java.lang.String actionVal)
Adds a new internal transition to the state. |
void |
unoverrideInheritance()
Restores the inheritance relationship between this state and the corresponding state from the statechart of the class that this class is derived from. |
Methods inherited from interface com.telelogic.rhapsody.core.IRPStateVertex |
---|
addFlow, addTransition, deleteTransition, getInTransitions, getOutTransitions, getParent, setParent |
Method Detail |
---|
IRPState addActivityFinal()
IRPConnector addConnector(java.lang.String type)
type
- the type of connector that should be added - the valid values for this parameter are: Condition, Fork, History, Join, Termination, InPin, OutPin, InOutPin
IRPTransition addInternalTransition(IRPInterfaceItem trigger)
RhapsodyRuntimeException
IRPState addState(java.lang.String name)
name
- the name to use for the new state
IRPTransition addStaticReaction(IRPInterfaceItem trigger)
trigger
- the trigger to use for the internal transition
IRPState addTerminationState()
IRPTransition createDefaultTransition(IRPState from)
from
- the substate that the default transition should lead to
IRPStatechart createNestedStatechart()
void deleteConnector(IRPConnector connector)
connector
- the connector element that should be deletedvoid deleteInternalTransition(IRPTransition pVal)
RhapsodyRuntimeException
void deleteStaticReaction(IRPTransition pVal)
pVal
- the internal transition that should be deletedIRPTransition getDefaultTransition()
java.lang.String getEntryAction()
java.lang.String getExitAction()
java.lang.String getFullNameInStatechart()
IRPState getInheritsFrom()
IRPCollection getInternalTransitions()
IRPStatechart cameraStatechart = cameraClass.addStatechart();
IRPEvent trig_for_internal = cameraPackage.addEvent("trigger_internal");
IRPEvent trig_for_internal2 = cameraPackage.addEvent("trigger_internal2");
IRPState stateOne = cameraStatechart.getRootState().addState("state_one");
stateOne.addInternalTransition(trig_for_internal);
stateOne.addInternalTransition(trig_for_internal2);
// now, get and print out the state's internal transitions
IRPCollection allInternalTransitions = stateOne.getInternalTransitions();
IRPTransition currentTransition;
int numberOfInternalTransitions = allInternalTransitions.getCount();
for(int i = 1; i < numberOfInternalTransitions+1 ; i++) {
currentTransition = (IRPTransition)allInternalTransitions.getItem(i);
System.out.println(currentTransition.getDisplayName());
}
int getIsOverridden()
int getIsReferenceActivity()
IRPStatechart getItsStatechart()
IRPSwimlane getItsSwimlane()
IRPCollection getLogicalStates()
IRPStatechart getNestedStatechart()
IRPModelElement getReferenceToActivity()
IRPSendAction getSendAction()
IRPState sendActionState = testfc.getRootState().addState("send_action");
sendActionState.setStateType("EventState");
IRPSendAction sendActionElement = sendActionState.getSendAction();
IRPEvent eventA = cameraPackage.addEvent("event_A");
sendActionElement.setEvent(eventA);
java.lang.String getStateType()
IRPCollection getStaticReactions()
IRPCollection getSubStateVertices()
IRPCollection getSubStates()
IRPState parentState = (IRPState)currentProject.findNestedElementRecursive("busy", "State"); IRPState topLevelStateInSubchart = (IRPState)(parentState.getNestedStatechart().getRootState().getSubStates().getItem(1)); IRPCollection substates = topLevelStateInSubchart.getSubStates();
IRPAction getTheEntryAction()
RhapsodyRuntimeException
IRPAction getTheExitAction()
RhapsodyRuntimeException
int isAnd()
int isCompound()
int isLeaf()
int isRoot()
int isSendActionState()
void overrideInheritance()
IRPState resetEntryActionInheritance()
IRPState resetExitActionInheritance()
void setEntryAction(java.lang.String entryAction)
entryAction
- the code to use for the state's entry actionvoid setExitAction(java.lang.String exitAction)
exitAction
- the code to use for the state's exit actionvoid setInternalTransition(java.lang.String trigVal, java.lang.String guardVal, java.lang.String actionVal)
RhapsodyRuntimeException
void setItsSwimlane(IRPSwimlane itsSwimlane)
itsSwimlane
- the swimlane that the action should be invoid setReferenceToActivity(IRPModelElement referenceToActivity)
referenceToActivity
- the activity that should be referenced by the call behavior elementvoid setStateType(java.lang.String stateType)
stateType
- the type of the state. The valid strings for this parameter are: "And", "Or" (for a state that is not an "And" state), "LocalTermination" (for Termination State), "Block" (for Action Block), "Action", "SubActivity", "EventState" (for Send Action), and "FlowFinal"void setStaticReaction(java.lang.String trigVal, java.lang.String guardVal, java.lang.String actionVal)
trigVal
- the trigger to set for the internal transitionguardVal
- the guard to set for the internal transitionactionVal
- the action to set for the internal transitionvoid unoverrideInheritance()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |