Package org.bgerp.dao.expression

# Class Expression

java.lang.Object
org.bgerp.dao.expression.Expression

public class Expression extends Object
JEXL expression processor. JEXL scripts are used for condition checking and execution small scripts. http://commons.apache.org/jexl/reference/syntax.html#Functions

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `Expression.ContextInitEvent`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `CHECK_ERROR_MESSAGE_CONFIG_KEY`
  `static final String`
  `CHECK_EXPRESSION_CONFIG_KEY`
  `static final String`
  `DO_EXPRESSION_CONFIG_KEY`
  `static final String`
  `EXPRESSION_CONFIG_KEY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Expression(Map<String,Object> context)`
  `Expression(Map<String,Object> context, boolean safe)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Map<String,Object>`
  `context(ConnectionSet conSet, DynActionForm form, UserEvent event, Process process)`
  Creates expressions' context for process related expression.
  `Object`
  `execute(String expression)`
  `boolean`
  `executeCheck(String expression)`
  `String`
  `executeGetString(String expression)`
  `static Expression`
  `init(ConnectionSet conSet, UserEvent event, Process process)`
  Creates initialized expression for a process related expression.
  `static void`
  `setExpressionContextUtils(Map<String,Object> contextVars)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### EXPRESSION_CONFIG_KEY

    public static final String EXPRESSION_CONFIG_KEY
    See Also:
      - Constant Field Values

  - ### CHECK_EXPRESSION_CONFIG_KEY

    public static final String CHECK_EXPRESSION_CONFIG_KEY
    See Also:
      - Constant Field Values

  - ### CHECK_ERROR_MESSAGE_CONFIG_KEY

    public static final String CHECK_ERROR_MESSAGE_CONFIG_KEY
    See Also:
      - Constant Field Values

  - ### DO_EXPRESSION_CONFIG_KEY

    public static final String DO_EXPRESSION_CONFIG_KEY
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### Expression

    public Expression(Map<String,Object> context)

  - ### Expression

    public Expression(Map<String,Object> context, boolean safe)

- ## Method Details

  - ### setExpressionContextUtils

    public static void setExpressionContextUtils(Map<String,Object> contextVars)

  - ### executeCheck

    public boolean executeCheck(String expression)

  - ### executeGetString

    public String executeGetString(String expression)

  - ### execute

    public Object execute(String expression)

  - ### init

    public static Expression init(ConnectionSet conSet, UserEvent event, Process process) throws Exception
    Creates initialized expression for a process related expression.
    Parameters:
      `conSet` - DB connection sets.
      `event` - event.
      `process` - the process.
    Returns:
    Throws:
      `Exception`

  - ### context

    public static Map<String,Object> context(ConnectionSet conSet, DynActionForm form, UserEvent event, Process process)
    Creates expressions' context for process related expression.
    Parameters:
      `conSet` - DB connections set.
      `form` - request form.
      `event` - event, can be `null`.
      `process` - the process.
    Returns: