Package org.camunda.spin.plugin.impl
Class SpinValueSerializer
- java.lang.Object
- 
- org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializer<T>
- 
- org.camunda.bpm.engine.impl.variable.serializer.AbstractSerializableValueSerializer<SpinValue>
- 
- org.camunda.spin.plugin.impl.SpinValueSerializer
 
 
 
- 
- All Implemented Interfaces:
- TypedValueSerializer<SpinValue>
 - Direct Known Subclasses:
- JsonValueSerializer,- XmlValueSerializer
 
 public abstract class SpinValueSerializer extends AbstractSerializableValueSerializer<SpinValue> - Author:
- Roman Smirnov
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected org.camunda.spin.spi.DataFormat<?>dataFormatprotected java.lang.Stringname- 
Fields inherited from class org.camunda.bpm.engine.impl.variable.serializer.AbstractSerializableValueSerializerserializationDataFormat
 - 
Fields inherited from class org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializerBINARY_VALUE_TYPES, valueType
 
- 
 - 
Constructor SummaryConstructors Constructor Description SpinValueSerializer(SerializableValueType type, org.camunda.spin.spi.DataFormat<?> dataFormat, java.lang.String name)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanSerializeValue(java.lang.Object value)return true if this serializer is able to serialize the provided object.protected java.lang.ObjectdeserializeFromByteArray(byte[] object, ValueFields valueFields)Deserialize the object from a byte array.java.lang.StringgetName()The name of this serializer.protected booleanisSerializationTextBased()Return true if the serialization is text based.protected byte[]serializeToByteArray(java.lang.Object deserializedObject)Implementations must return a byte[] representation of the provided object.protected voidupdateTypedValue(SpinValue value, java.lang.String serializedStringValue)protected voidwriteToValueFields(SpinValue value, ValueFields valueFields, byte[] serializedValue)- 
Methods inherited from class org.camunda.bpm.engine.impl.variable.serializer.AbstractSerializableValueSerializercanWriteValue, createDeserializedValue, createSerializedValue, getSerializationDataformat, getSerializedBytesValue, getSerializedStringValue, readSerializedValueFromFields, readValue, writeValue
 - 
Methods inherited from class org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializercanHandle, getType, isMutableValue
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.camunda.bpm.engine.impl.variable.serializer.TypedValueSerializerconvertToTypedValue
 
- 
 
- 
- 
- 
Constructor Detail- 
SpinValueSerializerpublic SpinValueSerializer(SerializableValueType type, org.camunda.spin.spi.DataFormat<?> dataFormat, java.lang.String name) 
 
- 
 - 
Method Detail- 
getNamepublic java.lang.String 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.
 
 - 
writeToValueFieldsprotected void writeToValueFields(SpinValue value, ValueFields valueFields, byte[] serializedValue) - Specified by:
- writeToValueFieldsin class- AbstractSerializableValueSerializer<SpinValue>
 
 - 
updateTypedValueprotected void updateTypedValue(SpinValue value, java.lang.String serializedStringValue) - Specified by:
- updateTypedValuein class- AbstractSerializableValueSerializer<SpinValue>
 
 - 
canSerializeValueprotected boolean canSerializeValue(java.lang.Object value) Description copied from class:AbstractSerializableValueSerializerreturn true if this serializer is able to serialize the provided object.- Specified by:
- canSerializeValuein class- AbstractSerializableValueSerializer<SpinValue>
- Parameters:
- value- the object to test (guaranteed to be a non-null value)
- Returns:
- true if the serializer can handle the object.
 
 - 
serializeToByteArrayprotected byte[] serializeToByteArray(java.lang.Object deserializedObject) throws java.lang.ExceptionDescription copied from class:AbstractSerializableValueSerializerImplementations must return a byte[] representation of the provided object. The object is guaranteed not to be null.- Specified by:
- serializeToByteArrayin class- AbstractSerializableValueSerializer<SpinValue>
- Parameters:
- deserializedObject- the object to serialize
- Returns:
- the byte array value of the object
- Throws:
- java.lang.Exception
 
 - 
deserializeFromByteArrayprotected java.lang.Object deserializeFromByteArray(byte[] object, ValueFields valueFields) throws java.lang.ExceptionDescription copied from class:AbstractSerializableValueSerializerDeserialize the object from a byte array.- Specified by:
- deserializeFromByteArrayin class- AbstractSerializableValueSerializer<SpinValue>
- Parameters:
- object- the object to deserialize
- valueFields- the value fields
- Returns:
- the deserialized object
- Throws:
- java.lang.Exception
 
 - 
isSerializationTextBasedprotected boolean isSerializationTextBased() Description copied from class:AbstractSerializableValueSerializerReturn true if the serialization is text based. Return false otherwise- Specified by:
- isSerializationTextBasedin class- AbstractSerializableValueSerializer<SpinValue>
 
 
- 
 
-