public class RepositoryStateMachineModelFactory extends AbstractStateMachineModelFactory<java.lang.String,java.lang.String> implements StateMachineModelFactory<java.lang.String,java.lang.String>
StateMachineModelFactory
which is backed by a Spring Data
Repository abstraction.Constructor and Description |
---|
RepositoryStateMachineModelFactory(StateRepository<? extends RepositoryState> stateRepository,
TransitionRepository<? extends RepositoryTransition> transitionRepository)
Instantiates a new repository state machine model factory.
|
Modifier and Type | Method and Description |
---|---|
StateMachineModel<java.lang.String,java.lang.String> |
build()
Builds the state machine model.
|
StateMachineModel<java.lang.String,java.lang.String> |
build(java.lang.String machineId)
Builds the state machine model with a given
machineId . |
getBeanFactory, getResourceLoader, getStateMachineComponentResolver, registerAction, registerGuard, resolveAction, resolveGuard, setBeanFactory, setResourceLoader, setStateMachineComponentResolver
public RepositoryStateMachineModelFactory(StateRepository<? extends RepositoryState> stateRepository, TransitionRepository<? extends RepositoryTransition> transitionRepository)
stateRepository
- the state repositorytransitionRepository
- the transition repositorypublic StateMachineModel<java.lang.String,java.lang.String> build()
StateMachineModelFactory
build
in interface StateMachineModelFactory<java.lang.String,java.lang.String>
build
in class AbstractStateMachineModelFactory<java.lang.String,java.lang.String>
public StateMachineModel<java.lang.String,java.lang.String> build(java.lang.String machineId)
StateMachineModelFactory
machineId
.
Implementation is free to choose what to do with a given machineId
but usually it might map to a different configurations supported
by storage or repository in a factory.build
in interface StateMachineModelFactory<java.lang.String,java.lang.String>
build
in class AbstractStateMachineModelFactory<java.lang.String,java.lang.String>
machineId
- the machine id