hudson.scm
Class IntegritySCM.DescriptorImpl

java.lang.Object
  extended by hudson.model.Descriptor<hudson.scm.SCM>
      extended by hudson.scm.SCMDescriptor<IntegritySCM>
          extended by hudson.scm.IntegritySCM.DescriptorImpl
All Implemented Interfaces:
hudson.model.Saveable
Enclosing class:
IntegritySCM

public static class IntegritySCM.DescriptorImpl
extends hudson.scm.SCMDescriptor<IntegritySCM>

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
 
Field Summary
static IntegritySCM.DescriptorImpl INTEGRITY_DESCRIPTOR
           
 
Fields inherited from class hudson.scm.SCMDescriptor
generation, repositoryBrowser
 
Fields inherited from class hudson.model.Descriptor
clazz
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
protected IntegritySCM.DescriptorImpl()
           
 
Method Summary
 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.FormValidation doGlobalOptionsCheck(java.lang.String value)
          The field mks.globalOptions will be validated through the checkUrl.
 java.lang.String getDisplayName()
          Returns the name of the SCM, this is the name that will show up next to CVS, Subversion, etc.
 java.lang.String getGlobalOptions()
          Returns the MKS Integrity global options configured for this plugin
 hudson.scm.SCM newInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
           
 void setGlobalOptions(java.lang.String globalOptions)
          Sets the MKS Integrity global options configured for this plugin
 
Methods inherited from class hudson.scm.SCMDescriptor
getBrowserDescriptors, isApplicable, isBrowserReusable, load
 
Methods inherited from class hudson.model.Descriptor
calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, getCheckUrl, getConfigFile, getConfigPage, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getPropertyType, getPropertyType, getViewPage, isInstance, isSubTypeOf, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, toArray, toList, toMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INTEGRITY_DESCRIPTOR

@Extension
public static final IntegritySCM.DescriptorImpl INTEGRITY_DESCRIPTOR
Constructor Detail

IntegritySCM.DescriptorImpl

protected IntegritySCM.DescriptorImpl()
Method Detail

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 java.lang.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 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

getGlobalOptions

public java.lang.String getGlobalOptions()
Returns the MKS Integrity global options configured for this plugin


setGlobalOptions

public void setGlobalOptions(java.lang.String globalOptions)
Sets the MKS Integrity global options configured for this plugin


doGlobalOptionsCheck

public hudson.util.FormValidation doGlobalOptionsCheck(@QueryParameter
                                                       java.lang.String value)
The field mks.globalOptions will be validated through the checkUrl. When the user has entered some information and moves the focus away from field, Hudson will call DescriptorImpl.doGlobalOptionsCheck to validate that data entered.



Copyright © 2004-2011 Hudson. All Rights Reserved.