Options
All
  • Public
  • Public/Protected
  • All
Menu

Provides the console related functions.

Hierarchy

  • Console

Index

Constructors

Properties

_conletFunctionRegistry: Map<string, Map<string, (conletId: string, ...args: any) => void>> = ...
_editTemplate: HTMLElement = ...
_isConfigured: boolean = false
_previewTemplate: HTMLElement = ...
_renderer: null | Renderer = null
_resourceManager: default
_sessionInactivityTimeout: number = 0
_sessionRefreshInterval: number = 0
_viewTemplate: HTMLElement = ...
_webSocket: default = ...

Accessors

  • get configured(): boolean
  • get sessionInactivityTimeout(): number
  • get sessionRefreshInterval(): number

Methods

  • _addConletProperties(properties: Map<string, string>, element: HTMLElement): void
  • Parameters

    • properties: Map<string, string>
    • element: HTMLElement

    Returns void

  • _execOnLoad(container: HTMLElement, isUpdate: boolean): void
  • Parameters

    • container: HTMLElement
    • isUpdate: boolean

    Returns void

  • _execOnUnload(element: Element, isUpdate: boolean): void
  • Execute unload functions depth first.

    Parameters

    • element: Element
    • isUpdate: boolean

    Returns void

  • _removeComponents(notifications: Object[], element: HTMLElement): void
  • Parameters

    • notifications: Object[]
    • element: HTMLElement

    Returns void

  • _resolveComponents(): void
  • Called when the console layout is received or when a conlet has been added or updated. Attempts to resolve all unresolved components, i.e. calls {@link Console#addConlet} for the conlets that provide the missing component.

    Returns void

  • _updateComponent(conletType: string, conletId: string, modes: RenderMode[], content: string): void
  • _updatePreview(conletType: string, conletId: string, modes: RenderMode[], content: string, sticky: boolean, foreground: boolean): void
  • Parameters

    • conletType: string
    • conletId: string
    • modes: RenderMode[]
    • content: string
    • sticky: boolean
    • foreground: boolean

    Returns void

  • _updateView(conletType: string, conletId: string, modes: RenderMode[], content: string, foreground: boolean): void
  • Parameters

    • conletType: string
    • conletId: string
    • modes: RenderMode[]
    • content: string
    • foreground: boolean

    Returns void

  • addConlet(conletType: string, renderModes: RenderMode[], properties?: null | Map<string, string>): void
  • Sends a notification to the server requesting the addition of a conlet.

    Parameters

    • conletType: string

      the type of the conlet to add

    • renderModes: RenderMode[]

      the requested render mode(s), RenderMode.Foreground is automatically added

    • properties: null | Map<string, string> = null

    Returns void

  • collectConletProperties(container: HTMLElement): Map<string, string>
  • Parameters

    • container: HTMLElement

    Returns Map<string, string>

  • connectionLost(): void
  • connectionRestored(): void
  • connectionSuspended(resume: () => void): void
  • execOnApply(container: Element): void
  • Invokes the functions defined in data-jgwc-on-apply attributes of the tree with root container. Must be invoked by edit dialogs when they are closed.

    Parameters

    • container: Element

      the container of the edit dialog

    Returns void

  • findConletPreview(conletId: string): null | HTMLElement
  • findConletView(conletId: string): null | HTMLElement
  • findPreviewIds(): string[]
  • findViewIds(): (null | string)[]
  • init(consoleSessionId: string, options: { inactivityTimeout?: number; refreshInterval?: number }): void
  • Starts the websocket connection to the server, invokes Renderer.init and sends the consoleReady message to the server.

    Parameters

    • consoleSessionId: string

      the session id

    • options: { inactivityTimeout?: number; refreshInterval?: number }

      additional options

      • Optional inactivityTimeout?: number
      • Optional refreshInterval?: number

    Returns void

  • lockMessageQueue(): void
  • Increases the lock count on the receiver. As long as the lock count is greater than 0, the invocation of handlers is suspended.

    Returns void

  • notifyConletModel(conletId: string, method: string, ...args: any[]): void
  • Sends a JSON RPC notification to the server with method notifyConletModel and as parameters the given conletId, the method and the additional arguments.

    Parameters

    • conletId: string

      the id of the conlet to send to

    • method: string

      the method to invoke

    • Rest ...args: any[]

      additional arguments to send

    Returns void

  • registerConletFunction(conletClass: string, functionName: string, conletFunction: (conletId: string, ...args: any[]) => void): void
  • Registers a conlet function that is to be invoked when a JSON RPC notification with method notifyConletView is received from the server.

    Parameters

    • conletClass: string

      the conlet type for which the method is registered

    • functionName: string

      the method that is registered

    • conletFunction: (conletId: string, ...args: any[]) => void

      the function to invoke

        • (conletId: string, ...args: any[]): void
        • Parameters

          • conletId: string
          • Rest ...args: any[]

          Returns void

    Returns void

  • removePreview(conletId: string): void
  • Removes a conlet preview by invoking the respective methods of the associated renderer. If a view of the conlet is displayed, it will be removed, too.

    After un-displaying the conlet, any "execOnUnload" functions in the conlet tree are invoked (depth first) and JSON RPC notifications with method conletDeleted and the conlet id as parameter are sent to the server for nested component conlets and the preview itself (again depth first). The notifications for the component conlets have as additional argument the collected properties.

    Parameters

    • conletId: string

    Returns void

  • removeView(conletId: string): void
  • Removes a conlet view by invoking the respective methods of the associated renderer.

    After un-displaying the conlet, any "execOnUnload" functions in the conlet tree are invoked (depth first) and JSON RPC notifications with method conletDeleted and the conlet id as parameter are sent to the server for nested component conlets and the view itself (again depth first). The notifications for the component conlets have as additional argument the collected properties.

    Parameters

    • conletId: string

    Returns void

  • renderConlet(conletId: string, modes: RenderMode[]): void
  • Sends a notification that requests the rendering of a conlet.

    Parameters

    • conletId: string

      the conlet id

    • modes: RenderMode[]

      the requested render mode(s)

    Returns void

  • send(method: string, ...params: any[]): void
  • Invokes the given method on the server.

    Parameters

    • method: string
    • Rest ...params: any[]

      the parameters

    Returns void

  • setLocale(locale: string, reload: boolean): void
  • Sends a notification for changing the language to the server.

    Parameters

    • locale: string

      the id of the selected locale

    • reload: boolean

    Returns void

  • unlockMessageQueue(): void
  • Decreases the lock count on the receiver. When the count reaches 0, the invocation of handlers is resumed.

    Returns void

  • updateConletModes(conletId: string, modes: RenderMode[]): void
  • updateConletTitle(conletId: string, title: string): void
  • updateLayout(previewLayout: string[], tabLayout: string[], xtraInfo: Object): void
  • Send the current console layout to the server.

    Parameters

    • previewLayout: string[]

      the conlet ids from top left to bottom right

    • tabLayout: string[]
    • xtraInfo: Object

      extra information spcific to the console implementation

    Returns void

Generated using TypeDoc