|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.owasp.validator.css.CssValidator
public class CssValidator
Encapsulates all the neceesary operations for validating individual eleements of a stylesheet (namely: selectors, conditions and properties).
| Constructor Summary | |
|---|---|
CssValidator(Policy policy)
Constructs a validator for CSS selectors, conditions and properties based on the given policy. |
|
| Method Summary | |
|---|---|
boolean |
isValidCondition(String selectorName,
Condition condition,
CleanResults results)
Determines whether the given condition is valid according to this validator's policy. |
boolean |
isValidProperty(String name,
LexicalUnit lu)
Determines whether the given property (both name and value) are valid according to this validator's policy. |
boolean |
isValidSelector(String selectorName,
Selector selector,
CleanResults results)
Determines whether the given selector name is valid according to this validator's policy. |
String |
lexicalValueToString(LexicalUnit lu)
Converts the given lexical unit to a String
representation. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CssValidator(Policy policy)
policy - the policy file to use in this validator| Method Detail |
|---|
public boolean isValidProperty(String name,
LexicalUnit lu)
name - the name of the propertylu - the value of the property
public boolean isValidSelector(String selectorName,
Selector selector,
CleanResults results)
selectorName - the name of the selectorselector - the object representation of the selectorresults - the CleanResults object to add any error
messages to
public boolean isValidCondition(String selectorName,
Condition condition,
CleanResults results)
selectorName - the name of the selector that contains this conditioncondition - the object representation of this conditionresults - the CleanResults object to add any error
messages to
public String lexicalValueToString(LexicalUnit lu)
String
representation. This method does not perform any validation - it is meant
to be used in conjunction with the validator/logging methods.
lu - the lexical unit to convert
String representation of the given lexical unit
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||