org.camunda.bpm.engine.impl.variable.serializer
Class FileValueSerializer

java.lang.Object
  extended by org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializer<org.camunda.bpm.engine.variable.value.FileValue>
      extended by org.camunda.bpm.engine.impl.variable.serializer.FileValueSerializer
All Implemented Interfaces:
TypedValueSerializer<org.camunda.bpm.engine.variable.value.FileValue>

public class FileValueSerializer
extends AbstractTypedValueSerializer<org.camunda.bpm.engine.variable.value.FileValue>

Since:
7.4
Author:
Ronny Bräunlich

Field Summary
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
FileValueSerializer()
           
 
Method Summary
protected  boolean canWriteValue(org.camunda.bpm.engine.variable.value.TypedValue value)
           
 org.camunda.bpm.engine.variable.value.FileValue convertToTypedValue(org.camunda.bpm.engine.variable.impl.value.UntypedValueImpl untypedValue)
          Returns a typed value for the provided untyped value.
 String getName()
          The name of this serializer.
 org.camunda.bpm.engine.variable.value.FileValue readValue(ValueFields valueFields, boolean deserializeValue)
          Retrieve a TypedValue from the provided ValueFields.
protected  String returnNullIfEmptyString(String s)
           
 void writeValue(org.camunda.bpm.engine.variable.value.FileValue value, ValueFields valueFields)
          Serialize a TypedValue to the ValueFields.
 
Methods inherited from class org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializer
canHandle, getSerializationDataformat, getType, isMutableValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

FileValueSerializer

public FileValueSerializer()
Method Detail

writeValue

public void writeValue(org.camunda.bpm.engine.variable.value.FileValue value,
                       ValueFields valueFields)
Description copied from interface: TypedValueSerializer
Serialize a TypedValue to the ValueFields.

Parameters:
value - the TypedValue to persist
valueFields - the ValueFields to which the value should be persisted

convertToTypedValue

public org.camunda.bpm.engine.variable.value.FileValue convertToTypedValue(org.camunda.bpm.engine.variable.impl.value.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 this TypedValueSerializer (by invocation of TypedValueSerializer.canHandle(TypedValue)).

Parameters:
untypedValue - the untyped value
Returns:
the corresponding typed value

readValue

public org.camunda.bpm.engine.variable.value.FileValue readValue(ValueFields valueFields,
                                                                 boolean deserializeValue)
Description copied from interface: TypedValueSerializer
Retrieve a TypedValue from the provided ValueFields.

Parameters:
valueFields - the ValueFields to retrieve the value from
deserializeValue - indicates whether a SerializableValue should be deserialized.
Returns:
the TypedValue

returnNullIfEmptyString

protected String returnNullIfEmptyString(String s)

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(org.camunda.bpm.engine.variable.value.TypedValue value)
Specified by:
canWriteValue in class AbstractTypedValueSerializer<org.camunda.bpm.engine.variable.value.FileValue>


Copyright © 2018 camunda services GmbH. All rights reserved.