Class ContextUtils

java.lang.Object
org.kinotic.continuum.grind.api.ContextUtils

public class ContextUtils extends Object
Created by Navid Mitchell on 7/7/20
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.springframework.core.env.MapPropertySource
    getGrindPropertySource(org.springframework.context.support.GenericApplicationContext applicationContext)
    Returns the MapPropertySource used internally by "Grind" to store property values during Task execution
    static <T> T
    getProperty(String propertyName, org.springframework.context.support.GenericApplicationContext applicationContext)
    Gets a property from the given active context.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 the MapPropertySource used internally by "Grind" to store property values during Task execution
      Parameters:
      applicationContext - to get the MapPropertySource from
      Returns:
      the MapPropertySource