Package org.camunda.bpm.engine.variable
Class Variables
java.lang.Object
org.camunda.bpm.engine.variable.Variables
- Direct Known Subclasses:
ClientValues
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.camunda.bpm.engine.variable.Variables.*;
- Author:
- Daniel Meyer
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
A set of builtin serialization dataformat constants. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BooleanValue
booleanValue
(Boolean booleanValue) Creates a newBooleanValue
that encapsulates the givenbooleanValue
static BooleanValue
booleanValue
(Boolean booleanValue, boolean isTransient) Creates a newBooleanValue
that encapsulates the givenbooleanValue
static BytesValue
byteArrayValue
(byte[] bytes) Creates a newBytesValue
that encapsulates the givenbytes
static BytesValue
byteArrayValue
(byte[] bytes, boolean isTransient) Creates a newBytesValue
that encapsulates the givenbytes
static VariableMap
Returns a newVariableMap
instance.static DateValue
Creates a newDateValue
that encapsulates the givendate
static DateValue
Creates a newDateValue
that encapsulates the givendate
static DoubleValue
doubleValue
(Double doubleValue) Creates a newDoubleValue
that encapsulates the givendoubleValue
static DoubleValue
doubleValue
(Double doubleValue, boolean isTransient) Creates a newDoubleValue
that encapsulates the givendoubleValue
static VariableContext
static FileValue
Shortcut for callingVariables.fileValue(name).file(file).mimeType(type).create()
.static FileValue
Shortcut for callingVariables.fileValue(name).file(file).mimeType(type).setTransient(isTransient).create()
.static FileValueBuilder
Returns a builder to create a newFileValue
with the givenfilename
.static FileValueBuilder
Returns a builder to create a newFileValue
with the givenfilename
.static VariableMap
If the given map is not a variable map, adds all its entries as untyped values to a newVariableMap
.static IntegerValue
integerValue
(Integer integer) Creates a newIntegerValue
that encapsulates the giveninteger
static IntegerValue
integerValue
(Integer integer, boolean isTransient) Creates a newIntegerValue
that encapsulates the giveninteger
static LongValue
Creates a newLongValue
that encapsulates the givenlongValue
static LongValue
Creates a newLongValue
that encapsulates the givenlongValue
static NumberValue
numberValue
(Number numberValue) Creates an abstract Number value.static NumberValue
numberValue
(Number numberValue, boolean isTransient) Creates an abstract Number value.static ObjectValueBuilder
objectValue
(Object value) Returns a builder to create a newObjectValue
that encapsulates the givenvalue
.static ObjectValueBuilder
objectValue
(Object value, boolean isTransient) Returns a builder to create a newObjectValue
that encapsulates the givenvalue
.static VariableMap
Shortcut forVariables.createVariables().putValue(name, value)
static VariableMap
putValueTyped
(String name, TypedValue value) Shortcut forVariables.createVariables().putValueTyped(name, value)
static SerializedObjectValueBuilder
Returns a builder to create a newObjectValue
from a serialized object representation.static SerializedObjectValueBuilder
serializedObjectValue
(String value) Shortcut forVariables.serializedObjectValue().serializedValue(value)
static SerializedObjectValueBuilder
serializedObjectValue
(String value, boolean isTransient) Shortcut forVariables.serializedObjectValue().serializedValue(value).setTransient(isTransient)
static ShortValue
shortValue
(Short shortValue) Creates a newShortValue
that encapsulates the givenshortValue
static ShortValue
shortValue
(Short shortValue, boolean isTransient) Creates a newShortValue
that encapsulates the givenshortValue
static StringValue
stringValue
(String stringValue) Creates a newStringValue
that encapsulates the givenstringValue
static StringValue
stringValue
(String stringValue, boolean isTransient) Creates a newStringValue
that encapsulates the givenstringValue
static TypedValue
static TypedValue
untypedNullValue
(boolean isTransient) static TypedValue
untypedValue
(Object value) Creates an untyped value, i.e.static TypedValue
untypedValue
(Object value, boolean isTransient) Creates an untyped value, i.e.
-
Constructor Details
-
Variables
public Variables()
-
-
Method Details
-
createVariables
Returns a newVariableMap
instance. -
fromMap
If the given map is not a variable map, adds all its entries as untyped values to a newVariableMap
. If the given map is aVariableMap
, it is returned as is. -
putValue
Shortcut forVariables.createVariables().putValue(name, value)
-
putValueTyped
Shortcut forVariables.createVariables().putValueTyped(name, value)
-
objectValue
Returns a builder to create a newObjectValue
that encapsulates the givenvalue
. -
objectValue
Returns a builder to create a newObjectValue
that encapsulates the givenvalue
. -
serializedObjectValue
Returns a builder to create a newObjectValue
from a serialized object representation. -
serializedObjectValue
Shortcut forVariables.serializedObjectValue().serializedValue(value)
-
serializedObjectValue
Shortcut forVariables.serializedObjectValue().serializedValue(value).setTransient(isTransient)
-
integerValue
Creates a newIntegerValue
that encapsulates the giveninteger
-
integerValue
Creates a newIntegerValue
that encapsulates the giveninteger
-
stringValue
Creates a newStringValue
that encapsulates the givenstringValue
-
stringValue
Creates a newStringValue
that encapsulates the givenstringValue
-
booleanValue
Creates a newBooleanValue
that encapsulates the givenbooleanValue
-
booleanValue
Creates a newBooleanValue
that encapsulates the givenbooleanValue
-
byteArrayValue
Creates a newBytesValue
that encapsulates the givenbytes
-
byteArrayValue
Creates a newBytesValue
that encapsulates the givenbytes
-
dateValue
Creates a newDateValue
that encapsulates the givendate
-
dateValue
Creates a newDateValue
that encapsulates the givendate
-
longValue
Creates a newLongValue
that encapsulates the givenlongValue
-
longValue
Creates a newLongValue
that encapsulates the givenlongValue
-
shortValue
Creates a newShortValue
that encapsulates the givenshortValue
-
shortValue
Creates a newShortValue
that encapsulates the givenshortValue
-
doubleValue
Creates a newDoubleValue
that encapsulates the givendoubleValue
-
doubleValue
Creates a newDoubleValue
that encapsulates the givendoubleValue
-
numberValue
Creates an abstract Number value. Note that this value cannot be used to set variables. Use the specific methodsintegerValue(Integer)
,shortValue(Short)
,longValue(Long)
anddoubleValue(Double)
instead. -
numberValue
Creates an abstract Number value. Note that this value cannot be used to set variables. Use the specific methodsintegerValue(Integer)
,shortValue(Short)
,longValue(Long)
anddoubleValue(Double)
instead. -
untypedNullValue
-
untypedNullValue
-
untypedValue
Creates an untyped value, i.e.TypedValue.getType()
returnsnull
for the returned instance. -
untypedValue
Creates an untyped value, i.e.TypedValue.getType()
returnsnull
for the returned instance. -
fileValue
Returns a builder to create a newFileValue
with the givenfilename
. -
fileValue
Returns a builder to create a newFileValue
with the givenfilename
. -
fileValue
Shortcut for callingVariables.fileValue(name).file(file).mimeType(type).create()
. The name is set to the file name and the mime type is detected viaMimetypesFileTypeMap
. -
fileValue
Shortcut for callingVariables.fileValue(name).file(file).mimeType(type).setTransient(isTransient).create()
. The name is set to the file name and the mime type is detected viaMimetypesFileTypeMap
. -
emptyVariableContext
- Returns:
- an empty
VariableContext
(from which no variables can be resolved).
-