Class PromaPluginUpdater


  • public final class PromaPluginUpdater
    extends Object
    Functions for installing and updating plugins from the remote PROMA repository.
    Since:
    8.0.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • installOrUpdatePluginWithVersion

        public static <R> StageChain<ScopedPluginUpdateResult,​R> installOrUpdatePluginWithVersion​(IPublicPromaInvocationContext pc,
                                                                                                        Locale locale,
                                                                                                        WorkspaceScope scope,
                                                                                                        String pluginKey,
                                                                                                        String targetVersion,
                                                                                                        EPluginValidationFailureTreatment validationFailureTreatment)
        Installs or updates a plugin with the given plugin key from the remote repository, at the system or a client scope.

        When the target version is non-empty, downloads that version from the remote repository. Otherwise, when the target version is null or empty, downloads the most recent compatible version from the remote repository.

        Type Parameters:
        R - Type of the next expected value for the chain.
        Parameters:
        pc - Context for accessing the PROMA API.
        locale - Locale for localizing messages and plugin names.
        scope - Scope where the plugin should be installed.
        pluginKey - Key of the plugin to install or updated.
        targetVersion - Optional version of the plugin. When not given, uses the latest compatible version.
        validationFailureTreatment - How to proceed if the plugin configuration is invalid.
        Returns:
        The result of the install or update procedure.
      • updateInstalledPlugins

        public static <R> StageChain<PluginsUpdateStepResult,​R> updateInstalledPlugins​(IPublicPromaInvocationContext pc,
                                                                                             Locale locale,
                                                                                             EPluginValidationFailureTreatment validationFailureTreatment,
                                                                                             String licenseKey)
        For all scopes (clients + system), updates all plugins that are connected to a remote repository. The latest compatible version is fetched from the remote repository and installed.

        Note: For security reasons, when sending requests via the user's browser, the update check is restricted to those scopes (system or client) for which the user from the given invocation context has access to the plugin menu.

        Type Parameters:
        R - Type of the next expected value for the chain.
        Parameters:
        pc - Context for accessing the PROMA API.
        locale - Locale for localizing messages and plugin names.
        validationFailureTreatment - How to proceed if the plugin configuration is invalid.
        Returns:
        A pending result with the outcome of the plugin update.
      • updateInstalledPlugins

        public static <R> StageChain<PluginsUpdateStepResult,​R> updateInstalledPlugins​(IPublicPromaInvocationContext pc,
                                                                                             Locale locale,
                                                                                             Set<WorkspaceScope> scopes,
                                                                                             EPluginValidationFailureTreatment validationFailureTreatment,
                                                                                             String licenseKey)
        For each given scopes, update all plugins that are connected to a remote repository. The latest compatible version is fetched from the remote repository and installed.

        Note: For security reasons, when sending requests via the user's browser, the update check is restricted to those scopes (system or client) for which the user from the given invocation context has access to the plugin menu.

        Type Parameters:
        R - Type of the next expected value for the chain.
        Parameters:
        pc - Context for accessing the PROMA API.
        locale - Locale for localizing messages and plugin names.
        scopes - Optional list of scopes for which to update plugins. When empty or null, no updates are performed.
        validationFailureTreatment - How to proceed if the plugin configuration is invalid.
        Returns:
        A pending result with the outcome of the plugin update.
      • updateInstalledPlugins

        public static <R> StageChain<PluginsUpdateStepResult,​R> updateInstalledPlugins​(IPublicPromaInvocationContext pc,
                                                                                             Locale locale,
                                                                                             Set<WorkspaceScope> scopes,
                                                                                             EPluginValidationFailureTreatment validationFailureTreatment,
                                                                                             BiPredicate<WorkspaceScope,​PluginGroupMeta> pluginFilter,
                                                                                             String licenseKey)
        For each given scopes, update all plugins that are connected to a remote repository. The latest compatible version is fetched from the remote repository and installed.

        Note: For security reasons, when sending requests via the user's browser, the update check is restricted to those scopes (system or client) for which the user from the given invocation context has access to the plugin menu.

        Type Parameters:
        R - Type of the next expected value for the chain.
        Parameters:
        pc - Context for accessing the PROMA API.
        locale - Locale for localizing messages and plugin names.
        scopes - Optional list of scopes for which to update plugins. When empty or null, no updates are performed.
        validationFailureTreatment - How to proceed if the plugin configuration is invalid.
        pluginFilter - Optional filter for limiting the updated plugins to a given subset for each scope.
        Returns:
        A pending result with the outcome of the plugin update.