|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.owasp.validator.html.Policy
public class Policy
Policy.java This file holds the model for our policy engine.
| Field Summary | |
|---|---|
static int |
DEFAULT_MAX_INPUT_SIZE
|
| Method Summary | |
|---|---|
String |
getDirective(String name)
Return a directive value based on a lookup name. |
String |
getEntityReferenceCode(String name)
Returns an HTML-entity number. |
Attribute |
getGlobalAttributeByName(String name)
A simple method for returning on of the |
static Policy |
getInstance()
This retrieves a Policy based on a default location ("resources/antisamy.xml") |
static Policy |
getInstance(File file)
This retrieves a Policy based on the File object passed in |
static Policy |
getInstance(String filename)
This retrieves a Policy based on the file name passed in |
Property |
getPropertyByName(String propertyName)
Retrieves a CSS Property from the Policy. |
AntiSamyPattern |
getRegularExpression(String name)
A simple method for returning on of the |
Tag |
getTagByName(String tagName)
Retrieves a Tag from the Policy. |
String[] |
getTags()
Return all the tags accepted by the Policy object. |
static void |
main(String[] args)
Main test unit. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_MAX_INPUT_SIZE
| Method Detail |
|---|
public Tag getTagByName(String tagName)
tagName - The name of the Tag to look up.
public Property getPropertyByName(String propertyName)
propertyName - The name of the CSS Property to look up.
public static Policy getInstance()
throws PolicyException
PolicyException - If the file is not found or there is a problem parsing the file.
public static Policy getInstance(String filename)
throws PolicyException
filename - The path to the XML policy file.
PolicyException - If the file is not found or there is a problem parsing the file.
public static Policy getInstance(File file)
throws PolicyException
file - A File object which contains the XML policy information.
PolicyException - If the file is not found or there is a problem parsing the file.public AntiSamyPattern getRegularExpression(String name)
name - The name of the common regexp we want to look up.
public Attribute getGlobalAttributeByName(String name)
name - The name of the global-attribute we want to look up.
public String getEntityReferenceCode(String name)
name - Return the entity code equivalent when passed the name.
public String[] getTags()
public String getDirective(String name)
public static void main(String[] args)
throws Exception
args -
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||