S
- the type of stateE
- the type of eventpublic class StateMachineTransitionBuilder<S,E> extends AbstractConfiguredAnnotationBuilder<TransitionsData<S,E>,StateMachineTransitionConfigurer<S,E>,StateMachineTransitionBuilder<S,E>> implements StateMachineTransitionConfigurer<S,E>
Constructor and Description |
---|
StateMachineTransitionBuilder()
Instantiates a new state machine transition builder.
|
StateMachineTransitionBuilder(ObjectPostProcessor<java.lang.Object> objectPostProcessor)
Instantiates a new state machine transition builder.
|
StateMachineTransitionBuilder(ObjectPostProcessor<java.lang.Object> objectPostProcessor,
boolean allowConfigurersOfSameType)
Instantiates a new state machine transition builder.
|
Modifier and Type | Method and Description |
---|---|
void |
addChoice(S source,
java.util.List<ChoiceData<S,E>> choices)
Adds the choice.
|
void |
addDefaultHistory(S source,
S target)
Adds the default history.
|
void |
addEntry(S source,
S target)
Adds the entry.
|
void |
addExit(S source,
S target)
Adds the exit.
|
void |
addFork(S source,
java.util.List<S> targets)
Adds the fork.
|
void |
addJoin(S target,
java.util.List<S> sources)
Adds the join.
|
void |
addJunction(S source,
java.util.List<JunctionData<S,E>> junctions)
Adds the junction.
|
void |
addTransition(S source,
S target,
S state,
E event,
java.lang.Long period,
java.lang.Integer count,
java.util.Collection<Action<S,E>> actions,
Guard<S,E> guard,
TransitionKind kind,
SecurityRule securityRule,
java.lang.String name)
Adds the transition.
|
protected TransitionsData<S,E> |
performBuild()
Subclasses must implement this method to build the object that is being returned.
|
ChoiceTransitionConfigurer<S,E> |
withChoice()
Gets a configurer for transition from a choice pseudostate.
|
EntryTransitionConfigurer<S,E> |
withEntry()
Gets a configurer for transition from an entrypoint pseudostate.
|
ExitTransitionConfigurer<S,E> |
withExit()
Gets a configurer for transition from an exitpoint pseudostate.
|
ExternalTransitionConfigurer<S,E> |
withExternal()
Gets a configurer for external transition.
|
ForkTransitionConfigurer<S,E> |
withFork()
Gets a configurer for transition from a fork pseudostate.
|
HistoryTransitionConfigurer<S,E> |
withHistory()
Gets a configurer for default history transition.
|
InternalTransitionConfigurer<S,E> |
withInternal()
Gets a configurer for internal transition.
|
JoinTransitionConfigurer<S,E> |
withJoin()
Gets a configurer for transition from a join pseudostate.
|
JunctionTransitionConfigurer<S,E> |
withJunction()
Gets a configurer for transition from a junction pseudostate.
|
LocalTransitionConfigurer<S,E> |
withLocal()
Gets a configurer for local transition.
|
apply, apply, beforeConfigureMains, beforeConfigurePosts, beforeInit, doBuild, getConfigurer, getConfigurers, getOrApply, getOrBuild, getSharedObject, getSharedObjects, objectPostProcessor, postProcess, removeConfigurer, removeConfigurers, setSharedObject
build, getObject
public StateMachineTransitionBuilder()
public StateMachineTransitionBuilder(ObjectPostProcessor<java.lang.Object> objectPostProcessor, boolean allowConfigurersOfSameType)
objectPostProcessor
- the object post processorallowConfigurersOfSameType
- the allow configurers of same typepublic StateMachineTransitionBuilder(ObjectPostProcessor<java.lang.Object> objectPostProcessor)
objectPostProcessor
- the object post processorprotected TransitionsData<S,E> performBuild() throws java.lang.Exception
AbstractConfiguredAnnotationBuilder
performBuild
in class AbstractConfiguredAnnotationBuilder<TransitionsData<S,E>,StateMachineTransitionConfigurer<S,E>,StateMachineTransitionBuilder<S,E>>
java.lang.Exception
- if error occurredpublic ExternalTransitionConfigurer<S,E> withExternal() throws java.lang.Exception
StateMachineTransitionConfigurer
withExternal
in interface StateMachineTransitionConfigurer<S,E>
ExternalTransitionConfigurer
for chainingjava.lang.Exception
- if configuration error happensStateMachineTransitionConfigurer.withLocal()
public InternalTransitionConfigurer<S,E> withInternal() throws java.lang.Exception
StateMachineTransitionConfigurer
withInternal
in interface StateMachineTransitionConfigurer<S,E>
InternalTransitionConfigurer
for chainingjava.lang.Exception
- if configuration error happenspublic LocalTransitionConfigurer<S,E> withLocal() throws java.lang.Exception
StateMachineTransitionConfigurer
withLocal
in interface StateMachineTransitionConfigurer<S,E>
LocalTransitionConfigurer
for chainingjava.lang.Exception
- if configuration error happenspublic ChoiceTransitionConfigurer<S,E> withChoice() throws java.lang.Exception
StateMachineTransitionConfigurer
withChoice
in interface StateMachineTransitionConfigurer<S,E>
ChoiceTransitionConfigurer
for chainingjava.lang.Exception
- if configuration error happenspublic JunctionTransitionConfigurer<S,E> withJunction() throws java.lang.Exception
StateMachineTransitionConfigurer
withJunction
in interface StateMachineTransitionConfigurer<S,E>
JunctionTransitionConfigurer
for chainingjava.lang.Exception
- if configuration error happenspublic ForkTransitionConfigurer<S,E> withFork() throws java.lang.Exception
StateMachineTransitionConfigurer
withFork
in interface StateMachineTransitionConfigurer<S,E>
ForkTransitionConfigurer
for chainingjava.lang.Exception
- if configuration error happenspublic JoinTransitionConfigurer<S,E> withJoin() throws java.lang.Exception
StateMachineTransitionConfigurer
withJoin
in interface StateMachineTransitionConfigurer<S,E>
JoinTransitionConfigurer
for chainingjava.lang.Exception
- if configuration error happenspublic EntryTransitionConfigurer<S,E> withEntry() throws java.lang.Exception
StateMachineTransitionConfigurer
withEntry
in interface StateMachineTransitionConfigurer<S,E>
EntryTransitionConfigurer
for chainingjava.lang.Exception
- if configuration error happenspublic ExitTransitionConfigurer<S,E> withExit() throws java.lang.Exception
StateMachineTransitionConfigurer
withExit
in interface StateMachineTransitionConfigurer<S,E>
ExitTransitionConfigurer
for chainingjava.lang.Exception
- if configuration error happenspublic HistoryTransitionConfigurer<S,E> withHistory() throws java.lang.Exception
StateMachineTransitionConfigurer
withHistory
in interface StateMachineTransitionConfigurer<S,E>
HistoryTransitionConfigurer
for chainingjava.lang.Exception
- if configuration error happenspublic void addTransition(S source, S target, S state, E event, java.lang.Long period, java.lang.Integer count, java.util.Collection<Action<S,E>> actions, Guard<S,E> guard, TransitionKind kind, SecurityRule securityRule, java.lang.String name)
source
- the sourcetarget
- the targetstate
- the stateevent
- the eventperiod
- the periodcount
- the countactions
- the actionsguard
- the guardkind
- the kindsecurityRule
- the security rulepublic void addChoice(S source, java.util.List<ChoiceData<S,E>> choices)
source
- the sourcechoices
- the choicespublic void addJunction(S source, java.util.List<JunctionData<S,E>> junctions)
source
- the sourcejunctions
- the junctionspublic void addEntry(S source, S target)
source
- the sourcetarget
- the targetpublic void addExit(S source, S target)
source
- the sourcetarget
- the targetpublic void addFork(S source, java.util.List<S> targets)
source
- the sourcetargets
- the targetspublic void addJoin(S target, java.util.List<S> sources)
target
- the targetsources
- the sources