Interface TypedValueSerializer<T extends org.camunda.bpm.engine.variable.value.TypedValue>

    • Method Detail

      • getName

        String getName()
        The name of this serializer. The name is used when persisting the ValueFields populated by this serializer.
        Returns:
        the name of this serializer.
      • getType

        org.camunda.bpm.engine.variable.type.ValueType getType()
        The VariableType supported
        Returns:
        the VariableType supported
      • writeValue

        void writeValue​(T value,
                        ValueFields valueFields)
        Serialize a TypedValue to the ValueFields.
        Parameters:
        value - the TypedValue to persist
        valueFields - the ValueFields to which the value should be persisted
      • readValue

        T readValue​(ValueFields valueFields,
                    boolean deserializeValue,
                    boolean isTransient)
        Retrieve a TypedValue from the provided ValueFields.
        Parameters:
        valueFields - the ValueFields to retrieve the value from
        deserializeValue - indicates whether a SerializableValue should be deserialized.
        Returns:
        the TypedValue
      • canHandle

        boolean canHandle​(org.camunda.bpm.engine.variable.value.TypedValue value)
        Used for auto-detecting the value type of a variable. An implementation must return true if it is able to write values of the provided type.
        Parameters:
        value - the value
        Returns:
        true if this TypedValueSerializer is able to handle the provided value
      • convertToTypedValue

        T convertToTypedValue​(org.camunda.bpm.engine.variable.impl.value.UntypedValueImpl untypedValue)
        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 canHandle(TypedValue)).
        Parameters:
        untypedValue - the untyped value
        Returns:
        the corresponding typed value
      • getSerializationDataformat

        String getSerializationDataformat()
        Returns:
        the dataformat used by the serializer or null if this is not an object serializer
      • isMutableValue

        boolean isMutableValue​(T typedValue)
        Returns:
        whether values serialized by this serializer can be mutable and should be re-serialized if changed