org.camunda.bpm.engine.impl.variable.serializer
Class DefaultVariableSerializers
java.lang.Object
org.camunda.bpm.engine.impl.variable.serializer.DefaultVariableSerializers
- All Implemented Interfaces:
- Serializable, VariableSerializers
public class DefaultVariableSerializers
- extends Object
- implements Serializable, VariableSerializers
- Author:
- Tom Baeyens, Daniel Meyer
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serializerList
protected List<TypedValueSerializer<?>> serializerList
serializerMap
protected Map<String,TypedValueSerializer<?>> serializerMap
DefaultVariableSerializers
public DefaultVariableSerializers()
DefaultVariableSerializers
public DefaultVariableSerializers(DefaultVariableSerializers serializers)
getSerializerByName
public TypedValueSerializer<?> getSerializerByName(String serializerName)
- Specified by:
getSerializerByName in interface VariableSerializers
- Returns:
- the serializer for the given serializerName name.
Returns null if no type was found with the name.
findSerializerForValue
public TypedValueSerializer<?> findSerializerForValue(org.camunda.bpm.engine.variable.value.TypedValue value,
VariableSerializerFactory fallBackSerializerFactory)
- Description copied from interface:
VariableSerializers
- Selects the
TypedValueSerializer which should be used for persisting a VariableValue.
- Specified by:
findSerializerForValue in interface VariableSerializers
- Parameters:
value - the value to persistfallBackSerializerFactory - 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
public TypedValueSerializer<?> findSerializerForValue(org.camunda.bpm.engine.variable.value.TypedValue value)
- Description copied from interface:
VariableSerializers
- Same as calling
VariableSerializers.findSerializerForValue(TypedValue, VariableSerializerFactory)
with no fallback serializer factory.
- Specified by:
findSerializerForValue in interface VariableSerializers
addSerializer
public DefaultVariableSerializers addSerializer(TypedValueSerializer<?> serializer)
- Specified by:
addSerializer in interface VariableSerializers
addSerializer
public DefaultVariableSerializers addSerializer(TypedValueSerializer<?> serializer,
int index)
- Description copied from interface:
VariableSerializers
- 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.
- Specified by:
addSerializer in interface VariableSerializers
setSerializerList
public void setSerializerList(List<TypedValueSerializer<?>> serializerList)
getSerializerIndex
public int getSerializerIndex(TypedValueSerializer<?> serializer)
- Specified by:
getSerializerIndex in interface VariableSerializers
getSerializerIndexByName
public int getSerializerIndexByName(String serializerName)
- Specified by:
getSerializerIndexByName in interface VariableSerializers
removeSerializer
public VariableSerializers removeSerializer(TypedValueSerializer<?> serializer)
- Specified by:
removeSerializer in interface VariableSerializers
join
public VariableSerializers join(VariableSerializers other)
- Description copied from interface:
VariableSerializers
- Merges two
VariableSerializers instances into one. Implementations may apply
different merging strategies.
- Specified by:
join in interface VariableSerializers
getSerializers
public List<TypedValueSerializer<?>> getSerializers()
- Description copied from interface:
VariableSerializers
- Returns the serializers as a list in the order of their indices.
- Specified by:
getSerializers in interface VariableSerializers
Copyright © 2016 camunda services GmbH. All rights reserved.