Package de.xima.fc.mdl.plugin
Class PluginsUpdateStepResult
- java.lang.Object
-
- de.xima.fc.mdl.plugin.PluginsUpdateStepResult
-
- All Implemented Interfaces:
Serializable
public final class PluginsUpdateStepResult extends Object implements 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:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PluginsUpdateStepResult
empty()
Gets an empty successful with no scopes and no results.static PluginsUpdateStepResult
forFailure(Set<WorkspaceScope> requestedScopes, Throwable error)
Creates a new result for a failed plugin update step.static PluginsUpdateStepResult
forSuccess(Set<WorkspaceScope> requestedScopes, Map<WorkspaceScope,ScopedPluginUpdateResult> scopedResults)
Creates a new result for a successful plugin update step.Throwable
getError()
Gets the cause of the failure when the update was unsuccessful.Set<WorkspaceScope>
getRequestedScopes()
Gets the scopes for which a plugin update was requested.Map<WorkspaceScope,ScopedPluginUpdateResult>
getScopedResults()
Gets the map from each scope to the result of the plugin update for that scope.boolean
isSuccess()
Gets whether the plugin update step was successful.
-
-
-
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.
-
getRequestedScopes
public Set<WorkspaceScope> getRequestedScopes()
Gets the scopes for which a plugin update was requested.- Returns:
- All scopes for which an update was requested.
-
getScopedResults
public Map<WorkspaceScope,ScopedPluginUpdateResult> getScopedResults()
Gets the map from each scope to the result of the plugin update for that scope. Note that not allrequested scopes
might 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 returnsfalse
when the update step failed in its entirety. Even when this returnstrue
, individualscope results
may be unsuccessful.- Returns:
- Whether the update step was successful.
-
empty
public static PluginsUpdateStepResult 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.
-
-