Class FileValueSerializer
java.lang.Object
org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializer<FileValue>
org.camunda.bpm.engine.impl.variable.serializer.FileValueSerializer
- All Implemented Interfaces:
TypedValueSerializer<FileValue>
- Since:
- 7.4
- Author:
- Ronny Bräunlich
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
The separator to be able to store encoding and mimetype inside the same text field.protected static final int
The numbers values we encoded in textfield two.Fields inherited from class org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializer
BINARY_VALUE_TYPES, valueType
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canWriteValue
(TypedValue value) convertToTypedValue
(UntypedValueImpl untypedValue) Returns a typed value for the provided untyped value.getName()
The name of this serializer.readValue
(ValueFields valueFields, boolean deserializeValue, boolean asTransientValue) Retrieve aTypedValue
from the providedValueFields
.protected String
void
writeValue
(FileValue value, ValueFields valueFields) Serialize aTypedValue
to theValueFields
.Methods inherited from class org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializer
canHandle, getSerializationDataformat, getType, isMutableValue
-
Field Details
-
NR_OF_VALUES_IN_TEXTFIELD2
protected static final int NR_OF_VALUES_IN_TEXTFIELD2The numbers values we encoded in textfield two.- See Also:
-
MIMETYPE_ENCODING_SEPARATOR
The separator to be able to store encoding and mimetype inside the same text field. Please be aware that the separator only works when it is a character that is not allowed in the first component.- See Also:
-
-
Constructor Details
-
FileValueSerializer
public FileValueSerializer()
-
-
Method Details
-
writeValue
Description copied from interface:TypedValueSerializer
Serialize aTypedValue
to theValueFields
.- Parameters:
value
- theTypedValue
to persistvalueFields
- theValueFields
to which the value should be persisted
-
convertToTypedValue
Description copied from interface:TypedValueSerializer
Returns a typed value for the provided untyped value. This is used on cases where the user sets an untyped value which is then detected to be handled by thisTypedValueSerializer
(by invocation ofTypedValueSerializer.canHandle(TypedValue)
).- Parameters:
untypedValue
- the untyped value- Returns:
- the corresponding typed value
-
readValue
public FileValue readValue(ValueFields valueFields, boolean deserializeValue, boolean asTransientValue) Description copied from interface:TypedValueSerializer
Retrieve aTypedValue
from the providedValueFields
.- Parameters:
valueFields
- theValueFields
to retrieve the value fromdeserializeValue
- indicates whether aSerializableValue
should be deserialized.- Returns:
- the
TypedValue
-
returnNullIfEmptyString
-
getName
Description copied from interface:TypedValueSerializer
The name of this serializer. The name is used when persisting the ValueFields populated by this serializer.- Returns:
- the name of this serializer.
-
canWriteValue
- Specified by:
canWriteValue
in classAbstractTypedValueSerializer<FileValue>
-