@Extension
public class CpwrGlobalConfiguration
extends jenkins.model.GlobalConfiguration
| Modifier and Type | Field | Description |
|---|---|---|
protected boolean |
m_needsSaving |
| Constructor | Description |
|---|---|
CpwrGlobalConfiguration() |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addHostConnection(HostConnection connection) |
Adds the given host connection to the list of host connections.
|
boolean |
configure(org.kohsuke.stapler.StaplerRequest req,
net.sf.json.JSONObject json) |
|
hudson.util.ListBoxModel |
doFillCodePageItems() |
Fills in the Code page selection box with code pages.
|
hudson.util.ListBoxModel |
doFillProtocolItems() |
Fills in the encryption protocol selection box with encryption protocols.
|
static CpwrGlobalConfiguration |
get() |
Returns the singleton instance.
|
hudson.util.ArgumentListBuilder |
getArgumentBuilder(String scriptFileArg,
String cliVersion,
hudson.model.Item project,
String credentialsId,
String connectionId) |
Get an argument list builder for the common arguments.
|
String |
getCertificateString(com.cloudbees.plugins.credentials.common.StandardCertificateCredentials credentials) |
|
String |
getCredentialsUser(com.cloudbees.plugins.credentials.common.StandardCredentials credentials) |
Get the user identified by the given credentials.
|
HostConnection |
getHostConnection(String connectionId) |
Returns a host connection for the given connection identifier.
|
HostConnection |
getHostConnection(String hostPort,
String codePage) |
Returns a host connection for a given host:port and code page, if one exists.
|
HostConnection[] |
getHostConnections() |
Returns the list of host connections.
|
com.cloudbees.plugins.credentials.common.StandardCredentials |
getLoginCredentials(hudson.model.Item project,
String credentialsId) |
Retrieves login information given a credentials identifier.
|
String |
getSubjectDN(X509Certificate x509Certificate) |
Get the subject distinguished name from the specified certificate.
|
String |
getTopazCLILocation(hudson.Launcher launcher) |
Returns the Topaz Workbench CLI location based on node.
|
String |
getTopazCLILocationLinux() |
Returns the value of the topazCLILocationLinux field.
|
String |
getTopazCLILocationWindows() |
Returns the value of the topazCLILocationLinux.
|
X509Certificate |
getX509Certificate(com.cloudbees.plugins.credentials.common.StandardCertificateCredentials credentials) |
|
static void |
jobLoaded() |
Perform initialization after all jobs have been loaded.
|
boolean |
needsSaving() |
Return TRUE if the configuration needs saving.
|
void |
setHostConnections(HostConnection... connections) |
Sets the list of host connections.
|
void |
setTopazCLILocationLinux(String location) |
Sets the Topaz CLI installation location for Linux systems.
|
void |
setTopazCLILocationWindows(String location) |
Sets the Topaz CLI installation location for Windows systems.
|
all, getDescriptor, getGlobalConfigPageaddHelpFileRedirect, 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, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMappublic CpwrGlobalConfiguration()
Clients should not call this - use get() instead.
public static CpwrGlobalConfiguration get()
public boolean needsSaving()
@Initializer(after=JOB_LOADED) public static void jobLoaded()
public HostConnection[] getHostConnections()
public HostConnection getHostConnection(String connectionId)
connectionId - a unique connection identifierHostConnection; can be nullpublic void setHostConnections(HostConnection... connections)
connections - one or more host connectionspublic HostConnection getHostConnection(String hostPort, String codePage)
hostPort - the host and port in the form of 'host:port'codePage - the code pagepublic void addHostConnection(HostConnection connection)
connection - connection to addpublic boolean configure(org.kohsuke.stapler.StaplerRequest req,
net.sf.json.JSONObject json)
configure in class jenkins.model.GlobalConfigurationpublic hudson.util.ListBoxModel doFillProtocolItems()
public hudson.util.ListBoxModel doFillCodePageItems()
public String getTopazCLILocation(hudson.Launcher launcher)
launcher - launcher for starting a processpublic String getTopazCLILocationWindows()
public String getTopazCLILocationLinux()
public void setTopazCLILocationWindows(String location)
location - the install directorypublic void setTopazCLILocationLinux(String location)
location - the install directorypublic com.cloudbees.plugins.credentials.common.StandardCredentials getLoginCredentials(hudson.model.Item project,
String credentialsId)
project - the Jenkins projectcredentialsId - the String identifier of the credentials to obtainpublic String getCredentialsUser(com.cloudbees.plugins.credentials.common.StandardCredentials credentials) throws hudson.AbortException
credentials - a Jenkins StandardCredentials instancehudson.AbortException - if there is a problem with the credentialspublic String getSubjectDN(X509Certificate x509Certificate)
x509Certificate - The instance of X509Certificate from which the subject distinguished name is to be returned.null if the name could not be retrievedpublic X509Certificate getX509Certificate(com.cloudbees.plugins.credentials.common.StandardCertificateCredentials credentials) throws KeyStoreException
credentials - An instance of
StandardCertificateCredentials.X509Certificate.
if we found this certificate in certificateChain using the keystore
null is return if no X509Certificate
founded.KeyStoreException - ~ unable to find an X509Certificate from a StandardCertificateCredentialspublic String getCertificateString(com.cloudbees.plugins.credentials.common.StandardCertificateCredentials credentials) throws KeyStoreException, CertificateEncodingException
credentials - An instance of
StandardCertificateCredentials.X509Certificate.
if we found this certificate in certificateChain using the keystore
null is return if no X509Certificate
founded.KeyStoreException - ~ unable to create an encoded certifcate string from a StandardCertificateCredentialsCertificateEncodingException - ~ unable to encode a certifcate obtained from a StandardCertificateCredentialspublic hudson.util.ArgumentListBuilder getArgumentBuilder(String scriptFileArg, String cliVersion, hudson.model.Item project, String credentialsId, String connectionId) throws hudson.AbortException
scriptFileArg - the name of the application script used to start the CLIcliVersion - the CLI version for testing compatibilityproject - the jenkins projectcredentialsId - the identifier of credentials to useconnectionId - the identifier of the host connection to usehudson.AbortException - if unable to initialize the argument builderCopyright © 2016–2026. All rights reserved.