Class XygeniConfiguration
java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
io.jenkins.plugins.xygeni.configuration.XygeniConfiguration
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalConfiguration>
,Saveable
,OnMaster
Global configuration of Xygeni Plugin.
Xygeni Plugin require Xygeni Api url (use cloud production by default), and a Xygeni Api Token generate by customer administrator to connect to Xygeni api.
Xygeni Api Token should be saved as credential secret at Jenkins instance and pass here as secret-id.
- Author:
- Victor de la Rosa
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class hudson.model.Descriptor
clazz
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
configure
(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) doCheckXygeniToken
(String value) Check if field is not emptydoCheckXygeniUrl
(String value) Check if field is not emptydoTestXygeniConnection
(String xygeniTokenSecretIdField, String xygeniUrlField) Check if current configuration allow to connect to Xygeni platform.static XygeniConfiguration
get()
Read token from credential and return aSecret
boolean
boolean
boolean
boolean
boolean
void
save()
void
setXygeniTokenSecretId
(String xygeniTokenSecret) Together withgetXygeniTokenSecretId()
, binds to entry inconfig.jelly
.void
setXygeniUrl
(String xygeniUrl) Together withgetXygeniUrl()
, binds to entry inconfig.jelly
.Methods inherited from class jenkins.model.GlobalConfiguration
all, getDescriptor, getGlobalConfigPage
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, 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, self, toArray, toList, toMap
-
Constructor Details
-
Method Details
-
get
- Returns:
- the singleton instance
-
getVersion
-
getXygeniTokenSecretId
- Returns:
- the currently field value, if any
-
setXygeniTokenSecretId
Together withgetXygeniTokenSecretId()
, binds to entry inconfig.jelly
.- Parameters:
xygeniTokenSecret
- the new value of this field
-
getXygeniUrl
- Returns:
- the currently configured label, if any
-
setXygeniUrl
Together withgetXygeniUrl()
, binds to entry inconfig.jelly
.- Parameters:
xygeniUrl
- the new value of this field
-
doCheckXygeniToken
Check if field is not empty- Parameters:
value
- form field value- Returns:
- FormValidation ok if not empty or warning message
-
doCheckXygeniUrl
Check if field is not empty- Parameters:
value
- form field value- Returns:
- FormValidation ok if not empty or warning message
-
doTestXygeniConnection
public FormValidation doTestXygeniConnection(@QueryParameter("xygeniTokenSecretId") String xygeniTokenSecretIdField, @QueryParameter("xygeniUrl") String xygeniUrlField) Check if current configuration allow to connect to Xygeni platform.- Parameters:
xygeniTokenSecretIdField
- tokenSecret field valuexygeniUrlField
- xygeniurl field value- Returns:
- FormValidation ok if connect could be establish and token is valid
-
getXygeniToken
Read token from credential and return aSecret
- Returns:
- a Secret
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) throws Descriptor.FormException - Overrides:
configure
in classGlobalConfiguration
- Throws:
Descriptor.FormException
-
save
public void save()- Specified by:
save
in interfaceSaveable
- Overrides:
save
in classDescriptor<GlobalConfiguration>
-
isEmitConfigEvents
public boolean isEmitConfigEvents() -
isEmitComputerEvents
public boolean isEmitComputerEvents() -
isEmitItemEvents
public boolean isEmitItemEvents() -
isEmitBuildEvents
public boolean isEmitBuildEvents() -
isEmitScmEvents
public boolean isEmitScmEvents()
-