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

    Fields
    Modifier and Type
    Field
    Description
     

    Fields inherited from class hudson.scm.SCMDescriptor

    repositoryBrowser

    Fields inherited from class hudson.model.Descriptor

    clazz

    Fields inherited from interface hudson.model.Saveable

    NOOP
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
    This method is invoked when the global configuration page is submitted.
    hudson.util.ListBoxModel
    Provides a list box for users to choose from a list of Integrity Server configurations
    hudson.util.ListBoxModel
     
    hudson.util.FormValidation
    doTestConnection(String hostName, int port, String userName, String password, boolean secure, String ipHostName, int ipPort, String authType, String ssoCredentialId)
    A credentials validation helper
    hudson.util.FormValidation
    Validates that the thread pool size is numeric and within a valid range
    hudson.util.FormValidation
    Validates that the thread timeout is numeric and within a valid range
    int
    Returns the default thread pool size for a new project
    int
    Returns the default checkout thread timeout for a specific project
    Returns the default groovy expression for the checkpoint label
    Return the IntegrityConfigurable object for the specified simple name
    Returns a default value for the Configuration Name
    Returns the list of Integrity Server connections.
    Returns the pooled connection data source for the derby db
    Returns the name of the SCM, this is the name that will show up next to CVS, Subversion, etc.
    boolean
    isApplicable(hudson.model.Job project)
     
    void
     
    hudson.scm.SCM
    newInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
     
    void
    Sets the list of Integrity Server connections.

    Methods inherited from class hudson.scm.SCMDescriptor

    getBrowserDescriptors, getGeneration, incrementGeneration, isApplicable, isBrowserReusable

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • DescriptorImpl

      public DescriptorImpl()
  • Method Details

    • load

      public void load()
      Specified by:
      load in interface jenkins.model.Loadable
      Overrides:
      load in class hudson.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:
      newInstance in class hudson.model.Descriptor<hudson.scm.SCM>
      Throws:
      hudson.model.Descriptor.FormException
    • getDisplayName

      public String 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:
      getDisplayName in interface hudson.model.ModelObject
      Overrides:
      getDisplayName in class hudson.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:
      configure in class hudson.model.Descriptor<hudson.scm.SCM>
      Throws:
      hudson.model.Descriptor.FormException
    • isApplicable

      public boolean isApplicable(hudson.model.Job project)
      Overrides:
      isApplicable in class hudson.scm.SCMDescriptor<IntegritySCM>
    • getDataSource

      public ConnectionPoolDataSource getDataSource()
      Returns the pooled connection data source for the derby db
      Returns:
    • getCheckpointLabel

      public String 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

      public String 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

      public List<IntegrityConfigurable> getConfigurations()
      Returns the list of Integrity Server connections.
      Returns:
      A list of IntegrityConfigurable objects.
    • setConfigurations

      public void setConfigurations(List<IntegrityConfigurable> configurations)
      Sets the list of Integrity Server connections.
      Parameters:
      configurations - A list of IntegrityConfigurable objects.
    • getConfiguration

      public IntegrityConfigurable getConfiguration(String name)
      Return the IntegrityConfigurable object for the specified simple name
      Parameters:
      name -
      Returns:
    • doFillServerConfigItems

      public hudson.util.ListBoxModel doFillServerConfigItems(@QueryParameter String serverConfig)
      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:
      IOException
      javax.servlet.ServletException
      com.mks.api.response.APIException
    • doValidCheckoutThreadPoolSizeCheck

      public hudson.util.FormValidation doValidCheckoutThreadPoolSizeCheck(@QueryParameter String value)
      Validates that the thread pool size is numeric and within a valid range
      Parameters:
      value - Integer value for Thread Pool Size
      Returns:
    • doValidCheckoutThreadTimeoutCheck

      public hudson.util.FormValidation doValidCheckoutThreadTimeoutCheck(@QueryParameter String value)
      Validates that the thread timeout is numeric and within a valid range
      Parameters:
      value - Integer value for Thread Timeout
      Returns: