Skip to main content

Class: DialogManagerClientController

DialogManagerClient.DialogManagerClientController

Constructors

constructor

new DialogManagerClientController()

Properties

DialogStore

DialogStore: null | StoreModel = null

A global store used to track which windows are registered as dialogs and their state. Dialogs are put in the "available" pool when they are available for use. They are put in the "open" pool when they are in use.


RESPONDER_CHANNEL

RESPONDER_CHANNEL: null | string = null

Contains a unique channel name that a dialog can use to communicate back to its originating window. The channel is created by the originating window as a query responder.


finsembleWindow

finsembleWindow: null | FinsembleWindow = null

Same as FEAGlobals.finsembleWindow


initialized

initialized: boolean = false


isDialog

isDialog: boolean = false

Will be set to true if the current window is a dialog


openerMessage

openerMessage: null | ResponderMessage<any, any> = null

Used to send a message back to whoever opened this dialog


spawnData

spawnData: any = {}

Will be set with the spawn data, which contains the input params and responseChannel


userInputTimeout

userInputTimeout: null | number = null

Can be used to set a specific timeout

Methods

checkIfWindowIsDialog

checkIfWindowIsDialog(cb?): Promise<void>

Checks to see whether the window is a dialog, setting this.isDialog to true or false

Parameters

NameTypeDescription
cb?(err?: StandardError) => voidThe callback to be invoked after the method completes successfully.

Returns

Promise<void>


createStore

createStore(cb?): Promise<void>

Creates the global store if it doesn't exist.

Parameters

NameType
cb?() => void

Returns

Promise<void>


getAvailableDialog

getAvailableDialog(type, cb?): Promise<null | WindowIdentifier>

Parameters

NameType
typestring
cb?(dialog: null | WindowIdentifier) => void

Returns

Promise<null | WindowIdentifier>


getFinsembleWindow

getFinsembleWindow(cb?): Promise<void>

Parameters

NameType
cb?() => void

Returns

Promise<void>


initializeOnce

initializeOnce(): Promise<void>

Establishes a connection to the distributed store that is used by all dialogs. This function may be called many times but will only initialize one time.

Returns

Promise<void>


moveDialogFromAvailableToOpened

moveDialogFromAvailableToOpened(identifier): Promise<null | string>

State management - just moves an available dialog out of the "available" pool.

Parameters

NameTypeDescription
identifierWindowIdentifierwindow identifier of the dialog.

Returns

Promise<null | string>


moveDialogFromOpenedToAvailable

moveDialogFromOpenedToAvailable(identifier): Promise<null | string>

State management - just moves an opened dialog back to the "available" pool.

Parameters

NameTypeDescription
identifierWindowIdentifierwindow identifier of the dialog.

Returns

Promise<null | string>


registerWithStore

registerWithStore(cb?): Promise<void>

Registers the window as a dialog with the global store. If the component is incapable of being used as a dialog (this is set in the component's config), the callback is immediately invoked.

Note: This method checks whether the calling window is a dialog.

Parameters

NameType
cb?() => void

Returns

Promise<void>