Package org.kinotic.continuum.grind.api
Class ContextUtils
java.lang.Object
org.kinotic.continuum.grind.api.ContextUtils
Created by Navid Mitchell on 7/7/20
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.core.env.MapPropertySourcegetGrindPropertySource(org.springframework.context.support.GenericApplicationContext applicationContext) Returns theMapPropertySourceused internally by "Grind" to store property values duringTaskexecutionstatic <T> TgetProperty(String propertyName, org.springframework.context.support.GenericApplicationContext applicationContext) Gets a property from the given active context.
-
Constructor Details
-
ContextUtils
public ContextUtils()
-
-
Method Details
-
getProperty
public static <T> T getProperty(String propertyName, org.springframework.context.support.GenericApplicationContext applicationContext) Gets a property from the given active context.- Type Parameters:
T- type of the property expected- Parameters:
propertyName- the name of the property to retrieve- Returns:
- the property or null if not value is found for the given name
-
getGrindPropertySource
public static org.springframework.core.env.MapPropertySource getGrindPropertySource(org.springframework.context.support.GenericApplicationContext applicationContext) Returns theMapPropertySourceused internally by "Grind" to store property values duringTaskexecution- Parameters:
applicationContext- to get theMapPropertySourcefrom- Returns:
- the
MapPropertySource
-