Class StateMachineConfigurationBuilder<S,E>
java.lang.Object
org.springframework.statemachine.config.common.annotation.AbstractAnnotationBuilder<O>
org.springframework.statemachine.config.common.annotation.AbstractConfiguredAnnotationBuilder<ConfigurationData<S,E>,StateMachineConfigurationConfigurer<S,E>,StateMachineConfigurationBuilder<S,E>>
org.springframework.statemachine.config.builders.StateMachineConfigurationBuilder<S,E>
- Type Parameters:
S- the type of stateE- the type of event
- All Implemented Interfaces:
StateMachineConfigurationConfigurer<S,,E> AnnotationBuilder<ConfigurationData<S,E>>
public class StateMachineConfigurationBuilder<S,E>
extends AbstractConfiguredAnnotationBuilder<ConfigurationData<S,E>,StateMachineConfigurationConfigurer<S,E>,StateMachineConfigurationBuilder<S,E>>
implements StateMachineConfigurationConfigurer<S,E>
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new state machine configuration builder.StateMachineConfigurationBuilder(ObjectPostProcessor<Object> objectPostProcessor) Instantiates a new state machine configuration builder.StateMachineConfigurationBuilder(ObjectPostProcessor<Object> objectPostProcessor, boolean allowConfigurersOfSameType) Instantiates a new state machine configuration builder. -
Method Summary
Modifier and TypeMethodDescriptionprotected ConfigurationData<S,E> Subclasses must implement this method to build the object that is being returned.voidsetAutoStart(boolean autoStart) Sets the auto start.voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) Sets the bean factory.voidsetEventSecurityAccessDecisionManager(org.springframework.security.access.AccessDecisionManager eventSecurityAccessDecisionManager) Sets the security event access decision manager.voidsetEventSecurityRule(SecurityRule eventSecurityRule) Sets the event security rule.voidsetMachineId(String machineId) Sets the machine id.voidsetRegionExecutionPolicy(RegionExecutionPolicy regionExecutionPolicy) Sets the region execution policy.voidsetSecurityEnabled(boolean securityEnabled) Sets the security enabled.voidsetStateDoActionPolicy(StateDoActionPolicy stateDoActionPolicy, Long stateDoActionPolicyTimeout) Sets the state do action policy and timeout.voidsetStateMachineEnsemble(StateMachineEnsemble<S, E> ensemble) Sets the state machine ensemble.voidsetStateMachineListeners(List<StateMachineListener<S, E>> listeners) Sets the state machine listeners.voidsetStateMachineMonitor(StateMachineMonitor<S, E> stateMachineMonitor) Sets the state machine monitor.voidsetStateMachineRuntimePersister(StateMachineRuntimePersister<S, E, ?> persister) Sets the state machine runtime persister.voidsetTransitionConflictPolicy(TransitionConflictPolicy transitionConflictPolicy) Sets the transition conflict policy.voidsetTransitionSecurityAccessDecisionManager(org.springframework.security.access.AccessDecisionManager transitionSecurityAccessDecisionManager) Sets the security transition access decision manager.voidsetTransitionSecurityRule(SecurityRule transitionSecurityRule) Sets the transition security rule.voidsetVerifier(StateMachineModelVerifier<S, E> verifier) Sets the state machine model verifier.voidsetVerifierEnabled(boolean verifierEnabled) Sets the verifier enabled.Gets a configurer for generic config.Gets a configurer for distributed state machine config.Gets a configurer for state machine monitoring.Gets a configurer for state machine persistence.Gets a configurer for securing state machine.Gets a configurer for state machine model verifier.Methods inherited from class org.springframework.statemachine.config.common.annotation.AbstractConfiguredAnnotationBuilder
apply, beforeConfigureMains, beforeConfigurePosts, beforeInit, doBuild, getConfigurer, getConfigurers, getOrApply, getOrBuild, getSharedObject, getSharedObjects, objectPostProcessor, postProcess, removeConfigurer, removeConfigurers, setSharedObjectMethods inherited from class org.springframework.statemachine.config.common.annotation.AbstractAnnotationBuilder
build, getObject
-
Constructor Details
-
StateMachineConfigurationBuilder
public StateMachineConfigurationBuilder()Instantiates a new state machine configuration builder. -
StateMachineConfigurationBuilder
public StateMachineConfigurationBuilder(ObjectPostProcessor<Object> objectPostProcessor, boolean allowConfigurersOfSameType) Instantiates a new state machine configuration builder.- Parameters:
objectPostProcessor- the object post processorallowConfigurersOfSameType- the allow configurers of same type
-
StateMachineConfigurationBuilder
Instantiates a new state machine configuration builder.- Parameters:
objectPostProcessor- the object post processor
-
-
Method Details
-
withConfiguration
Description copied from interface:StateMachineConfigurationConfigurerGets a configurer for generic config.- Specified by:
withConfigurationin interfaceStateMachineConfigurationConfigurer<S,E> - Returns:
ConfigurationConfigurerfor chaining- Throws:
Exception- if configuration error happens
-
withDistributed
Description copied from interface:StateMachineConfigurationConfigurerGets a configurer for distributed state machine config.- Specified by:
withDistributedin interfaceStateMachineConfigurationConfigurer<S,E> - Returns:
DistributedStateMachineConfigurerfor chaining- Throws:
Exception- if configuration error happens
-
withSecurity
Description copied from interface:StateMachineConfigurationConfigurerGets a configurer for securing state machine.- Specified by:
withSecurityin interfaceStateMachineConfigurationConfigurer<S,E> - Returns:
SecurityConfigurerfor chaining- Throws:
Exception- if configuration error happens
-
withVerifier
Description copied from interface:StateMachineConfigurationConfigurerGets a configurer for state machine model verifier.- Specified by:
withVerifierin interfaceStateMachineConfigurationConfigurer<S,E> - Returns:
VerifierConfigurerfor chaining- Throws:
Exception- if configuration error happens
-
withMonitoring
Description copied from interface:StateMachineConfigurationConfigurerGets a configurer for state machine monitoring.- Specified by:
withMonitoringin interfaceStateMachineConfigurationConfigurer<S,E> - Returns:
MonitoringConfigurerfor chaining- Throws:
Exception- if configuration error happens
-
withPersistence
Description copied from interface:StateMachineConfigurationConfigurerGets a configurer for state machine persistence.- Specified by:
withPersistencein interfaceStateMachineConfigurationConfigurer<S,E> - Returns:
PersistenceConfigurerfor chaining- Throws:
Exception- if configuration error happens
-
performBuild
Description copied from class:AbstractConfiguredAnnotationBuilderSubclasses must implement this method to build the object that is being returned.- Specified by:
performBuildin classAbstractConfiguredAnnotationBuilder<ConfigurationData<S,E>, StateMachineConfigurationConfigurer<S, E>, StateMachineConfigurationBuilder<S, E>> - Returns:
- Object build by this builder
- Throws:
Exception- if error occurred
-
setMachineId
Sets the machine id.- Parameters:
machineId- the new machine id
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) Sets the bean factory.- Parameters:
beanFactory- the new bean factory
-
setStateMachineEnsemble
Sets the state machine ensemble.- Parameters:
ensemble- the ensemble
-
setAutoStart
public void setAutoStart(boolean autoStart) Sets the auto start.- Parameters:
autoStart- the new autostart flag
-
setStateMachineListeners
Sets the state machine listeners.- Parameters:
listeners- the listeners
-
setSecurityEnabled
public void setSecurityEnabled(boolean securityEnabled) Sets the security enabled.- Parameters:
securityEnabled- the new security enabled
-
setVerifierEnabled
public void setVerifierEnabled(boolean verifierEnabled) Sets the verifier enabled.- Parameters:
verifierEnabled- the new verifier enabled
-
setStateMachineMonitor
Sets the state machine monitor.- Parameters:
stateMachineMonitor- the state machine monitor
-
setTransitionSecurityAccessDecisionManager
public void setTransitionSecurityAccessDecisionManager(org.springframework.security.access.AccessDecisionManager transitionSecurityAccessDecisionManager) Sets the security transition access decision manager.- Parameters:
transitionSecurityAccessDecisionManager- the new security transition access decision manager
-
setEventSecurityAccessDecisionManager
public void setEventSecurityAccessDecisionManager(org.springframework.security.access.AccessDecisionManager eventSecurityAccessDecisionManager) Sets the security event access decision manager.- Parameters:
eventSecurityAccessDecisionManager- the new security event access decision manager
-
setEventSecurityRule
Sets the event security rule.- Parameters:
eventSecurityRule- the new event security rule
-
setTransitionSecurityRule
Sets the transition security rule.- Parameters:
transitionSecurityRule- the new event security rule
-
setVerifier
Sets the state machine model verifier.- Parameters:
verifier- the state machine model verifier
-
setStateMachineRuntimePersister
Sets the state machine runtime persister.- Parameters:
persister- the state machine runtime persister
-
setTransitionConflictPolicy
Sets the transition conflict policy.- Parameters:
transitionConflictPolicy- the new transition conflict policy
-
setStateDoActionPolicy
public void setStateDoActionPolicy(StateDoActionPolicy stateDoActionPolicy, Long stateDoActionPolicyTimeout) Sets the state do action policy and timeout.- Parameters:
stateDoActionPolicy- the new state do action policystateDoActionPolicyTimeout- the new state do action policy timeout
-
setRegionExecutionPolicy
Sets the region execution policy.- Parameters:
regionExecutionPolicy- the region execution policy
-