Package de.xima.fc.mdl.plugin
Class ScopedPluginUpdateResult
- java.lang.Object
-
- de.xima.fc.mdl.plugin.ScopedPluginUpdateResult
-
- All Implemented Interfaces:
Serializable
public final class ScopedPluginUpdateResult extends Object implements Serializable
A list ofplugin update results
for a particular scope, either a workspace scope or a system scope.- Since:
- 8.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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.Throwable
getError()
Gets the cause of the failure when the update was unsuccessful.List<PluginUpdateResult>
getResults()
Gets the results for all processed plugins of this scope.WorkspaceScope
getScope()
Gets the scope for which the update was performed.boolean
isClientScope()
Checks whether this result is for an update of client-scoped plugins.boolean
isSuccess()
Gets whether the plugin update step for this scope was successful.boolean
isSystemScope()
Checks whether this result is for an update of system-scoped plugins.
-
-
-
Method Detail
-
getError
public Throwable 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
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 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
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.
-
-