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>
public class FileValueSerializer extends AbstractTypedValueSerializer<FileValue>
- Since:
- 7.4
- Author:
- Ronny Bräunlich
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
MIMETYPE_ENCODING_SEPARATOR
The separator to be able to store encoding and mimetype inside the same text field.protected static int
NR_OF_VALUES_IN_TEXTFIELD2
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
Constructors Constructor Description FileValueSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canWriteValue(TypedValue value)
FileValue
convertToTypedValue(UntypedValueImpl untypedValue)
Returns a typed value for the provided untyped value.String
getName()
The name of this serializer.FileValue
readValue(ValueFields valueFields, boolean deserializeValue, boolean asTransientValue)
Retrieve aTypedValue
from the providedValueFields
.protected String
returnNullIfEmptyString(String s)
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 Detail
-
NR_OF_VALUES_IN_TEXTFIELD2
protected static final int NR_OF_VALUES_IN_TEXTFIELD2
The numbers values we encoded in textfield two.- See Also:
- Constant Field Values
-
MIMETYPE_ENCODING_SEPARATOR
protected static final String 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:
- Constant Field Values
-
-
Method Detail
-
writeValue
public void writeValue(FileValue value, ValueFields valueFields)
Description copied from interface:TypedValueSerializer
Serialize aTypedValue
to theValueFields
.- Parameters:
value
- theTypedValue
to persistvalueFields
- theValueFields
to which the value should be persisted
-
convertToTypedValue
public FileValue convertToTypedValue(UntypedValueImpl untypedValue)
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
-
getName
public String 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
protected boolean canWriteValue(TypedValue value)
- Specified by:
canWriteValue
in classAbstractTypedValueSerializer<FileValue>
-
-