Enum Class Variables.SerializationDataFormats
- All Implemented Interfaces:
Serializable
,Comparable<Variables.SerializationDataFormats>
,Constable
,SerializationDataFormat
- Enclosing class:
- Variables
A set of builtin serialization dataformat constants. These constants can be used to specify how java object variables should be serialized by the process engine:
CustomerData customerData = new CustomerData(); // ... ObjectValue customerDataValue = Variables.objectValue(customerData) .serializationDataFormat(Variables.SerializationDataFormats.JSON) .create(); execution.setVariable("someVariable", customerDataValue);
Note that not all of the formats provided here are supported out of the box.
- Author:
- Daniel Meyer
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
The name of the dataformat.Returns the enum constant of this class with the specified name.static Variables.SerializationDataFormats[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
JAVA
The Java Serialization Data format. If this data format is used for serializing an object, the object is serialized using default Java
Serializable
.The process engine provides a serializer for this dataformat out of the box.
-
JSON
The Json Serialization Data format. If this data format is used for serializing an object, the object is serialized as Json text.
NOTE: the process does NOT provide a serializer for this dataformat out of the box. If you want to serialize objects using the Json dataformat, you need to provide a serializer. The optinal camunda Spin process engine plugin provides such a serializer.
-
XML
The Xml Serialization Data format. If this data format is used for serializing an object, the object is serialized as Xml text.
NOTE: the process does NOT provide a serializer for this dataformat out of the box. If you want to serialize objects using the Xml dataformat, you need to provide a serializer. The optinal camunda Spin process engine plugin provides such a serializer.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getName
Description copied from interface:SerializationDataFormat
The name of the dataformat. Example: "application/json"- Specified by:
getName
in interfaceSerializationDataFormat
- Returns:
- the name of the dataformat.
-