Package hudson.util
Class FormFieldValidator.URLCheck
- java.lang.Object
-
- hudson.util.FormFieldValidator
-
- hudson.util.FormFieldValidator.URLCheck
-
- Direct Known Subclasses:
FormFieldValidator.HudsonURL
- Enclosing class:
- FormFieldValidator
@Deprecated public abstract static class FormFieldValidator.URLCheck extends FormFieldValidator
Deprecated.as of 1.294 UseFormValidation.URLCheck
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
Constructors Modifier Constructor Description protected
URLCheck(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description 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 theFormFieldValidator.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
-
-
-
-
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 theFormFieldValidator.error(String)
method with a reasonable error message. Use this method when theopen(URL)
orfindText(BufferedReader, String)
fails.- Parameters:
url
- Pass in the URL that was connected. Used for error diagnosis.- Throws:
IOException
javax.servlet.ServletException
-
-