org.apache.myfaces.commons.validator
Class UrlValidator

java.lang.Object
  extended by org.apache.myfaces.commons.validator.ValidatorBase
      extended by org.apache.myfaces.commons.validator.AbstractUrlValidator
          extended by org.apache.myfaces.commons.validator.UrlValidator
All Implemented Interfaces:
java.util.EventListener, javax.faces.component.StateHolder, javax.faces.validator.Validator

public class UrlValidator
extends AbstractUrlValidator


Field Summary
static java.lang.String VALIDATOR_ID
           
 
Fields inherited from class org.apache.myfaces.commons.validator.AbstractUrlValidator
URL_MESSAGE_ID
 
Fields inherited from interface javax.faces.validator.Validator
NOT_IN_RANGE_MESSAGE_ID
 
Constructor Summary
UrlValidator()
           
 
Method Summary
 java.lang.String getSchemes()
          CSV values that indicates the set of schemes to check this url.
 boolean isAllow2Slashes()
          Allow two slashes in the path component of the URL.
 boolean isAllowAllSchemas()
          Allows all validly formatted schemes to pass validation instead of supplying a set of valid schemes.
 void restoreState(javax.faces.context.FacesContext facesContext, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext facesContext)
           
 void setAllow2Slashes(boolean allow2Slashes)
           
 void setAllowAllSchemas(boolean allowAllSchemas)
           
 void setSchemes(java.lang.String schemes)
           
 
Methods inherited from class org.apache.myfaces.commons.validator.AbstractUrlValidator
validate
 
Methods inherited from class org.apache.myfaces.commons.validator.ValidatorBase
getDetailMessage, getFacesContext, getFacesMessage, getMessage, getStringValue, getSummaryMessage, getValueExpression, isTransient, restoreAttachedState, saveAttachedState, setDetailMessage, setMessage, setSummaryMessage, setTransient, setValueExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALIDATOR_ID

public static final java.lang.String VALIDATOR_ID
See Also:
Constant Field Values
Constructor Detail

UrlValidator

public UrlValidator()
Method Detail

getSchemes

public java.lang.String getSchemes()
Description copied from class: AbstractUrlValidator
CSV values that indicates the set of schemes to check this url. If allowAllSchemas = true, the values of this field are ignored. If no schemes are provided, default to this set ("http", "https", "ftp").

Specified by:
getSchemes in class AbstractUrlValidator

setSchemes

public void setSchemes(java.lang.String schemes)
Specified by:
setSchemes in class AbstractUrlValidator

isAllow2Slashes

public boolean isAllow2Slashes()
Description copied from class: AbstractUrlValidator
Allow two slashes in the path component of the URL.

Specified by:
isAllow2Slashes in class AbstractUrlValidator

setAllow2Slashes

public void setAllow2Slashes(boolean allow2Slashes)
Specified by:
setAllow2Slashes in class AbstractUrlValidator

isAllowAllSchemas

public boolean isAllowAllSchemas()
Description copied from class: AbstractUrlValidator
Allows all validly formatted schemes to pass validation instead of supplying a set of valid schemes.

Specified by:
isAllowAllSchemas in class AbstractUrlValidator

setAllowAllSchemas

public void setAllowAllSchemas(boolean allowAllSchemas)
Specified by:
setAllowAllSchemas in class AbstractUrlValidator

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext facesContext)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class ValidatorBase

restoreState

public void restoreState(javax.faces.context.FacesContext facesContext,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class ValidatorBase


Copyright © 2007-2008 The Apache Software Foundation. All Rights Reserved.