Class JexlContextMap

java.lang.Object
scriptella.driver.jexl.JexlContextMap
All Implemented Interfaces:
org.apache.commons.jexl2.JexlContext

public final class JexlContextMap extends Object implements org.apache.commons.jexl2.JexlContext
Mutable JexlContext implementation for integration into Scriptella execution environment. This class allows local variables to be set via set(String, Object) method.
get(String) allows reading variables.

Important: This class is used instead of MapContext because due to parameters model limitations and performance reasons has(String) method should always return true.

Version:
1.1
Author:
Fyodor Kupolov
  • Constructor Details

    • JexlContextMap

      public JexlContextMap(ParametersCallbackMap parametersMap)
      Initializes instance and set parent parameters.
      Parameters:
      parametersMap - parent parameters.
    • JexlContextMap

      public JexlContextMap(ParametersCallback parentParameters, QueryCallback queryCallback)
      Initializes instance and set parent parameters with query callback..
      Parameters:
      parentParameters - parent parameters.
      queryCallback - query callback
  • Method Details

    • get

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

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

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