Class AbstractObjectValueSerializer

    • Constructor Detail

      • AbstractObjectValueSerializer

        public AbstractObjectValueSerializer​(String serializationDataFormat)
    • Method Detail

      • convertToTypedValue

        public org.camunda.bpm.engine.variable.value.ObjectValue convertToTypedValue​(org.camunda.bpm.engine.variable.impl.value.UntypedValueImpl untypedValue)
        Description copied from interface: TypedValueSerializer
        Returns a typed value for the provided untyped value. This is used on cases where the user sets an untyped value which is then detected to be handled by this TypedValueSerializer (by invocation of TypedValueSerializer.canHandle(TypedValue)).
        Parameters:
        untypedValue - the untyped value
        Returns:
        the corresponding typed value
      • getObjectTypeName

        protected String getObjectTypeName​(org.camunda.bpm.engine.variable.value.ObjectValue value,
                                           ValueFields valueFields)
      • readObjectNameFromFields

        protected String readObjectNameFromFields​(ValueFields valueFields)
      • isMutableValue

        public boolean isMutableValue​(org.camunda.bpm.engine.variable.value.ObjectValue typedValue)
        Specified by:
        isMutableValue in interface TypedValueSerializer<org.camunda.bpm.engine.variable.value.ObjectValue>
        Overrides:
        isMutableValue in class AbstractTypedValueSerializer<org.camunda.bpm.engine.variable.value.ObjectValue>
        Returns:
        whether values serialized by this serializer can be mutable and should be re-serialized if changed
      • getTypeNameForDeserialized

        protected abstract String getTypeNameForDeserialized​(Object deserializedObject)
        Returns the type name for the deserialized object.
        Parameters:
        deserializedObject - . Guaranteed not to be null
        Returns:
        the type name fot the object.
      • serializeToByteArray

        protected abstract byte[] serializeToByteArray​(Object deserializedObject)
                                                throws Exception
        Implementations must return a byte[] representation of the provided object. The object is guaranteed not to be null.
        Specified by:
        serializeToByteArray in class AbstractSerializableValueSerializer<org.camunda.bpm.engine.variable.value.ObjectValue>
        Parameters:
        deserializedObject - the object to serialize
        Returns:
        the byte array value of the object
        Throws:
        exception - in case the object cannot be serialized
        Exception
      • deserializeFromByteArray

        protected abstract Object deserializeFromByteArray​(byte[] object,
                                                           String objectTypeName)
                                                    throws Exception
        Deserialize the object from a byte array.
        Parameters:
        object - the object to deserialize
        objectTypeName - the type name of the object to deserialize
        Returns:
        the deserialized object
        Throws:
        exception - in case the object cannot be deserialized
        Exception