Interface MutableAttributes

All Superinterfaces:
Attributes
All Known Implementing Classes:
EmptyAttributes

public interface MutableAttributes extends Attributes
Provides mutable access to workflow attributes. MutableAttributes extends the base Attributes interface to add methods for setting, updating, and removing attribute values. This interface is used for building and modifying workflow data during execution.
Since:
1.0
See Also:
  • Method Details

    • setBoolean

      void setBoolean(String key, boolean value)
      Sets a boolean attribute value.
      Parameters:
      key - the attribute key
      value - the boolean value to set
    • withBoolean

      MutableAttributes withBoolean(String key, boolean value)
      Creates a new MutableAttributes instance with the specified boolean value.
      Parameters:
      key - the attribute key
      value - the boolean value to set
      Returns:
      a new MutableAttributes instance with the boolean value
    • setData

      void setData(String key, byte[] value)
      Sets a binary data attribute value.
      Parameters:
      key - the attribute key
      value - the byte array value to set
    • withData

      MutableAttributes withData(String key, byte[] value)
      Creates a new MutableAttributes instance with the specified binary data value.
      Parameters:
      key - the attribute key
      value - the byte array value to set
      Returns:
      a new MutableAttributes instance with the binary data value
    • setInstant

      void setInstant(String key, Instant value)
      Sets an Instant attribute value.
      Parameters:
      key - the attribute key
      value - the Instant value to set
    • withInstant

      MutableAttributes withInstant(String key, Instant value)
      Creates a new MutableAttributes instance with the specified Instant value.
      Parameters:
      key - the attribute key
      value - the Instant value to set
      Returns:
      a new MutableAttributes instance with the Instant value
    • setDouble

      void setDouble(String key, double value)
      Sets a double attribute value.
      Parameters:
      key - the attribute key
      value - the double value to set
    • withDouble

      MutableAttributes withDouble(String key, double value)
      Creates a new MutableAttributes instance with the specified double value.
      Parameters:
      key - the attribute key
      value - the double value to set
      Returns:
      a new MutableAttributes instance with the double value
    • setInt

      void setInt(String key, int value)
      Sets an integer attribute value.
      Parameters:
      key - the attribute key
      value - the integer value to set
    • withInt

      MutableAttributes withInt(String key, int value)
      Creates a new MutableAttributes instance with the specified integer value.
      Parameters:
      key - the attribute key
      value - the integer value to set
      Returns:
      a new MutableAttributes instance with the integer value
    • setLong

      void setLong(String key, long value)
      Sets a long attribute value.
      Parameters:
      key - the attribute key
      value - the long value to set
    • withLong

      MutableAttributes withLong(String key, long value)
      Creates a new MutableAttributes instance with the specified long value.
      Parameters:
      key - the attribute key
      value - the long value to set
      Returns:
      a new MutableAttributes instance with the long value
    • setObject

      void setObject(String key, Object value)
      Sets an object attribute value.
      Parameters:
      key - the attribute key
      value - the object value to set
    • withObject

      MutableAttributes withObject(String key, Object value)
      Creates a new MutableAttributes instance with the specified object value.
      Parameters:
      key - the attribute key
      value - the object value to set
      Returns:
      a new MutableAttributes instance with the object value
    • setString

      void setString(String key, String value)
      Sets a string attribute value.
      Parameters:
      key - the attribute key
      value - the string value to set
    • withString

      MutableAttributes withString(String key, String value)
      Creates a new MutableAttributes instance with the specified string value.
      Parameters:
      key - the attribute key
      value - the string value to set
      Returns:
      a new MutableAttributes instance with the string value
    • setAttributes

      void setAttributes(MutableAttributes other)
      Sets all attributes from another MutableAttributes instance.
      Parameters:
      other - the other MutableAttributes instance to copy from
    • withAttributes

      MutableAttributes withAttributes(MutableAttributes other)
      Creates a new MutableAttributes instance with all attributes from another instance.
      Parameters:
      other - the other MutableAttributes instance to copy from
      Returns:
      a new MutableAttributes instance with all attributes from the other instance
    • remove

      void remove(String key)
      Removes the attribute with the specified key.
      Parameters:
      key - the key of the attribute to remove
    • remove

      void remove()
      Removes all attributes from this instance.
    • toImmutable

      Attributes toImmutable()
      Converts this MutableAttributes instance to an ImmutableAttributes instance. This is useful for passing attributes to workflow operations that require immutable data.
      Returns:
      an ImmutableAttributes instance containing all attributes from this instance