Interface INavigatorActivationService


  • public interface INavigatorActivationService
    Determines if an extension is active within the context of a given viewer and manages the persistence of this information. If an extension is active then the extension will contribute functionality to the viewer. If an extension is not active, then the extension will not be given opportunities to contribute functionality to the given viewer. See INavigatorContentService for more detail on what states are associated with a content extension.
    Since:
    3.2
    • Method Detail

      • activateExtensions

        INavigatorContentDescriptor[] activateExtensions​(String[] extensionIds,
                                                         boolean toDeactivateAllOthers)
        Activate the extensions specified by the extensionIds array. Clients may also choose to disable all other extensions. The set of descriptors returned is the set that were activated as a result of this call. In the case of this method, that means that a descriptor will be returned for each extensionId in the array, regardless of whether that extension is already enabled.

        Clients must call persistExtensionActivations() to save the the activation state after activating or deactivating extensions.

        Parameters:
        extensionIds - The list of extensions to activate
        toDeactivateAllOthers - True will deactivate all other extensions; False will leave the other activations as-is
        Returns:
        A list of all INavigatorContentDescriptors that were activated as a result of this call. This will be the set of INavigatorContentDescriptors that corresponds exactly to the set of given extensionIds.
      • deactivateExtensions

        INavigatorContentDescriptor[] deactivateExtensions​(String[] extensionIds,
                                                           boolean toActivateAllOthers)
        Deactivate the extensions specified by the extensionIds. Clients may choose to activate all other extensions which are not explicitly disabled. If toActivateAllOthers is true, the array of returned descriptors will be the collection of all extensions not specified in the extensionIds array. If it is false, the array will be empty.

        Clients must call persistExtensionActivations() to save the the activation state after activating or deactivating extensions.

        Parameters:
        extensionIds - The list of extensions to activate
        toActivateAllOthers - True will activate all other extensions; False will leave the other activations as-is
        Returns:
        A list of all INavigatorContentDescriptors that were activated as a result of this call. If toActivateAllOthers is false, the result will be an empty array. Otherwise, it will be the set of all visible extensions minus those given in the 'extensionIds' parameter.
      • isNavigatorExtensionActive

        boolean isNavigatorExtensionActive​(String aNavigatorExtensionId)
        Checks the known activation state for the given viewer id to determine if the given navigator extension is 'active'.
        Parameters:
        aNavigatorExtensionId - The unique identifier associated with a given extension.
        Returns:
        True if the extension is active in the context of the viewer id.