Class GerritServer.DescriptorImpl
- java.lang.Object
-
- hudson.model.Descriptor<GerritServer>
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.GerritServer.DescriptorImpl
-
- Enclosing class:
- GerritServer
@Extension public static final class GerritServer.DescriptorImpl extends Descriptor<GerritServer>
Descriptor is only used for UI form bindings.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
-
Field Summary
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Constructor Description DescriptorImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListBoxModel
doFillDefaultSlaveIdItems(String serverName)
Fill the Gerrit slave dropdown with the list of slaves configured with the selected server.ListBoxModel
doFillNotificationLevelItems()
Fill the dropdown for notification levels.FormValidation
doTestConnection(String gerritHostName, int gerritSshPort, String gerritProxy, String gerritUserName, String gerritAuthKeyFile, String gerritAuthKeyFilePassword)
Tests if the provided parameters can connect to Gerrit.FormValidation
doTestRestConnection(String gerritFrontEndUrl, String gerritHttpUserName, String gerritHttpPassword)
Tests if the REST API settings can connect to Gerrit.String
getDisplayName()
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
getDisplayName
public String getDisplayName()
- Overrides:
getDisplayName
in classDescriptor<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 hostnamegerritSshPort
- the ssh-portgerritProxy
- the proxy urlgerritUserName
- the usernamegerritAuthKeyFile
- the private key filegerritAuthKeyFilePassword
- 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 urlgerritHttpUserName
- the user namegerritHttpPassword
- 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.
-
-