Document

interface Document : Mappable

Top-level Joyfill document model.

Aggregates files, fields, and formulas with core metadata and supports map/JSON conversion via Mappable.

Properties

Link copied to clipboard
abstract val createdOn: Long

Creation timestamp (epoch millis)

Link copied to clipboard
abstract val deleted: Boolean

Soft-delete flag

Link copied to clipboard
abstract val fields: MutableList<Field>

Interactive/presentational fields contained in the document

Link copied to clipboard
abstract val files: MutableList<File>

Attached files associated with this document

Link copied to clipboard

Global formula definitions evaluated in this document

Link copied to clipboard
abstract var id: String

Stable document identifier

Link copied to clipboard
abstract var identifier: String

Human-facing identifier

Link copied to clipboard
abstract var name: String

Human-readable name

Link copied to clipboard
abstract var stage: Stage?

Optional lifecycle stage

Link copied to clipboard
abstract val type: String

Discriminator for document kind

Functions

Link copied to clipboard
abstract fun copy(): Document

Creates a shallow copy of this document.

Link copied to clipboard
abstract fun <R> get(key: String): R

Gets a field/property identified by key cast to R.

Link copied to clipboard
abstract fun set(key: String, value: Any?)

Sets a field/property identified by key to value.

Link copied to clipboard
abstract fun toJsonObject(): JsonObject

Serializes this instance to a structured JsonObject.

Link copied to clipboard
abstract fun toJsonString(): String

Serializes this instance to a compact JSON string.

Link copied to clipboard
abstract fun toMap(): MutableMap<String, Any?>

Converts this instance into a mutable key-value map suitable for mutation and re-serialization.

Link copied to clipboard

Validates this Document against the Joyfill JSON schema.