Class JsonType
java.lang.Object
org.flowable.variable.service.impl.types.JsonType
- All Implemented Interfaces:
VariableType,MutableVariableType<com.fasterxml.jackson.databind.JsonNode,com.fasterxml.jackson.databind.JsonNode>
public class JsonType
extends Object
implements VariableType, MutableVariableType<com.fasterxml.jackson.databind.JsonNode,com.fasterxml.jackson.databind.JsonNode>
- Author:
- Tijs Rademakers, Filip Hrisafov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final VariableLengthVerifierprotected static final Stringprotected final intprotected com.fasterxml.jackson.databind.ObjectMapperprotected final booleanstatic final Stringprotected final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionJsonType(int maxLength, com.fasterxml.jackson.databind.ObjectMapper objectMapper, boolean trackObjects) JsonType(int maxLength, VariableLengthVerifier lengthVerifier, com.fasterxml.jackson.databind.ObjectMapper objectMapper, boolean trackObjects) protectedJsonType(int maxLength, VariableLengthVerifier lengthVerifier, com.fasterxml.jackson.databind.ObjectMapper objectMapper, boolean trackObjects, String typeName) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetEngineType(String scopeType) name of variable type (limited to 100 characters length)getValue(ValueFields valueFields) protected VariableServiceConfigurationgetVariableServiceConfiguration(ValueFields valueFields) booleanisAbleToStore(Object value) booleanIndicates if this variable type supports caching.static JsonTypelongJsonType(int maxLength, com.fasterxml.jackson.databind.ObjectMapper objectMapper, boolean trackObjects) static JsonTypelongJsonType(int maxLength, VariableLengthVerifier lengthVerifier, com.fasterxml.jackson.databind.ObjectMapper objectMapper, boolean trackObjects) voidsetValue(Object value, ValueFields valueFields) Stores the specified value in the suppliedValueFields.protected voidtraceValue(com.fasterxml.jackson.databind.JsonNode value, ValueFields valueFields) booleanupdateValueIfChanged(com.fasterxml.jackson.databind.JsonNode originalNode, com.fasterxml.jackson.databind.JsonNode originalCopyNode, VariableInstanceEntity variableInstanceEntity) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.flowable.variable.api.types.VariableType
isReadOnly
-
Field Details
-
TYPE_NAME
- See Also:
-
LONG_JSON_TYPE_NAME
- See Also:
-
maxLength
protected final int maxLength -
lengthVerifier
-
trackObjects
protected final boolean trackObjects -
typeName
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Details
-
JsonType
public JsonType(int maxLength, com.fasterxml.jackson.databind.ObjectMapper objectMapper, boolean trackObjects) -
JsonType
public JsonType(int maxLength, VariableLengthVerifier lengthVerifier, com.fasterxml.jackson.databind.ObjectMapper objectMapper, boolean trackObjects) -
JsonType
protected JsonType(int maxLength, VariableLengthVerifier lengthVerifier, com.fasterxml.jackson.databind.ObjectMapper objectMapper, boolean trackObjects, String typeName)
-
-
Method Details
-
longJsonType
public static JsonType longJsonType(int maxLength, com.fasterxml.jackson.databind.ObjectMapper objectMapper, boolean trackObjects) -
longJsonType
public static JsonType longJsonType(int maxLength, VariableLengthVerifier lengthVerifier, com.fasterxml.jackson.databind.ObjectMapper objectMapper, boolean trackObjects) -
getTypeName
Description copied from interface:VariableTypename of variable type (limited to 100 characters length)- Specified by:
getTypeNamein interfaceVariableType
-
isCachable
public boolean isCachable()Description copied from interface:VariableTypeIndicates if this variable type supports caching.
If caching is supported, the result of
VariableType.getValue(ValueFields)is saved for the duration of the session and used for subsequent reads of the variable's value.If caching is not supported, all reads of a variable's value require a fresh call to
VariableType.getValue(ValueFields).- Specified by:
isCachablein interfaceVariableType- Returns:
- whether variables of this type are cacheable.
-
getValue
- Specified by:
getValuein interfaceVariableType- Returns:
- the value of a variable based on the specified
ValueFields.
-
setValue
Description copied from interface:VariableTypeStores the specified value in the suppliedValueFields.- Specified by:
setValuein interfaceVariableType
-
updateValueIfChanged
public boolean updateValueIfChanged(com.fasterxml.jackson.databind.JsonNode originalNode, com.fasterxml.jackson.databind.JsonNode originalCopyNode, VariableInstanceEntity variableInstanceEntity) - Specified by:
updateValueIfChangedin interfaceMutableVariableType<com.fasterxml.jackson.databind.JsonNode,com.fasterxml.jackson.databind.JsonNode>
-
traceValue
-
getVariableServiceConfiguration
-
getEngineType
-
isAbleToStore
- Specified by:
isAbleToStorein interfaceVariableType- Returns:
- whether this variable type can store the specified value.
-