Class StateMachineContextUtils
java.lang.Object
org.springframework.statemachine.support.StateMachineContextUtils
Utility methods for accessing common components from the BeanFactory.
- Author:
- Janne Valkealahti
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.core.convert.ConversionService
getConversionService
(org.springframework.beans.factory.BeanFactory beanFactory) Return theConversionService
bean whose name is "yarnConversionService" if available.static org.springframework.expression.spel.support.StandardEvaluationContext
getEvaluationContext
(org.springframework.beans.factory.BeanFactory beanFactory) Return theStandardEvaluationContext
bean whose name is "yarnEvaluationContext" if available.static StateMachineEventPublisher
getEventPublisher
(org.springframework.beans.factory.BeanFactory beanFactory) Return theStateMachineEventPublisher
bean whose name is "stateMachineEventPublisher" if available.
-
Field Details
-
CONVERSION_SERVICE_BEAN_NAME
- See Also:
-
EVALUATION_CONTEXT_BEAN_NAME
- See Also:
-
-
Constructor Details
-
StateMachineContextUtils
public StateMachineContextUtils()
-
-
Method Details
-
getConversionService
public static org.springframework.core.convert.ConversionService getConversionService(org.springframework.beans.factory.BeanFactory beanFactory) Return theConversionService
bean whose name is "yarnConversionService" if available.- Parameters:
beanFactory
- BeanFactory for lookup, must not be null.- Returns:
- The
ConversionService
bean whose name is "yarnConversionService" if available.
-
getEvaluationContext
public static org.springframework.expression.spel.support.StandardEvaluationContext getEvaluationContext(org.springframework.beans.factory.BeanFactory beanFactory) Return theStandardEvaluationContext
bean whose name is "yarnEvaluationContext" if available.- Parameters:
beanFactory
- BeanFactory for lookup, must not be null.- Returns:
- the instance of
StandardEvaluationContext
bean whose name is "yarnEvaluationContext" .
-
getEventPublisher
public static StateMachineEventPublisher getEventPublisher(org.springframework.beans.factory.BeanFactory beanFactory) Return theStateMachineEventPublisher
bean whose name is "stateMachineEventPublisher" if available.- Parameters:
beanFactory
- BeanFactory for lookup, must not be null.- Returns:
- state machine event publisher
-