Class GerritServer.DescriptorImpl

    • Constructor Detail

      • DescriptorImpl

        public DescriptorImpl()
    • Method Detail

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