Class TigerJexlContext

java.lang.Object
java.util.AbstractMap<K,V>
java.util.TreeMap<String,Object>
de.gematik.test.tiger.common.jexl.TigerJexlContext
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>, NavigableMap<String,Object>, SortedMap<String,Object>, org.apache.commons.jexl3.JexlContext

public class TigerJexlContext extends TreeMap<String,Object> implements org.apache.commons.jexl3.JexlContext
Context to be used in a JEXL-evaluation. The keys are of type string, but they are canonicalized in accordance to the TigerConfigurationKey. The values are objects, which makes this a superset of the TigerGlobalConfiguration.
See Also:
  • Field Details

  • Constructor Details

    • TigerJexlContext

      public TigerJexlContext(Map<String,Object> initialMap)
    • TigerJexlContext

      public TigerJexlContext()
  • Method Details

    • withCurrentElement

      public TigerJexlContext withCurrentElement(Object o)
      Clones the context and returns a new copy with the current element set to the given value
    • withRootElement

      public TigerJexlContext withRootElement(Object o)
      Clones the context and returns a new copy with the root element set to the given value
    • withKey

      public TigerJexlContext withKey(String key)
      Clones the context and returns a new copy with the key element set to the given value
    • with

      public TigerJexlContext with(String key, String value)
      Clones the context and returns a new copy with the given key/value pair added
    • set

      public void set(String name, Object value)
      Specified by:
      set in interface org.apache.commons.jexl3.JexlContext
    • put

      public Object put(String name, Object value)
      Specified by:
      put in interface Map<String,Object>
      Overrides:
      put in class TreeMap<String,Object>
    • has

      public boolean has(String name)
      Specified by:
      has in interface org.apache.commons.jexl3.JexlContext
    • get

      public Object get(String name)
      Specified by:
      get in interface org.apache.commons.jexl3.JexlContext
    • getOptional

      public Optional<Object> getOptional(String name)
    • getCurrentElement

      public Object getCurrentElement()
    • getRootElement

      public Object getRootElement()
    • getKey

      public String getKey()
    • cloneContext

      public TigerJexlContext cloneContext()