Class Variables

java.lang.Object
org.eximeebpms.bpm.engine.variable.Variables
Direct Known Subclasses:
ClientValues

public class Variables extends Object

This class is the entry point to the process engine's typed variables API. Users can import the methods provided by this class using a static import:

import static org.eximeebpms.bpm.engine.variable.Variables.*;
Author:
Daniel Meyer
  • Constructor Details Link icon

    • Variables Link icon

      public Variables()
  • Method Details Link icon

    • createVariables Link icon

      public static VariableMap createVariables()
      Returns a new VariableMap instance.
    • fromMap Link icon

      public static VariableMap fromMap(Map<String,Object> map)
      If the given map is not a variable map, adds all its entries as untyped values to a new VariableMap. If the given map is a VariableMap, it is returned as is.
    • putValue Link icon

      public static VariableMap putValue(String name, Object value)
      Shortcut for Variables.createVariables().putValue(name, value)
    • putValueTyped Link icon

      public static VariableMap putValueTyped(String name, TypedValue value)
      Shortcut for Variables.createVariables().putValueTyped(name, value)
    • objectValue Link icon

      public static ObjectValueBuilder objectValue(Object value)
      Returns a builder to create a new ObjectValue that encapsulates the given value.
    • objectValue Link icon

      public static ObjectValueBuilder objectValue(Object value, boolean isTransient)
      Returns a builder to create a new ObjectValue that encapsulates the given value.
    • serializedObjectValue Link icon

      public static SerializedObjectValueBuilder serializedObjectValue()
      Returns a builder to create a new ObjectValue from a serialized object representation.
    • serializedObjectValue Link icon

      public static SerializedObjectValueBuilder serializedObjectValue(String value)
      Shortcut for Variables.serializedObjectValue().serializedValue(value)
    • serializedObjectValue Link icon

      public static SerializedObjectValueBuilder serializedObjectValue(String value, boolean isTransient)
      Shortcut for Variables.serializedObjectValue().serializedValue(value).setTransient(isTransient)
    • integerValue Link icon

      public static IntegerValue integerValue(Integer integer)
      Creates a new IntegerValue that encapsulates the given integer
    • integerValue Link icon

      public static IntegerValue integerValue(Integer integer, boolean isTransient)
      Creates a new IntegerValue that encapsulates the given integer
    • stringValue Link icon

      public static StringValue stringValue(String stringValue)
      Creates a new StringValue that encapsulates the given stringValue
    • stringValue Link icon

      public static StringValue stringValue(String stringValue, boolean isTransient)
      Creates a new StringValue that encapsulates the given stringValue
    • booleanValue Link icon

      public static BooleanValue booleanValue(Boolean booleanValue)
      Creates a new BooleanValue that encapsulates the given booleanValue
    • booleanValue Link icon

      public static BooleanValue booleanValue(Boolean booleanValue, boolean isTransient)
      Creates a new BooleanValue that encapsulates the given booleanValue
    • byteArrayValue Link icon

      public static BytesValue byteArrayValue(byte[] bytes)
      Creates a new BytesValue that encapsulates the given bytes
    • byteArrayValue Link icon

      public static BytesValue byteArrayValue(byte[] bytes, boolean isTransient)
      Creates a new BytesValue that encapsulates the given bytes
    • dateValue Link icon

      public static DateValue dateValue(Date date)
      Creates a new DateValue that encapsulates the given date
    • dateValue Link icon

      public static DateValue dateValue(Date date, boolean isTransient)
      Creates a new DateValue that encapsulates the given date
    • longValue Link icon

      public static LongValue longValue(Long longValue)
      Creates a new LongValue that encapsulates the given longValue
    • longValue Link icon

      public static LongValue longValue(Long longValue, boolean isTransient)
      Creates a new LongValue that encapsulates the given longValue
    • shortValue Link icon

      public static ShortValue shortValue(Short shortValue)
      Creates a new ShortValue that encapsulates the given shortValue
    • shortValue Link icon

      public static ShortValue shortValue(Short shortValue, boolean isTransient)
      Creates a new ShortValue that encapsulates the given shortValue
    • doubleValue Link icon

      public static DoubleValue doubleValue(Double doubleValue)
      Creates a new DoubleValue that encapsulates the given doubleValue
    • doubleValue Link icon

      public static DoubleValue doubleValue(Double doubleValue, boolean isTransient)
      Creates a new DoubleValue that encapsulates the given doubleValue
    • numberValue Link icon

      public static NumberValue numberValue(Number numberValue)
      Creates an abstract Number value. Note that this value cannot be used to set variables. Use the specific methods integerValue(Integer), shortValue(Short), longValue(Long) and doubleValue(Double) instead.
    • numberValue Link icon

      public static NumberValue numberValue(Number numberValue, boolean isTransient)
      Creates an abstract Number value. Note that this value cannot be used to set variables. Use the specific methods integerValue(Integer), shortValue(Short), longValue(Long) and doubleValue(Double) instead.
    • untypedNullValue Link icon

      public static TypedValue untypedNullValue()
      Creates a TypedValue with value null and type ValueType.NULL
    • untypedNullValue Link icon

      public static TypedValue untypedNullValue(boolean isTransient)
      Creates a TypedValue with value null and type ValueType.NULL
    • untypedValue Link icon

      public static TypedValue untypedValue(Object value)
      Creates an untyped value, i.e. TypedValue.getType() returns null for the returned instance.
    • untypedValue Link icon

      public static TypedValue untypedValue(Object value, boolean isTransient)
      Creates an untyped value, i.e. TypedValue.getType() returns null for the returned instance.
    • fileValue Link icon

      public static FileValueBuilder fileValue(String filename)
      Returns a builder to create a new FileValue with the given filename.
    • fileValue Link icon

      public static FileValueBuilder fileValue(String filename, boolean isTransient)
      Returns a builder to create a new FileValue with the given filename.
    • fileValue Link icon

      public static FileValue fileValue(File file)
      Shortcut for calling Variables.fileValue(name).file(file).mimeType(type).create(). The name is set to the file name and the mime type is detected via MimetypesFileTypeMap.
    • fileValue Link icon

      public static FileValue fileValue(File file, boolean isTransient)
      Shortcut for calling Variables.fileValue(name).file(file).mimeType(type).setTransient(isTransient).create(). The name is set to the file name and the mime type is detected via MimetypesFileTypeMap.
    • emptyVariableContext Link icon

      public static VariableContext emptyVariableContext()
      Returns:
      an empty VariableContext (from which no variables can be resolved).