Class 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 Detail

      • 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.
      • isSuccess

        public boolean isSuccess()
        Gets whether no error was encountered during the update of the plugin.
        Returns:
        true if the status is ERROR, false otherwise.
      • 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..