Class GerritServer.DescriptorImpl

java.lang.Object
hudson.model.Descriptor<GerritServer>
com.sonyericsson.hudson.plugins.gerrit.trigger.GerritServer.DescriptorImpl
All Implemented Interfaces:
Saveable, OnMaster
Enclosing class:
GerritServer

@Extension public static final class GerritServer.DescriptorImpl extends Descriptor<GerritServer>
Descriptor is only used for UI form bindings.
  • Constructor Details

    • DescriptorImpl

      public DescriptorImpl()
  • Method Details

    • getDisplayName

      public String getDisplayName()
      Overrides:
      getDisplayName in class Descriptor<GerritServer>
    • doTestConnection

      public FormValidation doTestConnection(@QueryParameter("gerritHostName") String gerritHostName, @QueryParameter("gerritSshPort") int gerritSshPort, @QueryParameter("gerritProxy") String gerritProxy, @QueryParameter("gerritUserName") String gerritUserName, @QueryParameter("gerritAuthKeyFile") String gerritAuthKeyFile, @QueryParameter("gerritAuthKeyFilePassword") String gerritAuthKeyFilePassword)
      Tests if the provided parameters can connect to Gerrit.
      Parameters:
      gerritHostName - the hostname
      gerritSshPort - the ssh-port
      gerritProxy - the proxy url
      gerritUserName - the username
      gerritAuthKeyFile - the private key file
      gerritAuthKeyFilePassword - the password for the keyfile or null if there is none.
      Returns:
      FormValidation.ok() if can be done, FormValidation.error(java.lang.String) otherwise.
    • doTestRestConnection

      public FormValidation doTestRestConnection(@QueryParameter("gerritFrontEndUrl") String gerritFrontEndUrl, @QueryParameter("gerritHttpUserName") String gerritHttpUserName, @QueryParameter("gerritHttpPassword") String gerritHttpPassword)
      Tests if the REST API settings can connect to Gerrit.
      Parameters:
      gerritFrontEndUrl - the url
      gerritHttpUserName - the user name
      gerritHttpPassword - the password
      Returns:
      FormValidation.ok() if it works.
    • doFillDefaultSlaveIdItems

      public ListBoxModel doFillDefaultSlaveIdItems(@QueryParameter("name") @RelativePath("../..") String serverName)
      Fill the Gerrit slave dropdown with the list of slaves configured with the selected server. Expected to be called only when slave config is enabled at job level.
      Parameters:
      serverName - name of the server
      Returns:
      list of slaves.
    • doFillNotificationLevelItems

      public ListBoxModel doFillNotificationLevelItems()
      Fill the dropdown for notification levels.
      Returns:
      the values.