|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.util.FormValidation.URLCheck
public abstract static class FormValidation.URLCheck
Convenient base class for checking the validity of URLs.
This allows the check method to call various utility methods in a concise syntax.
Constructor Summary | |
---|---|
FormValidation.URLCheck()
|
Method Summary | |
---|---|
protected abstract FormValidation |
check()
Implement the actual form validation logic, by using other convenience methosd defined in this class. |
protected boolean |
findText(BufferedReader in,
String literal)
Finds the string literal from the given reader. |
protected FormValidation |
handleIOException(String url,
IOException e)
Calls the FormValidation.error(String) method with a reasonable error message. |
protected BufferedReader |
open(URL url)
Opens the given URL and reads text content from it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FormValidation.URLCheck()
Method Detail |
---|
protected BufferedReader open(URL url) throws IOException
IOException
protected boolean findText(BufferedReader in, String literal) throws IOException
IOException
protected FormValidation handleIOException(String url, IOException e) throws IOException, javax.servlet.ServletException
FormValidation.error(String)
method with a reasonable error message.
Use this method when the open(URL)
or findText(BufferedReader, String)
fails.
url
- Pass in the URL that was connected. Used for error diagnosis.
IOException
javax.servlet.ServletException
protected abstract FormValidation check() throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |