Class ScopedPluginUpdateResult

    • Method Detail

      • getError

        public Throwable getError()
        Gets the cause of the failure when the update was unsuccessful. This may return null when there is no known cause.
        Returns:
        When not successful, the cause of the failure, if known.
      • getResults

        public List<PluginUpdateResult> getResults()
        Gets the results for all processed plugins of this scope.
        Returns:
        A list with all results.
      • getScope

        public WorkspaceScope getScope()
        Gets the scope for which the update was performed.
        Returns:
        The workspace scope.
      • isClientScope

        public boolean isClientScope()
        Checks whether this result is for an update of client-scoped plugins.
        Returns:
        true if the scope is a workspace scope.
      • isSuccess

        public boolean isSuccess()
        Gets whether the plugin update step for this scope was successful. Note that this only returns false when the update process for the scope failed in its entirety. Even when this returns true, individual update results may be unsuccessful.
        Returns:
        Whether the update step for this scope was successful.
      • isSystemScope

        public boolean isSystemScope()
        Checks whether this result is for an update of system-scoped plugins.
        Returns:
        true if the scope is the system scope.
      • forSuccess

        public static ScopedPluginUpdateResult forSuccess​(WorkspaceScope scope,
                                                          List<PluginUpdateResult> results)
        Creates a new update result for a successful update of plugins from a workspace scope.
        Parameters:
        scope - Workspace scope where plugins were updated.
        results - A list with all results.
        Returns:
        A new result for a successful update of plugins in a particular scope, with the given results.
      • forFailure

        public static ScopedPluginUpdateResult forFailure​(WorkspaceScope scope,
                                                          Throwable error)
        Creates a new update result for a failed update of plugins from a workspace scope. This should only be used when the entire update operation for the system scope failed, not when a single plugin failed to update.
        Parameters:
        scope - Workspace scope where plugins were updated.
        error - The cause of the failure.
        Returns:
        A new result for a failed update of plugins in a particular scope.