@Extension public class GerritManagement extends ManagementLink implements org.kohsuke.stapler.StaplerProxy, Describable<GerritManagement>, Saveable, ModelObjectWithContextMenu
Modifier and Type | Class and Description |
---|---|
static class |
GerritManagement.DescriptorImpl
Descriptor is only used for UI form bindings.
|
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem
ExtensionPoint.LegacyInstancesAreScopedToHudson
Modifier and Type | Field and Description |
---|---|
static String |
URL_NAME
The relative url name for this management link.
|
LIST
Constructor and Description |
---|
GerritManagement() |
Modifier and Type | Method and Description |
---|---|
GerritServer |
doAddNewServer(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Add a new server.
|
void |
doConfigSubmit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Saves the form to the configuration and disk.
|
ModelObjectWithContextMenu.ContextMenu |
doContextMenu(org.kohsuke.stapler.StaplerRequest request,
org.kohsuke.stapler.StaplerResponse response) |
FormValidation |
doNameFreeCheck(String value)
Checks whether server name already exists.
|
static GerritManagement |
get()
Returns this singleton.
|
GerritAdministrativeMonitor |
getAdministrativeMonitor()
The AdministrativeMonitor related to Gerrit.
|
static IGerritHudsonTriggerConfig |
getConfig(String serverName)
Get the config of a server.
|
String |
getDescription() |
GerritManagement.DescriptorImpl |
getDescriptor() |
Diagnostics |
getDiagnostics()
A sub page displaying some diagnostic views.
|
String |
getDisplayName() |
String |
getIconFileName() |
static PluginConfig |
getPluginConfig()
Get the plugin config.
|
Permission |
getRequiredPermission()
Jenkins.ADMINISTER permission. |
GerritServer |
getServer(String encodedServerName)
Used when redirected to a server.
|
List<String> |
getServerNames()
Convenience method for jelly.
|
List<GerritServer> |
getServers()
Gets the list of GerritServer.
|
net.sf.json.JSONObject |
getServerStatuses()
Used when getting server status from JavaScript.
|
Object |
getTarget() |
String |
getUrlName() |
void |
save() |
all, getRequiresConfirmation, getRequiresPOST
public static final String URL_NAME
getUrlName()
.public String getIconFileName()
getIconFileName
in interface Action
getIconFileName
in class ManagementLink
public String getUrlName()
getUrlName
in interface Action
getUrlName
in class ManagementLink
public String getDisplayName()
getDisplayName
in interface Action
getDisplayName
in interface ModelObject
public String getDescription()
getDescription
in class ManagementLink
public GerritManagement.DescriptorImpl getDescriptor()
getDescriptor
in interface Describable<GerritManagement>
public ModelObjectWithContextMenu.ContextMenu doContextMenu(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws Exception
doContextMenu
in interface ModelObjectWithContextMenu
Exception
public Diagnostics getDiagnostics()
public List<GerritServer> getServers()
public GerritServer getServer(String encodedServerName)
encodedServerName
- the server name encoded by URLEncoder.encode(name,"UTF-8").@JavaScriptMethod public net.sf.json.JSONObject getServerStatuses()
public GerritServer doAddNewServer(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException
req
- the StaplerRequestrsp
- the StaplerResponseIOException
- when error sending redirect back to the list of serverspublic Object getTarget()
getTarget
in interface org.kohsuke.stapler.StaplerProxy
public void save() throws IOException
save
in interface Saveable
IOException
public static GerritManagement get()
@CheckForNull public static PluginConfig getPluginConfig()
public static IGerritHudsonTriggerConfig getConfig(String serverName)
serverName
- the name of the server for which we want to get the config.GerritServer.getConfig()
public GerritAdministrativeMonitor getAdministrativeMonitor()
public List<String> getServerNames()
public FormValidation doNameFreeCheck(@QueryParameter(value="value") String value)
value
- the value of the name field.public void doConfigSubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws javax.servlet.ServletException, IOException, InterruptedException
req
- StaplerRequestrsp
- StaplerResponsejavax.servlet.ServletException
- if something unfortunate happens.IOException
- if something unfortunate happens.InterruptedException
- if something unfortunate happens.public Permission getRequiredPermission()
Jenkins.ADMINISTER
permission.
Also used by JellygetRequiredPermission
in class ManagementLink
Copyright © 2016–2019. All rights reserved.