Interface Scenario
- All Superinterfaces:
ScenarioNode
Represents a use case flow scenario.
Contains methods for manipulating it. Use ScenarioManager
for scenario utility methods.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAlternativeCondition
(FlowStep flowStep) Adds alternative condition to the flow step.addAlternativeCondition
(FlowStep flowStep, AlternativeCondition addAfter) Adds alternative condition.addAlternativeFlowStep
(AlternativeCondition alternativeCondition) Adds alternative flow step.addAlternativeFlowStep
(AlternativeCondition alternativeCondition, FlowStep addAfter) Adds alternative flow step.addExceptionalFlowStep
(ExceptionType exceptionType) Adds exceptional flow step.addExceptionalFlowStep
(ExceptionType exceptionType, FlowStep addAfter) Adds exceptional flow step.addExceptionType
(FlowStep flowStep) Adds exception type.addExceptionType
(FlowStep flowStep, ExceptionType exceptionType) Adds exception type.Adds a flow step to the scenario.addFlowStep
(FlowStep addAfter) Adds a flow step after a given flow step.void
Adds a property change listener to this scenario.addUseCaseStep
(FlowStep addAfter, UseCase useCase) Adds a flow step which references another use case.addUseCaseStep
(UseCase useCase) Adds a flow step which references another use case.Gets activity in which use case is represented.Gets all elements which represent scenario.Gets scenario flow steps.Gets scenario use cases which are referenced by this scenario.getScenarioDiagram
(boolean createIfNotExists) Gets diagram which represents scenario.Gets scenario node which ends scenario.Gets errors of the last scenario reading.Gets scenario GUI text provider.Gets scenario node which starts scenario.Gets use case which represents scenario.boolean
Indicates if permissions allow to edit scenario.void
Performs necessary model preparations before displaying the scenario.void
Reads scenario from the current scenario use case.void
readScenario
(UseCase useCase) Reads scenario from a given use case.void
removeAlternativeCondition
(AlternativeCondition condition) Removes alternative condition.void
removeAlternativeFlowStep
(FlowStep alternativeFlowStep) Removes alternative flow step.void
removeExceptionalFlowStep
(FlowStep exceptionalFlowStep) Removes exceptional flow step.void
removeExceptionType
(FlowStep flowStep, ExceptionType exceptionType) Removes exception type.void
removeFlowStep
(FlowStep flowStep) Removes flow step.void
Removes listener from scenario listeners.void
swapScenarioNodes
(ScenarioNode node1, ScenarioNode node2) Swaps scenario nodes.Methods inherited from interface com.nomagic.magicdraw.usecasescenarios.scenarios.ScenarioNode
belongsToIncludedExtending, getElement, getEnd, getHumanType, getName, getParent, getParentContainer, getStart, setName
-
Field Details
-
SCENARIO_CHANGE_EVENT
Event for indicating scenario change.- See Also:
-
-
Method Details
-
addFlowStep
FlowStep addFlowStep()Adds a flow step to the scenario.- Returns:
- added scenario.
-
addFlowStep
Adds a flow step after a given flow step.- Parameters:
addAfter
- flow step after which to add a flow step.- Returns:
- added flow step.
-
addUseCaseStep
Adds a flow step which references another use case.- Parameters:
useCase
- use case to add.- Returns:
- created flow step.
-
addUseCaseStep
Adds a flow step which references another use case.- Parameters:
addAfter
- flow step after which to add.useCase
- use case to add.- Returns:
- added step
-
addExceptionType
Adds exception type.- Parameters:
flowStep
- flow set to which exception type should be added.- Returns:
- added exception type.
-
addExceptionType
Adds exception type.- Parameters:
flowStep
- flow step to which to add.exceptionType
- exception type to add.- Returns:
- added exception type.
-
addExceptionalFlowStep
Adds exceptional flow step.- Parameters:
exceptionType
- exception type to which step should be added.addAfter
- flow step after which to add.- Returns:
- added exceptional flow step.
-
addExceptionalFlowStep
Adds exceptional flow step.- Parameters:
exceptionType
- exception type to which to add exceptional flow step.- Returns:
- added exceptional flow step.
-
removeFlowStep
Removes flow step.- Parameters:
flowStep
- flow step to remove.
-
swapScenarioNodes
Swaps scenario nodes.- Parameters:
node1
- first node to swap.node2
- second node to swap.
-
getFlowSteps
Gets scenario flow steps.- Returns:
- scenario flow steps.
-
addAlternativeCondition
Adds alternative condition to the flow step.- Parameters:
flowStep
- flow step to which to add alternative condition.- Returns:
- created alternative condition.
-
removeAlternativeCondition
Removes alternative condition.- Parameters:
condition
- alternative condition to remove.
-
removeExceptionType
Removes exception type.- Parameters:
flowStep
- flow step from which to remove exception type.exceptionType
- exception type to remove.
-
removeExceptionalFlowStep
Removes exceptional flow step.- Parameters:
exceptionalFlowStep
- exceptional flow step to remove.
-
removeAlternativeFlowStep
Removes alternative flow step.- Parameters:
alternativeFlowStep
- alternative flow step to remove.
-
addAlternativeCondition
Adds alternative condition.- Parameters:
flowStep
- flow step to which to add alternative condition.addAfter
- condition after which to add.- Returns:
- created alternative condition.
-
addAlternativeFlowStep
Adds alternative flow step.- Parameters:
alternativeCondition
- condition to which to add.- Returns:
- created flow step.
-
addAlternativeFlowStep
Adds alternative flow step.- Parameters:
alternativeCondition
- condition to which to add.addAfter
- flow step after which to add.- Returns:
- added alternative flow step.
-
getActivity
Activity getActivity()Gets activity in which use case is represented.- Returns:
- activity in which steps are represented.
-
getUseCase
UseCase getUseCase()Gets use case which represents scenario.- Returns:
- use case which represents scenario.
-
getElements
Gets all elements which represent scenario.- Returns:
- all elements which represent scenario.
-
getScenarioDiagram
Gets diagram which represents scenario.- Parameters:
createIfNotExists
- flag which forces diagram creation.- Returns:
- gets diagram which represents scenario or null if it did not exist or was not created.
-
readScenario
Reads scenario from a given use case.- Parameters:
useCase
- use case from which to read.
-
readScenario
void readScenario()Reads scenario from the current scenario use case. -
addPropertyChangeListener
Adds a property change listener to this scenario. Listeners are notified about changes in the scenario.- Parameters:
listener
- listener to add.
-
removePropertyChangeListener
Removes listener from scenario listeners.- Parameters:
listener
- listener to remove.
-
getScenarioStart
ScenarioNodeStart getScenarioStart()Gets scenario node which starts scenario.- Returns:
- scenario node which starts scenario.
-
getScenarioEnd
ScenarioNodeStart getScenarioEnd()Gets scenario node which ends scenario.- Returns:
- scenario node which ends scenario.
-
isEditable
boolean isEditable()Indicates if permissions allow to edit scenario.- Specified by:
isEditable
in interfaceScenarioNode
- Returns:
- true if scenario is editable, false otherwise.
-
getScenarioReadResult
ScenarioReadResult getScenarioReadResult()Gets errors of the last scenario reading.- Returns:
- scenario read result.
-
getReferencedScenarioUseCases
Gets scenario use cases which are referenced by this scenario.- Returns:
- scenario use cases which are referenced by this scenario.
-
prepareModelBeforeDisplay
void prepareModelBeforeDisplay()Performs necessary model preparations before displaying the scenario. -
getScenarioRepresentationTextProvider
ScenarioRepresentationTextProvider getScenarioRepresentationTextProvider()Gets scenario GUI text provider.- Returns:
- scenario GUI text provider.
-