net.databinder.validators
Class URIValidator

java.lang.Object
  extended by org.apache.wicket.validation.validator.AbstractValidator
      extended by net.databinder.validators.URIValidator
All Implemented Interfaces:
java.io.Serializable, org.apache.wicket.IClusterable, org.apache.wicket.validation.INullAcceptingValidator, org.apache.wicket.validation.IValidator

public abstract class URIValidator
extends org.apache.wicket.validation.validator.AbstractValidator

Validate that the input is a particular kind of URI.

Author:
Nathan Hamblen
See Also:
Serialized Form

Constructor Summary
URIValidator()
           
 
Method Summary
static URIValidator FtpScheme()
          Accepts only URIs having an ftp scheme.
static URIValidator HttpScheme()
          Accepts only URIs having an http or https scheme.
protected  void onValidate(org.apache.wicket.validation.IValidatable validatable)
           
abstract  void onValidate(org.apache.wicket.validation.IValidatable formComponent, java.net.URI uri)
           
 
Methods inherited from class org.apache.wicket.validation.validator.AbstractValidator
error, error, error, error, messageModel, resourceKey, resourceKey, validate, validate, validateOnNullValue, variablesMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URIValidator

public URIValidator()
Method Detail

onValidate

protected void onValidate(org.apache.wicket.validation.IValidatable validatable)
Specified by:
onValidate in class org.apache.wicket.validation.validator.AbstractValidator

onValidate

public abstract void onValidate(org.apache.wicket.validation.IValidatable formComponent,
                                java.net.URI uri)

HttpScheme

public static URIValidator HttpScheme()
Accepts only URIs having an http or https scheme.

Returns:
validator for http and https URIs.

FtpScheme

public static URIValidator FtpScheme()
Accepts only URIs having an ftp scheme.

Returns:
validator for ftp URIs.


Copyright © 2005-2008 Nathan Hamblen. All Rights Reserved.