Class ApiKeysDialog extends ModalBaseDialog

This class is the ApiKeys dialog

Source : file dialogs/apiKeysDialog/ApiKeysDialog.js at line 37

Constructor

new ApiKeysDialog ( apiKeys, haveApiKeysFile )

The constructor

Source : file dialogs/apiKeysDialog/ApiKeysDialog.js at line 73

Parameters

Name Type Description
apiKeys Array of ApiKey

An array with the existing ApiKeys

haveApiKeysFile Boolean

A boolean indicating when a ApiKey file was found on the server

Public getters and setters

readonly get apiKeysJSON : String

Get a JSON string with the ApiKeys in the control

Source : file dialogs/apiKeysDialog/ApiKeysDialog.js at line 197

readonly get contentHTMLElements : Array of HTMLElement

An array with the HTMLElements that have to be added in the content of the dialog.

Source : file dialogs/apiKeysDialog/ApiKeysDialog.js at line 188

readonly get title : String

The dialog title. Overload of the BaseDialog.title property

Source : file dialogs/apiKeysDialog/ApiKeysDialog.js at line 171

readonly get toolbarHTMLElement : HTMLElement

An HTMLElement that have to be added as toolbar for the dialog. Overload of the BaseDialog.toolbarHTMLElement property

Source : file dialogs/apiKeysDialog/ApiKeysDialog.js at line 179

Public methods

addApiKeys ( apiKeys )

Add an array of ApiKeys to the dialog.

Source : file dialogs/apiKeysDialog/ApiKeysDialog.js at line 204

Parameters

Name Type Description
apiKeys Array of ApiKey

An array with the ApiKeys to add

canClose ( )

Overload of the BaseDialog.canClose ( ) method.

Source : file dialogs/apiKeysDialog/ApiKeysDialog.js at line 143

Returns

True when all the ApiKeys have a name and a value and there are no duplicate keys name
Type : Boolean

createContentHTML ( )

Create all the controls needed for the dialog. Overload of the base class createContentHTML

Source : file dialogs/apiKeysDialog/ApiKeysDialog.js at line 84

onCancel ( )

Overload of the BaseDialog.onCancel ( ) method. Called when the cancel button is clicked

Source : file dialogs/apiKeysDialog/ApiKeysDialog.js at line 151

onOk ( )

Overload of the BaseDialog.onOk ( ) method. Called when the Ok button is clicked

Source : file dialogs/apiKeysDialog/ApiKeysDialog.js at line 160

show ( )

Overload of the BaseDialog.show ( ) method.

Source : file dialogs/apiKeysDialog/ApiKeysDialog.js at line 129

validateApiKeys ( )

Validate the ApiKeys. Each ApiKey must have a not empty name and a not empty key. Duplicate ApiKey names are not allowed

Source : file dialogs/apiKeysDialog/ApiKeysDialog.js at line 107

Returns

True when all the keys are valid and not duplicated
Type : Boolean

Private properties

#apiKeys : Array of ApiKey

An array with the existing ApiKeys

Source : file dialogs/apiKeysDialog/ApiKeysDialog.js at line 58

#apiKeysControl : HTMLElement

A div that contains the ApiKeysControl

Source : file dialogs/apiKeysDialog/ApiKeysDialog.js at line 51

#haveApiKeysFile : Boolean

A boolean indicating when a ApiKey file was found on the server

Source : file dialogs/apiKeysDialog/ApiKeysDialog.js at line 65

#toolbar : ApiKeysDialogToolbar

The dialog toolbar

Source : file dialogs/apiKeysDialog/ApiKeysDialog.js at line 44

Private methods

#destructor ( )

Remove all events listeners on the toolbar and controls, so all references to the dialog are released.

Source : file dialogs/apiKeysDialog/ApiKeysDialog.js at line 95