Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WorkspacePlatformModule

Controller for a Workspace Platform.

Hierarchy

  • Platform
    • WorkspacePlatformModule

Index

Properties

#private: any
#private: any
Application: Application

The browser window factory for the Workspace Platform.

Layout: LayoutModule

The storage API for the Workspace Platform.

Theme: ThemeApi

Theme API for the Workspace Platform.

addListener: (<E>(eventType: E, listener: ((payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void), options?: SubscriptionOptions) => Promise<WorkspacePlatformModule>)

Type declaration

    • <E>(eventType: E, listener: ((payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void), options?: SubscriptionOptions): Promise<WorkspacePlatformModule>
    • Type Parameters

      • E extends string | symbol

      Parameters

      • eventType: E
      • listener: ((payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void)
          • (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]): void
          • Parameters

            • payload: E extends string | number ? PlatformEvents[E] : any
            • Rest ...args: any[]

            Returns void

      • Optional options: SubscriptionOptions

      Returns Promise<WorkspacePlatformModule>

deregisterAllListeners: ((eventType: string | symbol) => Promise<void | EventEmitter>)

Type declaration

    • (eventType: string | symbol): Promise<void | EventEmitter>
    • Parameters

      • eventType: string | symbol

      Returns Promise<void | EventEmitter>

deregisterEventListener: ((eventType: string | symbol, options?: SubscriptionOptions) => Promise<void | EventEmitter>)

Type declaration

    • (eventType: string | symbol, options?: SubscriptionOptions): Promise<void | EventEmitter>
    • Parameters

      • eventType: string | symbol
      • Optional options: SubscriptionOptions

      Returns Promise<void | EventEmitter>

emit: (<E>(eventName: E, payload: E extends string ? PlatformEvents[E] : any, ...args: any[]) => boolean)

Type declaration

    • <E>(eventName: E, payload: E extends string ? PlatformEvents[E] : any, ...args: any[]): boolean
    • Type Parameters

      • E extends string | symbol

      Parameters

      • eventName: E
      • payload: E extends string ? PlatformEvents[E] : any
      • Rest ...args: any[]

      Returns boolean

eventNames: (() => (string | symbol)[])

Type declaration

    • (): (string | symbol)[]
    • Returns (string | symbol)[]

getClient: ((identity?: ApplicationIdentity) => Promise<default>)

Type declaration

    • (identity?: ApplicationIdentity): Promise<default>
    • Parameters

      • Optional identity: ApplicationIdentity

      Returns Promise<default>

identity: ApplicationIdentity
isNodeEnvironment: (() => boolean)

Type declaration

    • (): boolean
    • Returns boolean

isOpenFinEnvironment: (() => boolean)

Type declaration

    • (): boolean
    • Returns boolean

launchLegacyManifest: ((manifestUrl: string) => Promise<Platform>)

Type declaration

    • (manifestUrl: string): Promise<Platform>
    • Parameters

      • manifestUrl: string

      Returns Promise<Platform>

listenerCount: ((type: string | symbol) => number)

Type declaration

    • (type: string | symbol): number
    • Parameters

      • type: string | symbol

      Returns number

listeners: ((type: string | symbol) => Function[])

Type declaration

    • (type: string | symbol): Function[]
    • Parameters

      • type: string | symbol

      Returns Function[]

on: (<E>(eventType: E, listener: ((payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void), options?: SubscriptionOptions) => Promise<WorkspacePlatformModule>)

Type declaration

    • <E>(eventType: E, listener: ((payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void), options?: SubscriptionOptions): Promise<WorkspacePlatformModule>
    • Type Parameters

      • E extends string | symbol

      Parameters

      • eventType: E
      • listener: ((payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void)
          • (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]): void
          • Parameters

            • payload: E extends string | number ? PlatformEvents[E] : any
            • Rest ...args: any[]

            Returns void

      • Optional options: SubscriptionOptions

      Returns Promise<WorkspacePlatformModule>

once: (<E>(eventType: E, listener: ((payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void), options?: SubscriptionOptions) => Promise<WorkspacePlatformModule>)

Type declaration

    • <E>(eventType: E, listener: ((payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void), options?: SubscriptionOptions): Promise<WorkspacePlatformModule>
    • Type Parameters

      • E extends string | symbol

      Parameters

      • eventType: E
      • listener: ((payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void)
          • (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]): void
          • Parameters

            • payload: E extends string | number ? PlatformEvents[E] : any
            • Rest ...args: any[]

            Returns void

      • Optional options: SubscriptionOptions

      Returns Promise<WorkspacePlatformModule>

prependListener: (<E>(eventType: E, listener: ((payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void), options?: SubscriptionOptions) => Promise<WorkspacePlatformModule>)

Type declaration

    • <E>(eventType: E, listener: ((payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void), options?: SubscriptionOptions): Promise<WorkspacePlatformModule>
    • Type Parameters

      • E extends string | symbol

      Parameters

      • eventType: E
      • listener: ((payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void)
          • (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]): void
          • Parameters

            • payload: E extends string | number ? PlatformEvents[E] : any
            • Rest ...args: any[]

            Returns void

      • Optional options: SubscriptionOptions

      Returns Promise<WorkspacePlatformModule>

prependOnceListener: (<E>(eventType: E, listener: ((payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void), options?: SubscriptionOptions) => Promise<WorkspacePlatformModule>)

Type declaration

    • <E>(eventType: E, listener: ((payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void), options?: SubscriptionOptions): Promise<WorkspacePlatformModule>
    • Type Parameters

      • E extends string | symbol

      Parameters

      • eventType: E
      • listener: ((payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void)
          • (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]): void
          • Parameters

            • payload: E extends string | number ? PlatformEvents[E] : any
            • Rest ...args: any[]

            Returns void

      • Optional options: SubscriptionOptions

      Returns Promise<WorkspacePlatformModule>

registerEventListener: ((eventType: string | symbol, options: SubscriptionOptions, applySubscription: ((emitter: EventEmitter) => void), undoSubscription: ((emitter: EventEmitter) => void)) => Promise<void>)

Type declaration

    • (eventType: string | symbol, options: SubscriptionOptions, applySubscription: ((emitter: EventEmitter) => void), undoSubscription: ((emitter: EventEmitter) => void)): Promise<void>
    • Parameters

      • eventType: string | symbol
      • options: SubscriptionOptions
      • applySubscription: ((emitter: EventEmitter) => void)
          • (emitter: EventEmitter): void
          • Parameters

            • emitter: EventEmitter

            Returns void

      • undoSubscription: ((emitter: EventEmitter) => void)
          • (emitter: EventEmitter): void
          • Parameters

            • emitter: EventEmitter

            Returns void

      Returns Promise<void>

removeAllListeners: ((eventType?: string | symbol) => Promise<WorkspacePlatformModule>)

Type declaration

removeListener: (<E>(eventType: E, listener: ((payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void), options?: SubscriptionOptions) => Promise<WorkspacePlatformModule>)

Type declaration

    • <E>(eventType: E, listener: ((payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void), options?: SubscriptionOptions): Promise<WorkspacePlatformModule>
    • Type Parameters

      • E extends string | symbol

      Parameters

      • eventType: E
      • listener: ((payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void)
          • (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]): void
          • Parameters

            • payload: E extends string | number ? PlatformEvents[E] : any
            • Rest ...args: any[]

            Returns void

      • Optional options: SubscriptionOptions

      Returns Promise<WorkspacePlatformModule>

wire: Transport<EntityType>

Accessors

  • get fin(): default<EntityType>
  • Returns default<EntityType>

  • get me(): Identity
  • Returns Identity

Methods

  • applySnapshot(snapshot: string | BrowserSnapshot, options?: ApplySnapshotOptions): Promise<Platform>
  • Launch a browser snapshot that contains windows with pages.

    Parameters

    • snapshot: string | BrowserSnapshot

      the browser snapshot to launch or a url or filepath to retrieve a JSON snapshot.

    • Optional options: ApplySnapshotOptions

    Returns Promise<Platform>

  • applyWorkspace(workspace: Workspace): Promise<void>
  • Closes content from the current workspace and applies the given workspace to the user's desktop. Makes that workspace the active workspace.

    Parameters

    • workspace: Workspace

      the workspace to apply to the desktop and set as the current active workspace.

    Returns Promise<void>

  • closeView(viewIdentity: Identity): Promise<void>
  • Closes a specified view in a target window.

    tutorial

    Platform.closeView

    Parameters

    • viewIdentity: Identity

      View identity

    Returns Promise<void>

  • closeWindow(windowId: Identity, options?: { skipBeforeUnload: boolean }): Promise<void>
  • Parameters

    • windowId: Identity
    • Optional options: { skipBeforeUnload: boolean }
      • skipBeforeUnload: boolean

    Returns Promise<void>

  • createView(viewOptions: PlatformViewCreationOptions, target?: Identity, targetView?: Identity): Promise<View>
  • Creates a new view and attaches it to a specified target window.

    tutorial

    Platform.createView

    Parameters

    • viewOptions: PlatformViewCreationOptions

      View creation options

    • Optional target: Identity
    • Optional targetView: Identity

    Returns Promise<View>

  • createWindow(options: PlatformWindowCreationOptions): Promise<_Window & Identity>
  • Creates a new Window.

    tutorial

    Platform.createWindow

    Parameters

    • options: PlatformWindowCreationOptions

      Window creation options

    Returns Promise<_Window & Identity>

  • fetchManifest(manifestUrl: string): Promise<any>
  • Fetches a JSON manifest using the browser process and returns a Javascript object. Can be overwritten using {@link Platform#init Platform.init}.

    tutorial

    Platform.fetchManifest

    Parameters

    • manifestUrl: string

      The URL of the manifest to fetch.

    Returns Promise<any>

  • Gets a workspace data structure that represents the current state of the user's desktop.

    Returns Promise<Workspace>

  • Get a snapshot that contains browser windows with pages.

    Returns Promise<BrowserSnapshot>

  • getWindowContext(target?: Identity): Promise<any>
  • Get the context context of a host window that was previously set using {@link Platform#setWindowContext setWindowContext}. The context will be saved in any platform snapshots. Returns a promise that resolves to the context.

    tutorial

    Platform.getWindowContext

    experimental

    Parameters

    • Optional target: Identity

    Returns Promise<any>

  • launchContentManifest(manifestUrl: string): Promise<Platform>
  • Retrieves a manifest by url and launches a legacy application manifest or snapshot into the platform. Returns a promise that resolves to the wrapped Platform.

    tutorial

    Platform.launchContentManifest

    experimental

    Parameters

    • manifestUrl: string

      The URL of the manifest that will be launched into the platform. If this app manifest contains a snapshot, that will be launched into the platform. If not, the application described in startup_app options will be launched into the platform. The applicable startup_app options will become {@link View~options View Options}.

    Returns Promise<Platform>

  • quit(): Promise<void>
  • Closes current platform, all its windows, and their views.

    tutorial

    Platform.quit

    Returns Promise<void>

  • reparentView(viewIdentity: Identity, target: Identity): Promise<View>
  • DEPRECATED - please use Platform.createView. Reparents a specified view in a new target window.

    tutorial

    Platform.createView

    Parameters

    • viewIdentity: Identity

      View identity

    • target: Identity

      new owner window identity

    Returns Promise<View>

  • setActiveWorkspace(workspace: Workspace): Promise<void>
  • Sets the workspace as the current active workspace. Does not apply the workspace to the user's desktop.

    Parameters

    • workspace: Workspace

      the workspace to set as current active workspace.

    Returns Promise<void>

  • setWindowContext(context?: any, target?: Identity): Promise<void>
  • Set the context of a host window. The context will be available to the window itself, and to its child Views. It will be saved in any platform snapshots. It can be retrieved using {@link Platform#getWindowContext getWindowContext}.

    tutorial

    Platform.setWindowContext

    experimental

    Parameters

    • Optional context: any

      A field where serializable context data can be stored to be saved in platform snapshots.

    • Optional target: Identity

    Returns Promise<void>

Generated using TypeDoc