Class JacksonJsonDataFormat
java.lang.Object
org.camunda.bpm.client.variable.impl.format.json.JacksonJsonDataFormat
- All Implemented Interfaces:
DataFormat
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected com.fasterxml.jackson.databind.ObjectMapper
protected List<TypeDetector>
-
Constructor Summary
ConstructorsConstructorDescriptionJacksonJsonDataFormat
(String name) JacksonJsonDataFormat
(String name, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if this data format can map the provided Java Object.com.fasterxml.jackson.databind.JavaType
constructJavaTypeFromCanonicalString
(String canonicalString) getCanonicalTypeName
(Object value) Returns a data-format-specific canonical type name.getName()
Returns the data format name.com.fasterxml.jackson.databind.ObjectMapper
protected <C> C
<T> T
Reads the internal representation of a data format to a java object of the desired class.<T> T
Reads the internal representation of a data format to a java object of the desired class.void
setObjectMapper
(com.fasterxml.jackson.databind.ObjectMapper objectMapper) writeValue
(Object value) Writes a java object to a data format's internal data representation.
-
Field Details
-
name
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper -
typeDetectors
-
-
Constructor Details
-
JacksonJsonDataFormat
-
JacksonJsonDataFormat
-
-
Method Details
-
getName
Description copied from interface:DataFormat
Returns the data format name.- Specified by:
getName
in interfaceDataFormat
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() -
setObjectMapper
public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
canMap
Description copied from interface:DataFormat
Returns true if this data format can map the provided Java Object.- Specified by:
canMap
in interfaceDataFormat
- Returns:
- true if this object can be mapped.
-
writeValue
Description copied from interface:DataFormat
Writes a java object to a data format's internal data representation.- Specified by:
writeValue
in interfaceDataFormat
- Parameters:
value
- object that is written into internal data representation- Returns:
- the data format's internal representation of that object
-
readValue
Description copied from interface:DataFormat
Reads the internal representation of a data format to a java object of the desired class.- Specified by:
readValue
in interfaceDataFormat
- Parameters:
value
- the object to be readtypeIdentifier
- the class to map the object to- Returns:
- a java object of the specified class that was populated with the input parameter
-
readValue
Description copied from interface:DataFormat
Reads the internal representation of a data format to a java object of the desired class.- Specified by:
readValue
in interfaceDataFormat
- Parameters:
value
- the object to be readcls
- a data-format-specific type identifier that describes the class to map to- Returns:
- a java object of the specified class that was populated with the input parameter
-
readValue
-
constructJavaTypeFromCanonicalString
public com.fasterxml.jackson.databind.JavaType constructJavaTypeFromCanonicalString(String canonicalString) -
getCanonicalTypeName
Description copied from interface:DataFormat
Returns a data-format-specific canonical type name.- Specified by:
getCanonicalTypeName
in interfaceDataFormat
-