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 java.lang.StringMIMETYPE_ENCODING_SEPARATORThe separator to be able to store encoding and mimetype inside the same text field.protected static intNR_OF_VALUES_IN_TEXTFIELD2The 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 booleancanWriteValue(TypedValue value)FileValueconvertToTypedValue(UntypedValueImpl untypedValue)Returns a typed value for the provided untyped value.java.lang.StringgetName()The name of this serializer.FileValuereadValue(ValueFields valueFields, boolean deserializeValue, boolean asTransientValue)Retrieve aTypedValuefrom the providedValueFields.protected java.lang.StringreturnNullIfEmptyString(java.lang.String s)voidwriteValue(FileValue value, ValueFields valueFields)Serialize aTypedValueto 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 java.lang.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:TypedValueSerializerSerialize aTypedValueto theValueFields.- Parameters:
value- theTypedValueto persistvalueFields- theValueFieldsto which the value should be persisted
-
convertToTypedValue
public FileValue convertToTypedValue(UntypedValueImpl untypedValue)
Description copied from interface:TypedValueSerializerReturns 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:TypedValueSerializerRetrieve aTypedValuefrom the providedValueFields.- Parameters:
valueFields- theValueFieldsto retrieve the value fromdeserializeValue- indicates whether aSerializableValueshould be deserialized.- Returns:
- the
TypedValue
-
returnNullIfEmptyString
protected java.lang.String returnNullIfEmptyString(java.lang.String s)
-
getName
public java.lang.String getName()
Description copied from interface:TypedValueSerializerThe 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:
canWriteValuein classAbstractTypedValueSerializer<FileValue>
-
-