hudson.util
Class FormFieldValidator.URLCheck

java.lang.Object
  extended by hudson.util.FormFieldValidator
      extended by 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


Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.util.FormFieldValidator
FormFieldValidator.Base64, FormFieldValidator.Executable, FormFieldValidator.HudsonURL, FormFieldValidator.NonNegativeInteger, FormFieldValidator.URLCheck, FormFieldValidator.WorkspaceDirectory, FormFieldValidator.WorkspaceFileMask, FormFieldValidator.WorkspaceFilePath
 
Field Summary
 
Fields inherited from class hudson.util.FormFieldValidator
CHECK, permission, request, response, subject
 
Constructor Summary
FormFieldValidator.URLCheck(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Deprecated.  
 
Method Summary
protected  boolean findText(BufferedReader in, String literal)
          Deprecated. Finds the string literal from the given reader.
protected  void handleIOException(String url, IOException e)
          Deprecated. Calls the FormFieldValidator.error(String) method with a reasonable error message.
protected  BufferedReader open(URL url)
          Deprecated. Opens the given URL and reads text content from it.
 
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
 

Constructor Detail

FormFieldValidator.URLCheck

public FormFieldValidator.URLCheck(org.kohsuke.stapler.StaplerRequest request,
                                   org.kohsuke.stapler.StaplerResponse response)
Deprecated. 
Method Detail

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.