@Extension public class GitHubConfiguration extends GlobalConfiguration
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
ExtensionPoint.LegacyInstancesAreScopedToHudson
clazz
Constructor and Description |
---|
GitHubConfiguration() |
Modifier and Type | Method and Description |
---|---|
boolean |
addEndpoint(Endpoint endpoint)
Adds an endpoint.
|
boolean |
configure(org.kohsuke.stapler.StaplerRequest req,
net.sf.json.JSONObject json) |
Endpoint |
findEndpoint(String apiUri)
Checks to see if the supplied server URL is defined in the global configuration.
|
static GitHubConfiguration |
get() |
List<Endpoint> |
getEndpoints() |
static String |
normalizeApiUri(String apiUri)
Fix an apiUri.
|
boolean |
removeEndpoint(Endpoint endpoint)
Removes an endpoint.
|
boolean |
removeEndpoint(String apiUri)
Removes an endpoint.
|
void |
setEndpoints(List<Endpoint> endpoints) |
void |
updateEndpoint(Endpoint endpoint)
Updates an existing endpoint (or adds if missing).
|
all, getDescriptor, getGlobalConfigPage
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
public static GitHubConfiguration get()
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) throws Descriptor.FormException
configure
in class GlobalConfiguration
Descriptor.FormException
@CheckForNull public static String normalizeApiUri(@CheckForNull String apiUri)
apiUri
- the api URI.public boolean addEndpoint(@NonNull Endpoint endpoint)
endpoint
- the endpoint to add.true
if the list of endpoints was modifiedpublic void updateEndpoint(@NonNull Endpoint endpoint)
endpoint
- the endpoint to update.public boolean removeEndpoint(@NonNull Endpoint endpoint)
endpoint
- the endpoint to remove.true
if the list of endpoints was modifiedpublic boolean removeEndpoint(@CheckForNull String apiUri)
apiUri
- the API URI to remove.true
if the list of endpoints was modifiedCopyright © 2016–2019. All rights reserved.