hudson.plugins.collabnet.filerelease
Class CNFileRelease.DescriptorImpl

java.lang.Object
  extended by hudson.model.Descriptor<T>
      extended by hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher>
          extended by hudson.plugins.collabnet.filerelease.CNFileRelease.DescriptorImpl
All Implemented Interfaces:
hudson.model.Saveable
Enclosing class:
CNFileRelease

@Extension
public static final class CNFileRelease.DescriptorImpl
extends hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher>

The CNFileRelease Descriptor class.


Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.model.Descriptor
hudson.model.Descriptor.FormException, hudson.model.Descriptor.PropertyType
 
Field Summary
 
Fields inherited from class hudson.model.Descriptor
clazz
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
CNFileRelease.DescriptorImpl()
           
 
Method Summary
 boolean canInheritAuth()
           
 hudson.util.FormValidation doCollabNetUrlCheck(java.lang.String value)
          Form validation for the CollabNet URL.
 void doGetPackages(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          Gets a list of packages to choose from and write them as a JSON string into the response data.
 void doGetProjects(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          Gets a list of projects to choose from and write them as a JSON string into the response data.
 void doGetReleases(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          Gets a list of releases to choose from and write them as a JSON string into the response data.
 hudson.util.FormValidation doPackageCheck(org.kohsuke.stapler.StaplerRequest req)
          Form validation for package.
 hudson.util.FormValidation doPasswordCheck(org.kohsuke.stapler.StaplerRequest req)
          Check that a password is present and allows login.
 hudson.util.FormValidation doProjectCheck(org.kohsuke.stapler.StaplerRequest req)
          Form validation for the project field.
 hudson.util.FormValidation doReleaseCheck(org.kohsuke.stapler.StaplerRequest req)
          Form validation for release.
 hudson.util.FormValidation doRequiredCheck(java.lang.String value, java.lang.String name)
          Form validation for username.
 hudson.util.FormValidation doUnRequiredInterpretedCheck(java.lang.String value, java.lang.String name)
          Form validation for the file patterns.
 java.lang.String getDisplayName()
           
 java.lang.String getHelpFile()
           
static java.lang.String getHelpUrl()
           
 int getUniqueId()
           
 boolean isApplicable(java.lang.Class<? extends hudson.model.AbstractProject> jobType)
          Allows this plugin to be used as a promotion task.
 CNFileRelease newInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
          Creates a new instance of CNFileRelease from a submitted form.
 
Methods inherited from class hudson.tasks.BuildStepDescriptor
filter
 
Methods inherited from class hudson.model.Descriptor
configure, configure, configure, convert, doHelp, find, find, getCheckUrl, getConfigPage, getGlobalConfigPage, getHelpFile, getJsonSafeClassName, getPropertyType, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstancesFromHeteroList, save, toArray, toList, toMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CNFileRelease.DescriptorImpl

public CNFileRelease.DescriptorImpl()
Method Detail

getUniqueId

public int getUniqueId()
Returns:
a unique integer, used to identify an instance of the File Release plugin on a page.

getDisplayName

public java.lang.String getDisplayName()
Specified by:
getDisplayName in class hudson.model.Descriptor<hudson.tasks.Publisher>
Returns:
string to display for configuration screen.

getHelpUrl

public static java.lang.String getHelpUrl()
Returns:
the url that contains the help files.

getHelpFile

public java.lang.String getHelpFile()
Overrides:
getHelpFile in class hudson.model.Descriptor<hudson.tasks.Publisher>
Returns:
a relative url to the main help file.

canInheritAuth

public boolean canInheritAuth()
Returns:
true if there is auth data that can be inherited.

isApplicable

public boolean isApplicable(java.lang.Class<? extends hudson.model.AbstractProject> jobType)
Allows this plugin to be used as a promotion task.

Specified by:
isApplicable in class hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher>
Parameters:
jobType - a class to check for applicability.
Returns:
true if CNFileRelease is applicable to this job.

newInstance

public CNFileRelease newInstance(org.kohsuke.stapler.StaplerRequest req,
                                 net.sf.json.JSONObject formData)
                          throws hudson.model.Descriptor.FormException
Creates a new instance of CNFileRelease from a submitted form.

Overrides:
newInstance in class hudson.model.Descriptor<hudson.tasks.Publisher>
Parameters:
req - config page parameters.
formData - data specific to this section, in json form.
Returns:
new CNFileRelease object, instantiated from the configuration form vars.
Throws:
FormException
hudson.model.Descriptor.FormException

doCollabNetUrlCheck

public hudson.util.FormValidation doCollabNetUrlCheck(@QueryParameter
                                                      java.lang.String value)
Form validation for the CollabNet URL.

Parameters:
value - url
Returns:
the form validation

doPasswordCheck

public hudson.util.FormValidation doPasswordCheck(org.kohsuke.stapler.StaplerRequest req)
Check that a password is present and allows login.

Parameters:
req - contains parameters from the config.jelly.
Returns:
the form validation

doProjectCheck

public hudson.util.FormValidation doProjectCheck(org.kohsuke.stapler.StaplerRequest req)
Form validation for the project field.

Parameters:
req - contains parameters from the config.jelly.
Returns:
the form validation

doRequiredCheck

public hudson.util.FormValidation doRequiredCheck(@QueryParameter
                                                  java.lang.String value,
                                                  @QueryParameter
                                                  java.lang.String name)
Form validation for username.

Parameters:
value -
name - of field
Returns:
the form validation

doPackageCheck

public hudson.util.FormValidation doPackageCheck(org.kohsuke.stapler.StaplerRequest req)
Form validation for package.

Parameters:
req - StaplerRequest which contains parameters from the config.jelly.
Returns:
the form validation

doReleaseCheck

public hudson.util.FormValidation doReleaseCheck(org.kohsuke.stapler.StaplerRequest req)
Form validation for release.

Parameters:
req - StaplerRequest which contains parameters from the config.jelly.
Returns:
the form validation

doUnRequiredInterpretedCheck

public hudson.util.FormValidation doUnRequiredInterpretedCheck(@QueryParameter
                                                               java.lang.String value,
                                                               @QueryParameter
                                                               java.lang.String name)
Form validation for the file patterns.

Parameters:
value -
name - of field
Returns:
the form validation

doGetProjects

public void doGetProjects(org.kohsuke.stapler.StaplerRequest req,
                          org.kohsuke.stapler.StaplerResponse rsp)
                   throws java.io.IOException
Gets a list of projects to choose from and write them as a JSON string into the response data.

Parameters:
req - contains parameters from the config.jelly.
rsp - http response data.
Throws:
java.io.IOException

doGetPackages

public void doGetPackages(org.kohsuke.stapler.StaplerRequest req,
                          org.kohsuke.stapler.StaplerResponse rsp)
                   throws java.io.IOException
Gets a list of packages to choose from and write them as a JSON string into the response data.

Parameters:
req - contains parameters from the config.jelly.
rsp - http response data.
Throws:
java.io.IOException

doGetReleases

public void doGetReleases(org.kohsuke.stapler.StaplerRequest req,
                          org.kohsuke.stapler.StaplerResponse rsp)
                   throws java.io.IOException
Gets a list of releases to choose from and write them as a JSON string into the response data.

Parameters:
req - contains parameters from the config.jelly.
rsp - http response data.
Throws:
java.io.IOException


Copyright © 2010. All Rights Reserved.