org.cloudsmith.jenkins.stackhammer.validation
Class ValidationDescriptor

java.lang.Object
  extended by hudson.model.Descriptor<T>
      extended by hudson.tasks.BuildStepDescriptor<T>
          extended by org.cloudsmith.jenkins.stackhammer.common.StackOpDescriptor<hudson.tasks.Builder>
              extended by org.cloudsmith.jenkins.stackhammer.validation.ValidationDescriptor
All Implemented Interfaces:
hudson.model.Saveable

@Extension
public final class ValidationDescriptor
extends StackOpDescriptor<hudson.tasks.Builder>

Descriptor for Validator. Used as a singleton. The class is marked as public so that it can be accessed from views.

See src/main/resources/com/cloudsmith/hammer/jenkins/validation/Validator/*.jelly for the actual HTML fragment for the configuration screen.


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
ValidationDescriptor()
           
 
Method Summary
 boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
           
 hudson.util.FormValidation doCheckMaxTime(String value)
          Performs on-the-fly validation of the form field 'maxTime'.
 hudson.util.FormValidation doCheckPollInterval(String value)
          Performs on-the-fly validation of the form field 'pollInterval'.
 hudson.util.FormValidation doCheckServerURL(String value)
          Performs on-the-fly validation of the form field 'serviceURL'.
 String getDisplayName()
          This human readable name is used in the configuration screen.
 Integer getMaxTime()
          This method returns the max time from the global configuration
 Integer getPollInterval()
          This method returns the poll interval from the global configuration
 String getServiceURL()
          This method returns the serviceURL of the global configuration.
 
Methods inherited from class org.cloudsmith.jenkins.stackhammer.common.StackOpDescriptor
doCheckStack, getParameter, isApplicable
 
Methods inherited from class hudson.tasks.BuildStepDescriptor
filter
 
Methods inherited from class hudson.model.Descriptor
calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, getCheckUrl, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getPropertyType, getPropertyType, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, 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
 

Constructor Detail

ValidationDescriptor

public ValidationDescriptor()
Method Detail

configure

public boolean configure(org.kohsuke.stapler.StaplerRequest req,
                         net.sf.json.JSONObject formData)
                  throws hudson.model.Descriptor.FormException
Overrides:
configure in class hudson.model.Descriptor<hudson.tasks.Builder>
Throws:
hudson.model.Descriptor.FormException

doCheckMaxTime

public hudson.util.FormValidation doCheckMaxTime(@QueryParameter
                                                 String value)
                                          throws IOException,
                                                 javax.servlet.ServletException
Performs on-the-fly validation of the form field 'maxTime'.

Parameters:
value - This parameter receives the value that the user has typed.
Returns:
Indicates the outcome of the validation. This is sent to the browser.
Throws:
IOException
javax.servlet.ServletException

doCheckPollInterval

public hudson.util.FormValidation doCheckPollInterval(@QueryParameter
                                                      String value)
                                               throws IOException,
                                                      javax.servlet.ServletException
Performs on-the-fly validation of the form field 'pollInterval'.

Parameters:
value - This parameter receives the value that the user has typed.
Returns:
Indicates the outcome of the validation. This is sent to the browser.
Throws:
IOException
javax.servlet.ServletException

doCheckServerURL

public hudson.util.FormValidation doCheckServerURL(@QueryParameter
                                                   String value)
                                            throws IOException,
                                                   javax.servlet.ServletException
Performs on-the-fly validation of the form field 'serviceURL'.

Parameters:
value - This parameter receives the value that the user has typed.
Returns:
Indicates the outcome of the validation. This is sent to the browser.
Throws:
IOException
javax.servlet.ServletException

getDisplayName

public String getDisplayName()
This human readable name is used in the configuration screen.

Specified by:
getDisplayName in class hudson.model.Descriptor<hudson.tasks.Builder>

getMaxTime

public Integer getMaxTime()
This method returns the max time from the global configuration


getPollInterval

public Integer getPollInterval()
This method returns the poll interval from the global configuration


getServiceURL

public String getServiceURL()
This method returns the serviceURL of the global configuration.



Copyright © 2004-2012. All Rights Reserved.