org.camunda.bpm.engine.impl.variable.serializer
Interface VariableSerializers

All Known Implementing Classes:
DefaultVariableSerializers

public interface VariableSerializers

Interface describing a container for all available TypedValueSerializers of variables.

Author:
dsyer, Frederik Heremans, Daniel Meyer

Method Summary
 VariableSerializers addSerializer(TypedValueSerializer<?> serializer)
           
 VariableSerializers addSerializer(TypedValueSerializer<?> serializer, int index)
          Add type at the given index.
 TypedValueSerializer findSerializerForValue(org.camunda.bpm.engine.variable.value.TypedValue value)
          Same as calling findSerializerForValue(TypedValue, VariableSerializerFactory) with no fallback serializer factory.
 TypedValueSerializer findSerializerForValue(org.camunda.bpm.engine.variable.value.TypedValue value, VariableSerializerFactory fallBackSerializerFactory)
          Selects the TypedValueSerializer which should be used for persisting a VariableValue.
 TypedValueSerializer<?> getSerializerByName(String serializerName)
           
 int getSerializerIndex(TypedValueSerializer<?> serializer)
           
 int getSerializerIndexByName(String serializerName)
           
 List<TypedValueSerializer<?>> getSerializers()
          Returns the serializers as a list in the order of their indices.
 VariableSerializers join(VariableSerializers other)
          Merges two VariableSerializers instances into one.
 VariableSerializers removeSerializer(TypedValueSerializer<?> serializer)
           
 

Method Detail

findSerializerForValue

TypedValueSerializer findSerializerForValue(org.camunda.bpm.engine.variable.value.TypedValue value,
                                            VariableSerializerFactory fallBackSerializerFactory)
Selects the TypedValueSerializer which should be used for persisting a VariableValue.

Parameters:
value - the value to persist
fallBackSerializerFactory - a factory to build a fallback serializer in case no suiting serializer can be determined. If this factory is not able to build serializer either, an exception is thrown. May be null
Returns:
the VariableValueserializer selected for persisting the value or 'null' in case no serializer can be found

findSerializerForValue

TypedValueSerializer findSerializerForValue(org.camunda.bpm.engine.variable.value.TypedValue value)
Same as calling findSerializerForValue(TypedValue, VariableSerializerFactory) with no fallback serializer factory.


getSerializerByName

TypedValueSerializer<?> getSerializerByName(String serializerName)
Returns:
the serializer for the given serializerName name. Returns null if no type was found with the name.

addSerializer

VariableSerializers addSerializer(TypedValueSerializer<?> serializer)

addSerializer

VariableSerializers addSerializer(TypedValueSerializer<?> serializer,
                                  int index)
Add type at the given index. The index is used when finding a serializer for a VariableValue. When different serializers can store a specific variable value, the one with the smallest index will be used.


removeSerializer

VariableSerializers removeSerializer(TypedValueSerializer<?> serializer)

getSerializerIndex

int getSerializerIndex(TypedValueSerializer<?> serializer)

getSerializerIndexByName

int getSerializerIndexByName(String serializerName)

join

VariableSerializers join(VariableSerializers other)
Merges two VariableSerializers instances into one. Implementations may apply different merging strategies.


getSerializers

List<TypedValueSerializer<?>> getSerializers()
Returns the serializers as a list in the order of their indices.



Copyright © 2018 camunda services GmbH. All rights reserved.