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.
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
ModifierConstructorDescriptionprotected
URLCheck
(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected 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
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
-
Constructor Details
-
URLCheck
protected URLCheck(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) Deprecated.
-
-
Method Details
-
open
Deprecated.Opens the given URL and reads text content from it. This method honors Content-type header.- Throws:
IOException
-
findText
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
-
FormValidation.URLCheck