hudson.plugins.sitemonitor
Class SiteMonitorDescriptor
java.lang.Object
hudson.model.Descriptor<T>
hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher>
hudson.plugins.sitemonitor.SiteMonitorDescriptor
- All Implemented Interfaces:
- hudson.model.Saveable
@Extension
public class SiteMonitorDescriptor
- extends hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher>
Handles the global and job configuration management.
- Author:
- cliffano, onuba
| Nested classes/interfaces inherited from class hudson.model.Descriptor |
hudson.model.Descriptor.FormException, hudson.model.Descriptor.PropertyType, hudson.model.Descriptor.Self |
| Fields inherited from class hudson.model.Descriptor |
clazz |
| Fields inherited from interface hudson.model.Saveable |
NOOP |
| Methods inherited from class hudson.tasks.BuildStepDescriptor |
filter |
| Methods inherited from class hudson.model.Descriptor |
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, getCheckUrl, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getPossibleViewNames, getPropertyType, getPropertyType, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, 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 |
SiteMonitorDescriptor
public SiteMonitorDescriptor()
- Constructs
SiteMonitorDescriptor.
getDisplayName
public final String getDisplayName()
- Specified by:
getDisplayName in class hudson.model.Descriptor<hudson.tasks.Publisher>
- Returns:
- the plugin's display name, used in the job's build drop down list
isApplicable
public final boolean isApplicable(Class<? extends hudson.model.AbstractProject> clazz)
- Checks whether this descriptor is applicable.
- Specified by:
isApplicable in class hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher>
- Parameters:
clazz - the class
- Returns:
- true
getSuccessResponseCodes
public final List<Integer> getSuccessResponseCodes()
- Returns:
- the success response codes
getSuccessResponseCodesCsv
public final String getSuccessResponseCodesCsv()
- Returns:
- the success response codes in comma-separated value format
getTimeout
public final Integer getTimeout()
- Returns:
- the timeout value in seconds
newInstance
public final hudson.tasks.Publisher newInstance(org.kohsuke.stapler.StaplerRequest request,
net.sf.json.JSONObject json)
- Handles SiteMonitor configuration for each job. Changes to the values are
repercuted to the view-model once save button is clicked
- Overrides:
newInstance in class hudson.model.Descriptor<hudson.tasks.Publisher>
- Parameters:
request - the stapler requestjson - the JSON data containing job configuration values
- Returns:
- the builder with specified sites to be monitored
configure
public final boolean configure(org.kohsuke.stapler.StaplerRequest request,
net.sf.json.JSONObject json)
- Handles SiteMonitor global configuration per Jenkins instance.
- Overrides:
configure in class hudson.model.Descriptor<hudson.tasks.Publisher>
- Parameters:
request - the stapler requestjson - the JSON data containing job configuration values
- Returns:
- true (after configuration is saved)
doCheckUrl
public final hudson.util.FormValidation doCheckUrl(@QueryParameter
String value)
- Parameters:
value - the value to validate
- Returns:
- true if value is a valid URL, false otherwise
doCheckGlobalResponseCodes
public final hudson.util.FormValidation doCheckGlobalResponseCodes(@QueryParameter
String value)
- Parameters:
value - the value to validate
- Returns:
- true if value is a valid comma-separated response codes, false
otherwise
doCheckGlobalTimeout
public final hudson.util.FormValidation doCheckGlobalTimeout(@QueryParameter
String value)
- Parameters:
value - the value to validate
- Returns:
- true if value is a valid timeout, false otherwise
doCheckResponseCodes
public final hudson.util.FormValidation doCheckResponseCodes(@QueryParameter
String value)
- Parameters:
value - the value to validate
- Returns:
- true if value is a valid comma-separated response codes, false
otherwise
doCheckTimeout
public final hudson.util.FormValidation doCheckTimeout(@QueryParameter
String value)
- Parameters:
value - the value to validate
- Returns:
- true if value is a valid timeout, false otherwise
Copyright © 2004-2015. All Rights Reserved.