public class FileValueSerializer extends AbstractTypedValueSerializer<FileValue>
Modifier and Type | Field and 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.
|
BINARY_VALUE_TYPES, valueType
Constructor and Description |
---|
FileValueSerializer() |
Modifier and Type | Method and 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 a
TypedValue from the provided ValueFields . |
protected String |
returnNullIfEmptyString(String s) |
void |
writeValue(FileValue value,
ValueFields valueFields)
Serialize a
TypedValue to the ValueFields . |
canHandle, getSerializationDataformat, getType, isMutableValue
protected static final int NR_OF_VALUES_IN_TEXTFIELD2
protected static final String MIMETYPE_ENCODING_SEPARATOR
public void writeValue(FileValue value, ValueFields valueFields)
TypedValueSerializer
TypedValue
to the ValueFields
.value
- the TypedValue
to persistvalueFields
- the ValueFields
to which the value should be persistedpublic FileValue convertToTypedValue(UntypedValueImpl untypedValue)
TypedValueSerializer
TypedValueSerializer
(by invocation of TypedValueSerializer.canHandle(TypedValue)
).untypedValue
- the untyped valuepublic FileValue readValue(ValueFields valueFields, boolean deserializeValue, boolean asTransientValue)
TypedValueSerializer
TypedValue
from the provided ValueFields
.valueFields
- the ValueFields
to retrieve the value fromdeserializeValue
- indicates whether a SerializableValue
should be deserialized.TypedValue
public String getName()
TypedValueSerializer
protected boolean canWriteValue(TypedValue value)
canWriteValue
in class AbstractTypedValueSerializer<FileValue>
Copyright © 2022. All rights reserved.