Interface IPluginFieldHandler<T>

interface IPluginFieldHandler {
    getData(): string;
    getFieldType(): string;
    getValueAsync(): Promise<T>;
    initData(serializedFieldData): any;
    setData(value, doValidation?): any;
    setValue(T): void;
}

Type Parameters

  • T

Hierarchy

  • IFieldHandler
    • IPluginFieldHandler

Methods

  • getData() returns a string representing the data in the database. It may be a JSON object, in which case use JSON.parse() to manipulate it. It may also be undefined, which means the field was never set in the database.

    Returns string

  • Returns the type of field this handler is for.

    Returns string

  • Initializes the field handler with the raw string data, or undefined if there is not yet any representation in the db.

    Parameters

    • serializedFieldData: string

    Returns any

  • setData() sets the raw data of the field, which is always a string. More specific methods along with validation can be offered by the field handler implementation class.

    Parameters

    • value: string
    • Optional doValidation: boolean

      If not specified, the default is false (no validation)

    Returns any

Generated using TypeDoc