Class JexlChecker

java.lang.Object
net.simplace.core.jexl.builder.JexlChecker

public class JexlChecker extends Object
Check functions for JEXL rules (namespace check:).
Author:
aenders
  • Constructor Details

    • JexlChecker

      public JexlChecker()
  • Method Details

    • isNull

      public static Boolean isNull(Object a)
      Used in JEXL like check:isNull(a).
      Parameters:
      a - the value
      Returns:
      true if a is null
    • isEmpty

      public static Boolean isEmpty(Object a)
      Used in JEXL like check:isEmpty(a).
      Parameters:
      a - the value
      Returns:
      true if a is empty, see StringHelper.isEmpty(Object)
    • abort

      public static Boolean abort(Boolean a)
      Aborts the simulation if the condition is true; used in JEXL like check:abort(condition).
      Parameters:
      a - the abort condition
      Returns:
      false (the condition) if the simulation is not aborted
      Throws:
      AbortSimulationException - if a is true
    • abort

      public static Boolean abort(Boolean a, String aMessage)
      Aborts the simulation with a message if the condition is true; used in JEXL like check:abort(condition, 'message').
      Parameters:
      a - the abort condition
      aMessage - the reason, part of the exception message
      Returns:
      false (the condition) if the simulation is not aborted
      Throws:
      AbortSimulationException - if a is true