Package de.xima.fc.mdl.plugin
Class PluginsUpdateStepResult
java.lang.Object
de.xima.fc.mdl.plugin.PluginsUpdateStepResult
- All Implemented Interfaces:
Serializable
Represents the result of an entire plugin update operation, which may have updated many plugins from different system
and client scopes.
- Since:
- 8.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic PluginsUpdateStepResultempty()Gets an empty successful with no scopes and no results.static PluginsUpdateStepResultforFailure(Set<WorkspaceScope> requestedScopes, Throwable error) Creates a new result for a failed plugin update step.static PluginsUpdateStepResultforSuccess(Set<WorkspaceScope> requestedScopes, Map<WorkspaceScope, ScopedPluginUpdateResult> scopedResults) Creates a new result for a successful plugin update step.getError()Gets the cause of the failure when the update was unsuccessful.Gets the scopes for which a plugin update was requested.Gets the map from each scope to the result of the plugin update for that scope.booleanGets whether the plugin update step was successful.
-
Method Details
-
getError
Gets the cause of the failure when the update was unsuccessful. This may returnnullwhen there is no known cause.- Returns:
- When not successful, the cause of the failure, if known.
-
getRequestedScopes
Gets the scopes for which a plugin update was requested.- Returns:
- All scopes for which an update was requested.
-
getScopedResults
Gets the map from each scope to the result of the plugin update for that scope. Note that not allrequested scopesmight be present in this map.- Returns:
- Map from each scope the result of that scope.
-
isSuccess
public boolean isSuccess()Gets whether the plugin update step was successful. Note that this only returnsfalsewhen the update step failed in its entirety. Even when this returnstrue, individualscope resultsmay be unsuccessful.- Returns:
- Whether the update step was successful.
-
empty
Gets an empty successful with no scopes and no results.- Returns:
- An update result with no scopes and no results.
-
forFailure
public static PluginsUpdateStepResult forFailure(Set<WorkspaceScope> requestedScopes, Throwable error) Creates a new result for a failed plugin update step. This should only be used when the entire update operation failed, not when a single plugin failed to update.- Parameters:
requestedScopes- All scopes for which an update was requested.error- Cause of the failure.- Returns:
- A new result for a failed plugin update step.
-
forSuccess
public static PluginsUpdateStepResult forSuccess(Set<WorkspaceScope> requestedScopes, Map<WorkspaceScope, ScopedPluginUpdateResult> scopedResults) Creates a new result for a successful plugin update step.- Parameters:
requestedScopes- All scopes for which an update was requested.scopedResults- A map between each scope and the result for that scope.- Returns:
- A new result for a successful plugin update step.
-