it.eng.spagobi.commons.validation
Class SpagoURLValidator

java.lang.Object
  extended by org.apache.commons.validator.UrlValidator
      extended by it.eng.spagobi.commons.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.
 
Fields inherited from class org.apache.commons.validator.UrlValidator
defaultSchemes
 
Constructor Summary
SpagoURLValidator()
           
 
Method Summary
 boolean isValid(java.lang.String value)
          Controls if a String at imput is a valid URL.
protected  boolean isValidPath(java.lang.String path)
          Controls if the input string represents a valid path.
 
Methods inherited from class org.apache.commons.validator.UrlValidator
countToken, isValidAuthority, isValidFragment, isValidQuery, isValidScheme
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

SpagoURLValidator

public SpagoURLValidator()
Method Detail

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.

isValidPath

protected boolean isValidPath(java.lang.String path)
Controls if the input string represents a valid path.

Overrides:
isValidPath in class org.apache.commons.validator.UrlValidator
Parameters:
path - The input string path
Returns:
True if the string represents a valid path, else false