@OpenApiAll public interface Scenario extends ScenarioNode
Represents a use case flow scenario.
Contains methods for manipulating it. Use ScenarioManager
for scenario utility methods.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SCENARIO_CHANGE_EVENT
Event for indicating scenario change.
|
Modifier and Type | Method and Description |
---|---|
AlternativeCondition |
addAlternativeCondition(FlowStep flowStep)
Adds alternative condition to the flow step.
|
AlternativeCondition |
addAlternativeCondition(FlowStep flowStep,
AlternativeCondition addAfter)
Adds alternative condition.
|
FlowStep |
addAlternativeFlowStep(AlternativeCondition alternativeCondition)
Adds alternative flow step.
|
FlowStep |
addAlternativeFlowStep(AlternativeCondition alternativeCondition,
FlowStep addAfter)
Adds alternative flow step.
|
FlowStep |
addExceptionalFlowStep(ExceptionType exceptionType)
Adds exceptional flow step.
|
FlowStep |
addExceptionalFlowStep(ExceptionType exceptionType,
FlowStep addAfter)
Adds exceptional flow step.
|
ExceptionType |
addExceptionType(FlowStep flowStep)
Adds exception type.
|
ExceptionType |
addExceptionType(FlowStep flowStep,
ExceptionType exceptionType)
Adds exception type.
|
FlowStep |
addFlowStep()
Adds a flow step to the scenario.
|
FlowStep |
addFlowStep(FlowStep addAfter)
Adds a flow step after a given flow step.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a property change listener to this scenario.
|
FlowStep |
addUseCaseStep(FlowStep addAfter,
UseCase useCase)
Adds a flow step which references another use case.
|
FlowStep |
addUseCaseStep(UseCase useCase)
Adds a flow step which references another use case.
|
Activity |
getActivity()
Gets activity in which use case is represented.
|
java.util.List<Element> |
getElements()
Gets all elements which represent scenario.
|
java.util.List<FlowStep> |
getFlowSteps()
Gets scenario flow steps.
|
java.util.List<UseCase> |
getReferencedScenarioUseCases()
Gets scenario use cases which are referenced by this scenario.
|
Diagram |
getScenarioDiagram(boolean createIfNotExists)
Gets diagram which represents scenario.
|
ScenarioNodeStart |
getScenarioEnd()
Gets scenario node which ends scenario.
|
ScenarioReadResult |
getScenarioReadResult()
Gets errors of the last scenario reading.
|
ScenarioRepresentationTextProvider |
getScenarioRepresentationTextProvider()
Gets scenario GUI text provider.
|
ScenarioNodeStart |
getScenarioStart()
Gets scenario node which starts scenario.
|
UseCase |
getUseCase()
Gets use case which represents scenario.
|
boolean |
isEditable()
Indicates if permissions allow to edit scenario.
|
void |
prepareModelBeforeDisplay()
Performs necessary model preparations before displaying the scenario.
|
void |
readScenario()
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 |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes listener from scenario listeners.
|
void |
swapScenarioNodes(ScenarioNode node1,
ScenarioNode node2)
Swaps scenario nodes.
|
belongsToIncludedExtending, getElement, getEnd, getHumanType, getName, getParent, getParentContainer, getStart, setName
static final java.lang.String SCENARIO_CHANGE_EVENT
FlowStep addFlowStep()
FlowStep addFlowStep(FlowStep addAfter)
addAfter
- flow step after which to add a flow step.FlowStep addUseCaseStep(UseCase useCase)
useCase
- use case to add.FlowStep addUseCaseStep(FlowStep addAfter, UseCase useCase)
addAfter
- flow step after which to add.useCase
- use case to add.ExceptionType addExceptionType(FlowStep flowStep)
flowStep
- flow set to which exception type should be added.ExceptionType addExceptionType(FlowStep flowStep, ExceptionType exceptionType)
flowStep
- flow step to which to add.exceptionType
- exception type to add.FlowStep addExceptionalFlowStep(ExceptionType exceptionType, FlowStep addAfter)
exceptionType
- exception type to which step should be added.addAfter
- flow step after which to add.FlowStep addExceptionalFlowStep(ExceptionType exceptionType)
exceptionType
- exception type to which to add exceptional flow step.void removeFlowStep(FlowStep flowStep)
flowStep
- flow step to remove.void swapScenarioNodes(ScenarioNode node1, ScenarioNode node2)
node1
- first node to swap.node2
- second node to swap.java.util.List<FlowStep> getFlowSteps()
AlternativeCondition addAlternativeCondition(FlowStep flowStep)
flowStep
- flow step to which to add alternative condition.void removeAlternativeCondition(AlternativeCondition condition)
condition
- alternative condition to remove.void removeExceptionType(FlowStep flowStep, ExceptionType exceptionType)
flowStep
- flow step from which to remove exception type.exceptionType
- exception type to remove.void removeExceptionalFlowStep(FlowStep exceptionalFlowStep)
exceptionalFlowStep
- exceptional flow step to remove.void removeAlternativeFlowStep(FlowStep alternativeFlowStep)
alternativeFlowStep
- alternative flow step to remove.AlternativeCondition addAlternativeCondition(FlowStep flowStep, AlternativeCondition addAfter)
flowStep
- flow step to which to add alternative condition.addAfter
- condition after which to add.FlowStep addAlternativeFlowStep(AlternativeCondition alternativeCondition)
alternativeCondition
- condition to which to add.FlowStep addAlternativeFlowStep(AlternativeCondition alternativeCondition, FlowStep addAfter)
alternativeCondition
- condition to which to add.addAfter
- flow step after which to add.Activity getActivity()
UseCase getUseCase()
java.util.List<Element> getElements()
Diagram getScenarioDiagram(boolean createIfNotExists)
createIfNotExists
- flag which forces diagram creation.void readScenario(UseCase useCase)
useCase
- use case from which to read.void readScenario()
void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- listener to add.void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- listener to remove.ScenarioNodeStart getScenarioStart()
ScenarioNodeStart getScenarioEnd()
boolean isEditable()
isEditable
in interface ScenarioNode
ScenarioReadResult getScenarioReadResult()
java.util.List<UseCase> getReferencedScenarioUseCases()
void prepareModelBeforeDisplay()
ScenarioRepresentationTextProvider getScenarioRepresentationTextProvider()