Class GerritPluginChecker

java.lang.Object
com.sonyericsson.hudson.plugins.gerrit.trigger.utils.GerritPluginChecker

public final class GerritPluginChecker extends Object
Helper to determine if a Gerrit Plugin is installed on the Gerrit server.
Author:
scott.hebert@ericsson.com
  • Method Details

    • isPluginEnabled

      public static Boolean isPluginEnabled(IGerritHudsonTriggerConfig config, String pluginName)
      Query Gerrit to determine if plugin is enabled.
      Parameters:
      config - Gerrit Server Config
      pluginName - The Gerrit Plugin name.
      Returns:
      true if enabled, false if not, and null if we couldn't tell.
    • isPluginEnabled

      public static Boolean isPluginEnabled(IGerritHudsonTriggerConfig config, String pluginName, boolean quiet)
      Query Gerrit to determine if plugin is enabled. In the event that this cannot determine the status, it will throw an Exception.
      Parameters:
      config - Gerrit Server Config
      pluginName - The Gerrit Plugin name.
      quiet - Whether we want to log a message.
      Returns:
      true if enabled, false if not, and null if we couldn't tell.