Package hudson.scm
Class IntegritySCM.DescriptorImpl
java.lang.Object
hudson.model.Descriptor<hudson.scm.SCM>
hudson.scm.SCMDescriptor<IntegritySCM>
hudson.scm.IntegritySCM.DescriptorImpl
- All Implemented Interfaces:
hudson.model.ModelObject,hudson.model.Saveable,jenkins.model.Loadable,jenkins.util.io.OnMaster
- Enclosing class:
IntegritySCM
public static final class IntegritySCM.DescriptorImpl
extends hudson.scm.SCMDescriptor<IntegritySCM>
implements hudson.model.ModelObject
The relationship of Descriptor and SCM (the describable) is akin to class and object. This
means the descriptor is used to create instances of the describable. Usually the Descriptor is
an internal class in the SCM class named DescriptorImpl. The Descriptor should also contain the
global configuration options as fields, just like the SCM class contains the configurations
options for a job.
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
hudson.model.Descriptor.FormException, hudson.model.Descriptor.PropertyType, hudson.model.Descriptor.Self -
Field Summary
FieldsFields inherited from class hudson.scm.SCMDescriptor
repositoryBrowserFields inherited from class hudson.model.Descriptor
clazzFields inherited from interface hudson.model.Saveable
NOOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanconfigure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData) This method is invoked when the global configuration page is submitted.hudson.util.ListBoxModeldoFillServerConfigItems(String serverConfig) Provides a list box for users to choose from a list of Integrity Server configurationshudson.util.ListBoxModelhudson.util.FormValidationdoTestConnection(String hostName, int port, String userName, String password, boolean secure, String ipHostName, int ipPort, String authType, String ssoCredentialId) A credentials validation helperhudson.util.FormValidationValidates that the thread pool size is numeric and within a valid rangehudson.util.FormValidationValidates that the thread timeout is numeric and within a valid rangeintReturns the default thread pool size for a new projectintReturns the default checkout thread timeout for a specific projectReturns the default groovy expression for the checkpoint labelgetConfiguration(String name) Return the IntegrityConfigurable object for the specified simple nameReturns a default value for the Configuration NameReturns the list of Integrity Server connections.Returns the pooled connection data source for the derby dbReturns the name of the SCM, this is the name that will show up next to CVS, Subversion, etc.booleanisApplicable(hudson.model.Job project) voidload()hudson.scm.SCMnewInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData) voidsetConfigurations(List<IntegrityConfigurable> configurations) Sets the list of Integrity Server connections.Methods inherited from class hudson.scm.SCMDescriptor
getBrowserDescriptors, getGeneration, incrementGeneration, isApplicable, isBrowserReusableMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, 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, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Field Details
-
INTEGRITY_DESCRIPTOR
-
-
Constructor Details
-
DescriptorImpl
public DescriptorImpl()
-
-
Method Details
-
load
public void load()- Specified by:
loadin interfacejenkins.model.Loadable- Overrides:
loadin classhudson.scm.SCMDescriptor<IntegritySCM>
-
newInstance
public hudson.scm.SCM newInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData) throws hudson.model.Descriptor.FormException - Overrides:
newInstancein classhudson.model.Descriptor<hudson.scm.SCM>- Throws:
hudson.model.Descriptor.FormException
-
getDisplayName
Returns the name of the SCM, this is the name that will show up next to CVS, Subversion, etc. when configuring a job.- Specified by:
getDisplayNamein interfacehudson.model.ModelObject- Overrides:
getDisplayNamein classhudson.model.Descriptor<hudson.scm.SCM>
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData) throws hudson.model.Descriptor.FormException This method is invoked when the global configuration page is submitted. In the method the data in the web form should be copied to the Descriptor's fields. To persist the fields to the global configuration XML file, the save() method must be called. Data is defined in the global.jelly page.- Overrides:
configurein classhudson.model.Descriptor<hudson.scm.SCM>- Throws:
hudson.model.Descriptor.FormException
-
isApplicable
public boolean isApplicable(hudson.model.Job project) - Overrides:
isApplicablein classhudson.scm.SCMDescriptor<IntegritySCM>
-
getDataSource
Returns the pooled connection data source for the derby db- Returns:
-
getCheckpointLabel
Returns the default groovy expression for the checkpoint label- Returns:
-
getCheckoutThreadPoolSize
public int getCheckoutThreadPoolSize()Returns the default thread pool size for a new project- Returns:
-
getConfigurationName
Returns a default value for the Configuration Name- Returns:
-
getCheckoutThreadTimeout
public int getCheckoutThreadTimeout()Returns the default checkout thread timeout for a specific project- Returns:
-
getConfigurations
Returns the list of Integrity Server connections.- Returns:
- A list of IntegrityConfigurable objects.
-
setConfigurations
Sets the list of Integrity Server connections.- Parameters:
configurations- A list of IntegrityConfigurable objects.
-
getConfiguration
Return the IntegrityConfigurable object for the specified simple name- Parameters:
name-- Returns:
-
doFillServerConfigItems
Provides a list box for users to choose from a list of Integrity Server configurations- Parameters:
configuration- Simple configuration name- Returns:
-
doFillSsoCredentialIdItems
public hudson.util.ListBoxModel doFillSsoCredentialIdItems() -
doTestConnection
public hudson.util.FormValidation doTestConnection(@QueryParameter("serverConfig.hostName") String hostName, @QueryParameter("serverConfig.port") int port, @QueryParameter("serverConfig.userName") String userName, @QueryParameter("serverConfig.password") String password, @QueryParameter("serverConfig.secure") boolean secure, @QueryParameter("serverConfig.ipHostName") String ipHostName, @QueryParameter("serverConfig.ipPort") int ipPort, @QueryParameter("serverConfig.authType") String authType, @QueryParameter("serverConfig.ssoCredentialId") String ssoCredentialId) throws IOException, javax.servlet.ServletException, com.mks.api.response.APIException A credentials validation helper- Parameters:
hostName-port-userName-password-secure-ipHostName-ipPort-authType-ssoCredentialId-- Returns:
- Throws:
IOExceptionjavax.servlet.ServletExceptioncom.mks.api.response.APIException
-
doValidCheckoutThreadPoolSizeCheck
Validates that the thread pool size is numeric and within a valid range- Parameters:
value- Integer value for Thread Pool Size- Returns:
-
doValidCheckoutThreadTimeoutCheck
Validates that the thread timeout is numeric and within a valid range- Parameters:
value- Integer value for Thread Timeout- Returns:
-