hudson.util
Class FormFieldValidator.URLCheck
java.lang.Object
hudson.util.FormFieldValidator
hudson.util.FormFieldValidator.URLCheck
- Direct Known Subclasses:
- FormFieldValidator.HudsonURL
- Enclosing class:
- FormFieldValidator
Deprecated. as of 1.294
Use FormValidation.URLCheck
public abstract static class FormFieldValidator.URLCheck
- extends FormFieldValidator
Convenient base class for checking the validity of URLs
Constructor Summary |
FormFieldValidator.URLCheck(org.kohsuke.stapler.StaplerRequest request,
org.kohsuke.stapler.StaplerResponse response)
Deprecated. |
Methods inherited from class hudson.util.FormFieldValidator |
check, error, error, errorWithMarkup, getFileParameter, ok, ok, ok, okWithMarkup, process, respond, warning, warning, warningWithMarkup |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FormFieldValidator.URLCheck
public FormFieldValidator.URLCheck(org.kohsuke.stapler.StaplerRequest request,
org.kohsuke.stapler.StaplerResponse response)
- Deprecated.
open
protected BufferedReader open(URL url)
throws IOException
- Deprecated.
- Opens the given URL and reads text content from it.
This method honors Content-type header.
- Throws:
IOException
findText
protected boolean findText(BufferedReader in,
String literal)
throws IOException
- Deprecated.
- Finds the string literal from the given reader.
- Returns:
- true if found, false otherwise.
- Throws:
IOException
handleIOException
protected void handleIOException(String url,
IOException e)
throws IOException,
javax.servlet.ServletException
- Deprecated.
- Calls the
FormFieldValidator.error(String)
method with a reasonable error message.
Use this method when the open(URL)
or findText(BufferedReader, String)
fails.
- Parameters:
url
- Pass in the URL that was connected. Used for error diagnosis.
- Throws:
IOException
javax.servlet.ServletException
Copyright © 2004-2013. All Rights Reserved.