public class UseCasePart
extends java.lang.Object
ModelBuilder to build a Model.UseCase| Modifier and Type | Method and Description |
|---|---|
UseCasePart |
as(AbstractActor defaultActor)
Define a default actor that will be used for each step of the use case,
unless it is overwritten by specific actors for the steps (with
as). |
FlowPart |
basicFlow()
Start the "happy day scenario" where all is fine and dandy.
|
Model |
build()
Returns the model that has been built.
|
FlowlessConditionPart |
condition(Condition condition)
Constrains the condition for triggering a system reaction: only if the
specified condition is true, a system reaction can be triggered.
|
FlowPart |
flow(java.lang.String flowName)
Start a flow with the specified name.
|
<T> FlowlessUserPart<T> |
on(java.lang.Class<T> eventOrExceptionClass)
Defines the type of events or exceptions that will cause a system reaction.
|
FlowlessStepPart |
step(java.lang.String stepName)
Creates a named step.
|
<T> FlowlessUserPart<T> |
user(java.lang.Class<T> commandClass)
Defines the type of commands that will cause a system reaction.
|
public FlowPart basicFlow()
public FlowPart flow(java.lang.String flowName)
flowName - the name of the flow.public UseCasePart as(AbstractActor defaultActor)
as).defaultActor - the actor to use as a default for the use case's stepspublic FlowlessConditionPart condition(Condition condition)
condition - the condition that constrains when the system reaction is
triggeredpublic FlowlessStepPart step(java.lang.String stepName)
stepName - the name of the created steppublic <T> FlowlessUserPart<T> user(java.lang.Class<T> commandClass)
The system reacts to objects that are instances of the specified class or instances of any direct or indirect subclass of the specified class.
T - the type of the classcommandClass - the class of commands the system reacts topublic <T> FlowlessUserPart<T> on(java.lang.Class<T> eventOrExceptionClass)
The system reacts to objects that are instances of the specified class or instances of any direct or indirect subclass of the specified class.
T - the type of the classeventOrExceptionClass - the class of events the system reacts topublic Model build()