Package de.xima.fc.mdl.plugin
Class PluginUpdateResult
- java.lang.Object
-
- de.xima.fc.mdl.plugin.PluginUpdateResult
-
- All Implemented Interfaces:
Serializable
public final class PluginUpdateResult extends Object implements Serializable
POJO with the result of an attempt to update a plugin.- 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 PluginUpdateResult
forFailure(PluginMeta plugin, List<String> localizedMessages)
static PluginUpdateResult
forFailure(PluginMeta plugin, List<String> localizedMessages, Throwable error)
static PluginUpdateResult
forSuccess(PluginMeta plugin, List<String> localizedMessages)
static PluginUpdateResult
forUpToDate(PluginMeta plugin, List<String> localizedMessages)
Throwable
getError()
List<String>
getLocalizedMessages()
PluginMeta
getPlugin()
EPluginUpdateStatus
getStatus()
boolean
isSuccess()
Gets whether no error was encountered during the update of the plugin.
-
-
-
Method Detail
-
getError
public Throwable getError()
- Returns:
- When
not successful
, the error that caused the failure, if any.
-
getLocalizedMessages
public List<String> getLocalizedMessages()
- Returns:
- A list of localized warning or error messages with further details.
-
getPlugin
public PluginMeta getPlugin()
- Returns:
- ID and name of the updated plugin.
-
getStatus
public EPluginUpdateStatus getStatus()
- Returns:
- Whether the plugin was updated.
-
isSuccess
public boolean isSuccess()
Gets whether no error was encountered during the update of the plugin.
-
forFailure
public static PluginUpdateResult forFailure(PluginMeta plugin, List<String> localizedMessages)
- Parameters:
plugin
- ID and name of the updated plugin.localizedMessages
- A list of localized warning or error messages with further details.- Returns:
- A new plugin update result for a failed plugin update.
-
forFailure
public static PluginUpdateResult forFailure(PluginMeta plugin, List<String> localizedMessages, Throwable error)
- Parameters:
plugin
- ID and name of the updated plugin.localizedMessages
- A list of localized warning or error messages with further details.error
- The error that caused the failure.- Returns:
- A new plugin update result for a failed plugin update.
-
forSuccess
public static PluginUpdateResult forSuccess(PluginMeta plugin, List<String> localizedMessages)
- Parameters:
plugin
- ID and name of the updated plugin.localizedMessages
- A list of localized warning or error messages with further details.- Returns:
- A new plugin update result for a successfully updated plugin.
-
forUpToDate
public static PluginUpdateResult forUpToDate(PluginMeta plugin, List<String> localizedMessages)
- Parameters:
plugin
- ID and name of the updated plugin.localizedMessages
- A list of localized warning or error messages with further details.- Returns:
- A new plugin update result for a plugin that was not updated because it was already up-to-date..
-
-