it.eng.spagobi.validation
Class SpagoURLValidator
java.lang.Object
org.apache.commons.validator.UrlValidator
it.eng.spagobi.validation.SpagoURLValidator
- All Implemented Interfaces:
- java.io.Serializable
public class SpagoURLValidator
- extends org.apache.commons.validator.UrlValidator
- Author:
- AZ
This class contains code from Jakarta Commons Validator
It'is implemented as a subclass of URLValidator to solve the bugs described in
http://issues.apache.org/bugzilla/attachment.cgi?id=14369 so in Spago Validator we can use SpagoURLValidator to
validate URL
- See Also:
- Serialized Form
Field Summary |
static int |
ALLOW_2_SLASHES
Allow two slashes in the path component of the URL. |
static int |
ALLOW_ALL_SCHEMES
Allows all validly formatted schemes to pass validation instead of supplying a
set of valid schemes. |
static int |
NO_FRAGMENTS
Enabling this options disallows any URL fragments. |
Method Summary |
boolean |
isValid(java.lang.String value)
Controls if a String at imput is a valid URL. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ALLOW_ALL_SCHEMES
public static final int ALLOW_ALL_SCHEMES
- Allows all validly formatted schemes to pass validation instead of supplying a
set of valid schemes.
- See Also:
- Constant Field Values
ALLOW_2_SLASHES
public static final int ALLOW_2_SLASHES
- Allow two slashes in the path component of the URL.
- See Also:
- Constant Field Values
NO_FRAGMENTS
public static final int NO_FRAGMENTS
- Enabling this options disallows any URL fragments.
- See Also:
- Constant Field Values
SpagoURLValidator
public SpagoURLValidator()
isValid
public boolean isValid(java.lang.String value)
- Controls if a String at imput is a valid URL.
- Overrides:
isValid
in class org.apache.commons.validator.UrlValidator
- Parameters:
value
- The input string
- Returns:
- True if the string is a valid URL, else false.