OpenFin Workspace Platform API
    Preparing search index...

    Interface Dock3Provider

    interface Dock3Provider {
        get config(): Dock3Config;
        set config(newConfig: Dock3Config): void;
        get ready(): Promise<void>;
        bookmarkContentMenuEntry(payload: BookmarkDockEntryPayload): Promise<void>;
        getWindowSync(): _Window;
        launchEntry(payload: LaunchDockEntryPayload): Promise<void>;
        loadConfig(): Promise<Dock3Config>;
        moreMenuCustomOptionClicked(
            payload: MoreMenuCustomOptionPayload,
        ): Promise<void>;
        saveConfig(__namedParameters: { config: Dock3Config }): Promise<void>;
        shutdown(): Promise<void>;
        updateConfig(config: Dock3Config): Promise<void>;
    }
    Index
    • get config(): Dock3Config

      Read-only access to the current configuration of the Dock3Provider.

      Returns Dock3Config

    • set config(newConfig: Dock3Config): void

      Protected setter for the configuration of the Dock3Provider. This does not save the configuration in storage nor notify the dock about the change. Use updateConfig method to update the configuration and save it. This should only be used internally in a saveConfig override if super.saveConfig is not called.

      Parameters

      Returns void

    • get ready(): Promise<void>

      Returns a promise that resolves when the Dock3Provider is ready. This is useful to ensure that the dock is fully initialized before performing any operations. The promise will resolve when the dock sends the 'ready' action.

      Returns Promise<void>

    • Returns _Window

    • Called on startup to load the current configuration of the Dock3Provider. If you've overridden the saveConfig method, this should load the configuration from your storage. By default it will load the configuration from local storage. This can be overriden to prevent loading from local storage.

      Returns Promise<Dock3Config>

      The current configuration of the Dock3Provider.

      class MyDock3Provider extends Dock3Provider {
      async loadConfig(): Promise<Dock3Config> {
      // Do not load from local storage, return the default config
      return this.config;
      }
      }
      class MyDock3Provider extends Dock3Provider {
      async loadConfig(): Promise<Dock3Config> {
      // Load from a custom storage
      const configFromStorage = await myCustomStorage.getDockConfig();
      // Update local config to ensure it is used.
      if (configFromStorage) {
      this.config = configFromStorage;
      }
      return this.config;
      }
      }
    • Override this method to handle clicks on custom menu items. Called when user clicks on a custom menu option.

      Parameters

      • payload: MoreMenuCustomOptionPayload

      Returns Promise<void>

    • Called whenever the configuration is updated, this method saves the configuration to the storage. This should not be called directly, if you need to update the configuration, use updateConfig method instead.

      Parameters

      Returns Promise<void>

    • Shuts down the Dock3Provider and closes the dock window. This method sends a shutdown message to the dock and then closes the window.

      Returns Promise<void>

    • Updates the configuration of the Dock3Provider. This method updates the configuration, notifies the dock about the change and saves the new configuration to storage (via saveConfig).

      Parameters

      Returns Promise<void>