AbstractProtectCallback

Abstract Protect Callback that provides the raw content of the Callback, and common methods for sub classes to access.

Constructors

Link copied to clipboard
constructor(jsonObject: JSONObject, index: Int)

Constructor for AbstractProtectCallback. Capable of parsing the MetadataCallback used for Protect.

constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
protected var _id: Int
Link copied to clipboard
protected var content: String
Link copied to clipboard
protected var derivedCallback: Boolean

Indicates if this callback is derived from a MetadataCallback

Link copied to clipboard
private lateinit var node: Node

The Node that associate with this Callback

Functions

Link copied to clipboard
open override fun get_id(): Int

Return the unique id for this callback. The id only available with Callback that using PageCallback

Link copied to clipboard
open override fun getContent(): String

Return the raw content of the Callback.

Link copied to clipboard
protected open fun getContentAsJson(): JSONObject
Link copied to clipboard
private open fun getInput(content: JSONObject, index: Int): JSONObject
Link copied to clipboard
open fun getInputValue(): Any

Get the first value for input

open fun getInputValue(index: Int): Any

Get the value for input

Link copied to clipboard
protected open fun getName(jsonObject: JSONObject): String
Link copied to clipboard
protected fun getNode(): Node

Get the Node that associate with this Callback

Link copied to clipboard
abstract fun getType(): String

Return the type of the Callback, the type name should align with the Callback type returned from AM

Link copied to clipboard
protected abstract fun setAttribute(name: String, value: Any)
Link copied to clipboard
fun setClientError(value: String, index: Int = 0)

Input the Client Error to the server

Link copied to clipboard

Set the client error to the HiddenValueCallback which associated with the Protect Callback.

Link copied to clipboard
protected open fun setContent(jsonObject: JSONObject)

Sets the value of the Callback

Link copied to clipboard
open override fun setNode(node: Node)

Inject the Node object

Link copied to clipboard
protected open fun setValue(value: Any)

Set the first value for input

protected open fun setValue(value: Any, index: Int)

Set the value for the input.