AttributeEditor

abstract class AttributeEditor(clock: Clock)

Interface used for modifying attributes.

Constructors

Link copied to clipboard
protected constructor(clock: Clock)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun apply()

Apply the attribute changes.

Link copied to clipboard
fun removeAttribute(@Size(min = 1) attribute: String): AttributeEditor

Removes an attribute.

fun removeAttribute(@Size(min = 1) attribute: String, @Size(min = 1) instanceId: String): AttributeEditor

Removes a JSON attribute for the given instance.

Link copied to clipboard
fun setAttribute(@Size(min = 1) attribute: String, date: Date): AttributeEditor

Sets a date attribute.

fun setAttribute(@Size(min = 1) attribute: String, number: Double): AttributeEditor

Sets a double number attribute.

fun setAttribute(@Size(min = 1) attribute: String, number: Float): AttributeEditor

Sets a float number attribute.

fun setAttribute(@Size(min = 1) attribute: String, number: Int): AttributeEditor

Sets an integer number attribute.

fun setAttribute(@Size(min = 1) attribute: String, number: Long): AttributeEditor

Sets a long number attribute.

fun setAttribute(@Size(min = 1) attribute: String, @Size(min = 1, max = 1024) string: String): AttributeEditor

Sets a string attribute.

fun setAttribute(@Size(min = 1) attribute: String, @Size(min = 1) instanceId: String, expiration: Date? = null, json: JsonMap): AttributeEditor

Sets a custom attribute with a JSON payload and optional expiration.