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>
- Author:
- Janne Valkealahti
-
Constructor Summary
ConstructorDescriptionInstantiates 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.void
setAutoStart
(boolean autoStart) Sets the auto start.void
setBeanFactory
(org.springframework.beans.factory.BeanFactory beanFactory) Sets the bean factory.void
setEventSecurityAccessDecisionManager
(org.springframework.security.access.AccessDecisionManager eventSecurityAccessDecisionManager) Sets the security event access decision manager.void
setEventSecurityRule
(SecurityRule eventSecurityRule) Sets the event security rule.void
setMachineId
(String machineId) Sets the machine id.void
setRegionExecutionPolicy
(RegionExecutionPolicy regionExecutionPolicy) Sets the region execution policy.void
setSecurityEnabled
(boolean securityEnabled) Sets the security enabled.void
setStateDoActionPolicy
(StateDoActionPolicy stateDoActionPolicy, Long stateDoActionPolicyTimeout) Sets the state do action policy and timeout.void
setStateMachineEnsemble
(StateMachineEnsemble<S, E> ensemble) Sets the state machine ensemble.void
setStateMachineListeners
(List<StateMachineListener<S, E>> listeners) Sets the state machine listeners.void
setStateMachineMonitor
(StateMachineMonitor<S, E> stateMachineMonitor) Sets the state machine monitor.void
setStateMachineRuntimePersister
(StateMachineRuntimePersister<S, E, ?> persister) Sets the state machine runtime persister.void
setTransitionConflictPolicy
(TransitionConflictPolicy transitionConflictPolicy) Sets the transition conflict policy.void
setTransitionSecurityAccessDecisionManager
(org.springframework.security.access.AccessDecisionManager transitionSecurityAccessDecisionManager) Sets the security transition access decision manager.void
setTransitionSecurityRule
(SecurityRule transitionSecurityRule) Sets the transition security rule.void
setVerifier
(StateMachineModelVerifier<S, E> verifier) Sets the state machine model verifier.void
setVerifierEnabled
(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, setSharedObject
Methods 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:StateMachineConfigurationConfigurer
Gets a configurer for generic config.- Specified by:
withConfiguration
in interfaceStateMachineConfigurationConfigurer<S,
E> - Returns:
ConfigurationConfigurer
for chaining- Throws:
Exception
- if configuration error happens
-
withDistributed
Description copied from interface:StateMachineConfigurationConfigurer
Gets a configurer for distributed state machine config.- Specified by:
withDistributed
in interfaceStateMachineConfigurationConfigurer<S,
E> - Returns:
DistributedStateMachineConfigurer
for chaining- Throws:
Exception
- if configuration error happens
-
withSecurity
Description copied from interface:StateMachineConfigurationConfigurer
Gets a configurer for securing state machine.- Specified by:
withSecurity
in interfaceStateMachineConfigurationConfigurer<S,
E> - Returns:
SecurityConfigurer
for chaining- Throws:
Exception
- if configuration error happens
-
withVerifier
Description copied from interface:StateMachineConfigurationConfigurer
Gets a configurer for state machine model verifier.- Specified by:
withVerifier
in interfaceStateMachineConfigurationConfigurer<S,
E> - Returns:
VerifierConfigurer
for chaining- Throws:
Exception
- if configuration error happens
-
withMonitoring
Description copied from interface:StateMachineConfigurationConfigurer
Gets a configurer for state machine monitoring.- Specified by:
withMonitoring
in interfaceStateMachineConfigurationConfigurer<S,
E> - Returns:
MonitoringConfigurer
for chaining- Throws:
Exception
- if configuration error happens
-
withPersistence
Description copied from interface:StateMachineConfigurationConfigurer
Gets a configurer for state machine persistence.- Specified by:
withPersistence
in interfaceStateMachineConfigurationConfigurer<S,
E> - Returns:
PersistenceConfigurer
for chaining- Throws:
Exception
- if configuration error happens
-
performBuild
Description copied from class:AbstractConfiguredAnnotationBuilder
Subclasses must implement this method to build the object that is being returned.- Specified by:
performBuild
in 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
-