Package de.xima.fc.mdl.plugin
Class ScopedPluginUpdateResult
java.lang.Object
de.xima.fc.mdl.plugin.ScopedPluginUpdateResult
- All Implemented Interfaces:
Serializable
A list of
plugin update results
for a particular scope, either a workspace scope or a
system scope.- Since:
- 8.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic ScopedPluginUpdateResult
forFailure
(WorkspaceScope scope, Throwable error) Creates a new update result for a failed update of plugins from a workspace scope.static ScopedPluginUpdateResult
forSuccess
(WorkspaceScope scope, List<PluginUpdateResult> results) Creates a new update result for a successful update of plugins from a workspace scope.getError()
Gets the cause of the failure when the update was unsuccessful.Gets the results for all processed plugins of this scope.getScope()
Gets the scope for which the update was performed.boolean
Checks whether this result is for an update of client-scoped plugins.boolean
Gets whether the plugin update step for this scope was successful.boolean
Checks whether this result is for an update of system-scoped plugins.
-
Method Details
-
getError
Gets the cause of the failure when the update was unsuccessful. This may returnnull
when there is no known cause.- Returns:
- When not successful, the cause of the failure, if known.
-
getResults
Gets the results for all processed plugins of this scope.- Returns:
- A list with all results.
-
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 returnsfalse
when the update process for the scope failed in its entirety. Even when this returnstrue
, individualupdate 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
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.
-