Class DefaultVariableSerializers
java.lang.Object
org.camunda.bpm.engine.impl.variable.serializer.DefaultVariableSerializers
- All Implemented Interfaces:
- Serializable,- VariableSerializers
- Author:
- Tom Baeyens, Daniel Meyer
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected List<TypedValueSerializer<?>>protected Map<String,TypedValueSerializer<?>> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionaddSerializer(TypedValueSerializer<?> serializer) addSerializer(TypedValueSerializer<?> serializer, int index) Add type at the given index.findSerializerForValue(TypedValue value) Same as callingVariableSerializers.findSerializerForValue(TypedValue, VariableSerializerFactory)with no fallback serializer factory.findSerializerForValue(TypedValue value, VariableSerializerFactory fallBackSerializerFactory) Selects theTypedValueSerializerwhich should be used for persisting a VariableValue.getSerializerByName(String serializerName) intgetSerializerIndex(TypedValueSerializer<?> serializer) intgetSerializerIndexByName(String serializerName) Returns the serializers as a list in the order of their indices.join(VariableSerializers other) Merges twoVariableSerializersinstances into one.removeSerializer(TypedValueSerializer<?> serializer) voidsetSerializerList(List<TypedValueSerializer<?>> serializerList) 
- 
Field Details- 
serializerList
- 
serializerMap
 
- 
- 
Constructor Details- 
DefaultVariableSerializerspublic DefaultVariableSerializers()
- 
DefaultVariableSerializers
 
- 
- 
Method Details- 
getSerializerByName- Specified by:
- getSerializerByNamein interface- VariableSerializers
- Returns:
- the serializer for the given serializerName name. Returns null if no type was found with the name.
 
- 
findSerializerForValuepublic TypedValueSerializer<?> findSerializerForValue(TypedValue value, VariableSerializerFactory fallBackSerializerFactory) Description copied from interface:VariableSerializersSelects theTypedValueSerializerwhich should be used for persisting a VariableValue.- Specified by:
- findSerializerForValuein interface- VariableSerializers
- 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
 
- 
findSerializerForValueDescription copied from interface:VariableSerializersSame as callingVariableSerializers.findSerializerForValue(TypedValue, VariableSerializerFactory)with no fallback serializer factory.- Specified by:
- findSerializerForValuein interface- VariableSerializers
 
- 
addSerializer- Specified by:
- addSerializerin interface- VariableSerializers
 
- 
addSerializerDescription copied from interface:VariableSerializersAdd 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.- Specified by:
- addSerializerin interface- VariableSerializers
 
- 
setSerializerList
- 
getSerializerIndex- Specified by:
- getSerializerIndexin interface- VariableSerializers
 
- 
getSerializerIndexByName- Specified by:
- getSerializerIndexByNamein interface- VariableSerializers
 
- 
removeSerializer- Specified by:
- removeSerializerin interface- VariableSerializers
 
- 
joinDescription copied from interface:VariableSerializersMerges twoVariableSerializersinstances into one. Implementations may apply different merging strategies.- Specified by:
- joinin interface- VariableSerializers
 
- 
getSerializersDescription copied from interface:VariableSerializersReturns the serializers as a list in the order of their indices.- Specified by:
- getSerializersin interface- VariableSerializers
 
 
-