org.owasp.validator.html.model
Class Property

java.lang.Object
  extended by org.owasp.validator.html.model.Property

public class Property
extends java.lang.Object

A model for CSS properties and the "rules" they must follow (either literals or regular expressions) in order to be considered valid.

Author:
Jason Li

Constructor Summary
Property(java.lang.String name)
           
 
Method Summary
 void addAllowedRegExp(java.util.regex.Pattern safeRegExpValue)
          Add the specified value to the allowed list of valid regular expressions.
 void addAllowedValue(java.lang.String safeValue)
          Add the specified value to the allowed list of valid values.
 void addShorthandRef(java.lang.String shorthandValue)
          Add the specified value to the allowed list of valid shorthand values.
 java.util.List getAllowedRegExp()
          Return a List of allowed regular expressions as added by the addAllowedRegExp() method.
 java.util.List getAllowedValues()
           
 java.lang.String getDescription()
           
 java.lang.String getName()
           
 java.lang.String getOnInvalid()
           
 java.util.List getShorthandRefs()
           
 void setAllowedRegExp(java.util.List allowedRegExp)
          Set a new List of allowed regular expressions.
 void setAllowedValues(java.util.List allowedValues)
          Set a new List of allowed literal values.
 void setDescription(java.lang.String description)
           
 void setOnInvalid(java.lang.String onInvalid)
           
 void setShorthandRefs(java.util.List shorthandRefs)
          Set a new List of allowed shorthand references.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Property

public Property(java.lang.String name)
Method Detail

addAllowedValue

public void addAllowedValue(java.lang.String safeValue)
Add the specified value to the allowed list of valid values.

Parameters:
safeValue - The new valid value to add to the list.

addAllowedRegExp

public void addAllowedRegExp(java.util.regex.Pattern safeRegExpValue)
Add the specified value to the allowed list of valid regular expressions.

Parameters:
safeRegExpValue - The new valid regular expression to add to the list.

addShorthandRef

public void addShorthandRef(java.lang.String shorthandValue)
Add the specified value to the allowed list of valid shorthand values.

Parameters:
shorthandValue - The new valid shorthand value to add to the list.

getAllowedRegExp

public java.util.List getAllowedRegExp()
Return a List of allowed regular expressions as added by the addAllowedRegExp() method.

Returns:
A List of allowed regular expressions.

setAllowedRegExp

public void setAllowedRegExp(java.util.List allowedRegExp)
Set a new List of allowed regular expressions.

Parameters:
allowedRegExp - The new List of allowed regular expressions.

getAllowedValues

public java.util.List getAllowedValues()
Returns:
A List of allowed literal values.

setAllowedValues

public void setAllowedValues(java.util.List allowedValues)
Set a new List of allowed literal values.

Parameters:
allowedValues - The new List of allowed literal values.

getShorthandRefs

public java.util.List getShorthandRefs()
Returns:
A List of allowed shorthand references.

setShorthandRefs

public void setShorthandRefs(java.util.List shorthandRefs)
Set a new List of allowed shorthand references.

Parameters:
shorthandRefs - The new List of allowed shorthand references.

getName

public java.lang.String getName()
Returns:
The name of the property.

getOnInvalid

public java.lang.String getOnInvalid()
Returns:
The onInvalid action associated with the Property.

setOnInvalid

public void setOnInvalid(java.lang.String onInvalid)
Parameters:
onInvalid - The new onInvalid action to define for this property.

getDescription

public java.lang.String getDescription()
Returns:
The description associated with this Property.

setDescription

public void setDescription(java.lang.String description)
Parameters:
description - The new description of this Property.


Copyright © 2010 The Open Web Application Security Project (OWASP). All Rights Reserved.