Class MapParameterContext

java.lang.Object
net.simplace.core.jexl.FWParameterContext
net.simplace.core.jexl.MapParameterContext
All Implemented Interfaces:
org.apache.commons.jexl3.JexlContext

public class MapParameterContext extends FWParameterContext
Parameter context of a parameter map (GUI, pipelines, data readers) for FWParameterResolver: tokens are replaced by the map values (dates as date and time, an existing empty value by an empty text), expressions get the values themselves (texts that are numbers as numbers).
Author:
Andreas Enders
  • Constructor Details

    • MapParameterContext

      public MapParameterContext(Map<String,Object> aParameterMap)
      Parameters:
      aParameterMap - the parameter map providing the values; TEMPDIR and OID may be added
  • Method Details

    • getText

      protected String getText(String aName)
      Specified by:
      getText in class FWParameterContext
      Parameters:
      aName - parameter name
      Returns:
      the value as text for token replacement (empty for an existing parameter without value), or null if the parameter does not exist
    • getObject

      protected Object getObject(String aName)
      Specified by:
      getObject in class FWParameterContext
      Parameters:
      aName - parameter name
      Returns:
      the value; a text that is a number (e.g. the value of a text field) is returned as number (Long or Double), so that ${count} + 1 calculates instead of concatenating
    • contains

      protected boolean contains(String aName)
      Specified by:
      contains in class FWParameterContext
      Parameters:
      aName - parameter name
      Returns:
      true if the source has the parameter
    • store

      protected void store(String aName, String aValue)
      Description copied from class: FWParameterContext
      Stores the temporary directory created by _TEMPDIR_ in the source.
      Specified by:
      store in class FWParameterContext
      Parameters:
      aName - parameter name
      aValue - the value