Package org.camunda.spin.plugin.impl
Class SpinObjectValueSerializer
java.lang.Object
org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializer<T>
org.camunda.bpm.engine.impl.variable.serializer.AbstractSerializableValueSerializer<ObjectValue>
org.camunda.bpm.engine.impl.variable.serializer.AbstractObjectValueSerializer
org.camunda.spin.plugin.impl.SpinObjectValueSerializer
- All Implemented Interfaces:
 TypedValueSerializer<ObjectValue>
Implementation of a 
TypedValueSerializer for ObjectValues using a
 Spin-provided DataFormat to serialize and deserialize java objects.- Author:
 - Daniel Meyer
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DataFormat<?>protected Stringprotected DeserializationTypeValidatorFields inherited from class org.camunda.bpm.engine.impl.variable.serializer.AbstractSerializableValueSerializer
serializationDataFormatFields inherited from class org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializer
BINARY_VALUE_TYPES, valueType - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanSerializeValue(Object value) return true if this serializer is able to serialize the provided object.protected ObjectdeserializeFromByteArray(byte[] bytes, String objectTypeName) Deserialize the object from a byte array.getName()The name of this serializer.protected StringgetTypeNameForDeserialized(Object deserializedObject) Returns the type name for the deserialized object.protected DeserializationTypeValidatorgetValidator(ProcessEngineConfigurationImpl processEngineConfiguration) protected booleanReturn true if the serialization is text based.protected byte[]serializeToByteArray(Object deserializedObject) Implementations must return a byte[] representation of the provided object.Methods inherited from class org.camunda.bpm.engine.impl.variable.serializer.AbstractObjectValueSerializer
convertToTypedValue, createDeserializedValue, createSerializedValue, deserializeFromByteArray, getObjectTypeName, isMutableValue, readObjectNameFromFields, updateTypedValue, writeToValueFieldsMethods inherited from class org.camunda.bpm.engine.impl.variable.serializer.AbstractSerializableValueSerializer
canWriteValue, getSerializationDataformat, getSerializedBytesValue, getSerializedStringValue, readSerializedValueFromFields, readValue, writeValueMethods inherited from class org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializer
canHandle, getType 
- 
Field Details
- 
name
 - 
dataFormat
 - 
validator
 
 - 
 - 
Constructor Details
- 
SpinObjectValueSerializer
 
 - 
 - 
Method Details
- 
getName
Description copied from interface:TypedValueSerializerThe name of this serializer. The name is used when persisting the ValueFields populated by this serializer.- Returns:
 - the name of this serializer.
 
 - 
isSerializationTextBased
protected boolean isSerializationTextBased()Description copied from class:AbstractObjectValueSerializerReturn true if the serialization is text based. Return false otherwise- Specified by:
 isSerializationTextBasedin classAbstractObjectValueSerializer
 - 
getTypeNameForDeserialized
Description copied from class:AbstractObjectValueSerializerReturns the type name for the deserialized object.- Specified by:
 getTypeNameForDeserializedin classAbstractObjectValueSerializer- Parameters:
 deserializedObject- . Guaranteed not to be null- Returns:
 - the type name fot the object.
 
 - 
serializeToByteArray
Description copied from class:AbstractObjectValueSerializerImplementations must return a byte[] representation of the provided object. The object is guaranteed not to be null.- Specified by:
 serializeToByteArrayin classAbstractObjectValueSerializer- Parameters:
 deserializedObject- the object to serialize- Returns:
 - the byte array value of the object
 - Throws:
 Exception
 - 
deserializeFromByteArray
Description copied from class:AbstractObjectValueSerializerDeserialize the object from a byte array.- Specified by:
 deserializeFromByteArrayin classAbstractObjectValueSerializer- Parameters:
 bytes- the object to deserializeobjectTypeName- the type name of the object to deserialize- Returns:
 - the deserialized object
 - Throws:
 Exception
 - 
canSerializeValue
Description copied from class:AbstractSerializableValueSerializerreturn true if this serializer is able to serialize the provided object.- Specified by:
 canSerializeValuein classAbstractSerializableValueSerializer<ObjectValue>- Parameters:
 value- the object to test (guaranteed to be a non-null value)- Returns:
 - true if the serializer can handle the object.
 
 - 
getValidator
protected DeserializationTypeValidator getValidator(ProcessEngineConfigurationImpl processEngineConfiguration)  
 -