Class SpinValueImpl
- java.lang.Object
-
- org.camunda.bpm.engine.variable.impl.value.AbstractTypedValue<org.camunda.spin.Spin<?>>
-
- org.camunda.spin.plugin.variable.value.impl.SpinValueImpl
-
- All Implemented Interfaces:
java.io.Serializable
,SerializableValue
,TypedValue
,SpinValue
- Direct Known Subclasses:
JsonValueImpl
,XmlValueImpl
public abstract class SpinValueImpl extends AbstractTypedValue<org.camunda.spin.Spin<?>> implements SpinValue
- Author:
- Roman Smirnov
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
dataFormatName
protected boolean
isDeserialized
protected java.lang.String
serializedValue
-
Fields inherited from class org.camunda.bpm.engine.variable.impl.value.AbstractTypedValue
isTransient, type, value
-
-
Constructor Summary
Constructors Constructor Description SpinValueImpl(org.camunda.spin.Spin<?> value, java.lang.String serializedValue, java.lang.String dataFormatName, boolean isDeserialized, ValueType type, boolean isTransient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.camunda.spin.spi.DataFormat<? extends org.camunda.spin.Spin<?>>
getDataFormat()
java.lang.String
getSerializationDataFormat()
The serialization format used to serialize this value.SpinValueType
getType()
The type of the value.org.camunda.spin.Spin<?>
getValue()
The actual value.java.lang.String
getValueSerialized()
Returns the serialized value.boolean
isDeserialized()
Returns true in case the value is deserialized.void
setSerializationDataFormat(java.lang.String serializationDataFormat)
void
setValueSerialized(java.lang.String serializedValue)
-
Methods inherited from class org.camunda.bpm.engine.variable.impl.value.AbstractTypedValue
isTransient, setTransient, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.camunda.bpm.engine.variable.value.TypedValue
isTransient
-
-
-
-
Constructor Detail
-
SpinValueImpl
public SpinValueImpl(org.camunda.spin.Spin<?> value, java.lang.String serializedValue, java.lang.String dataFormatName, boolean isDeserialized, ValueType type, boolean isTransient)
-
-
Method Detail
-
getValue
public org.camunda.spin.Spin<?> getValue()
Description copied from interface:TypedValue
The actual value. May be null in case the value is null.- Specified by:
getValue
in interfaceSerializableValue
- Specified by:
getValue
in interfaceSpinValue
- Specified by:
getValue
in interfaceTypedValue
- Overrides:
getValue
in classAbstractTypedValue<org.camunda.spin.Spin<?>>
- Returns:
- the value
-
getType
public SpinValueType getType()
Description copied from interface:TypedValue
The type of the value. See ValueType for a list of built-in ValueTypes.- Specified by:
getType
in interfaceSerializableValue
- Specified by:
getType
in interfaceTypedValue
- Overrides:
getType
in classAbstractTypedValue<org.camunda.spin.Spin<?>>
- Returns:
- the type of the value.
-
isDeserialized
public boolean isDeserialized()
Description copied from interface:SerializableValue
Returns true in case the value is deserialized. If this method returns true, it is safe to call theSerializableValue.getValue()
method- Specified by:
isDeserialized
in interfaceSerializableValue
- Returns:
- true if the object is deserialized.
-
getValueSerialized
public java.lang.String getValueSerialized()
Description copied from interface:SerializableValue
Returns the serialized value. In case the serializaton data format (as returned bySerializableValue.getSerializationDataFormat()
) is not text based, a base 64 encoded representation of the value is returned The serialized value is a snapshot of the state of the value as it is serialized to the process engine database.- Specified by:
getValueSerialized
in interfaceSerializableValue
-
setValueSerialized
public void setValueSerialized(java.lang.String serializedValue)
-
getSerializationDataFormat
public java.lang.String getSerializationDataFormat()
Description copied from interface:SerializableValue
The serialization format used to serialize this value.- Specified by:
getSerializationDataFormat
in interfaceSerializableValue
- Returns:
- the serialization format used to serialize this variable.
-
setSerializationDataFormat
public void setSerializationDataFormat(java.lang.String serializationDataFormat)
-
getDataFormat
public org.camunda.spin.spi.DataFormat<? extends org.camunda.spin.Spin<?>> getDataFormat()
- Specified by:
getDataFormat
in interfaceSpinValue
-
-