FormFieldValue

sealed class FormFieldValue

Strongly-typed value for a single FormField. The variant must match the descriptor's variant (e.g. a FormField.Number(Integer) is answered with Integer). A null value leaves the field unanswered, which only an optional field allows.

Inheritors

Types

Link copied to clipboard
data class Bool(val fieldName: String, val value: Boolean?) : FormFieldValue

Answers FormField.Bool.

Link copied to clipboard
data class Date(val fieldName: String, val value: LocalDate?) : FormFieldValue

Answers FormField.DateTime(Date).

Link copied to clipboard
data class DateTime(val fieldName: String, val value: LocalDateTime?) : FormFieldValue

Answers FormField.DateTime(DateTime): a local date and time, with no time zone. Fractions of a second aren't sent.

Link copied to clipboard
data class Decimal(val fieldName: String, val value: BigDecimal?) : FormFieldValue

Answers FormField.Number(Decimal).

Link copied to clipboard
data class File(val fieldName: String, val file: UploadFile?) : FormFieldValue

Answers FormField.File of either Image or Pdf subtype.

Link copied to clipboard
data class Integer(val fieldName: String, val value: Long?) : FormFieldValue

Answers FormField.Number(Integer).

Link copied to clipboard
data class Text(val fieldName: String, val value: String?) : FormFieldValue

Free-form text — answers FormField.Text.

Link copied to clipboard
data class Time(val fieldName: String, val value: LocalTime?) : FormFieldValue

Answers FormField.DateTime(Time). Fractions of a second aren't sent.

Properties

Link copied to clipboard
abstract val fieldName: String

FormField.name of the field this answers.