org.jboss.seam.text
public static interface SeamTextParser.Sanitizer
Modifier and Type | Method and Description |
---|---|
String |
getInvalidAttributeMessage(String elementName,
String attributeName) |
String |
getInvalidAttributeValueMessage(String elementName,
String attributeName,
String value) |
String |
getInvalidElementMessage(String elementName) |
String |
getInvalidURIMessage(String uri) |
void |
validateHtmlAttribute(antlr.Token element,
antlr.Token attribute)
Called by the SeamTextParser when a plain HTML attribute is parsed.
|
void |
validateHtmlAttributeValue(antlr.Token element,
antlr.Token attribute,
String attributeValue)
Called by the SeamTextParser when a plain HTML attribute value is parsed.
|
void |
validateHtmlElement(antlr.Token element)
Called by the SeamTextParser when a plain HTML element is parsed.
|
void |
validateLinkTagURI(antlr.Token element,
String uri)
Called by the SeamTextParser when a link tag is parsed, i.e.
|
void validateLinkTagURI(antlr.Token element, String uri) throws antlr.SemanticException
element
- the token of the parse tree, here the ">" symbol which comes after the "="uri
- the user-entered link textantlr.SemanticException
- thrown if the URI is not syntactically or semantically validvoid validateHtmlElement(antlr.Token element) throws antlr.SemanticException
element
- the token of the parse tree, call getText() to access the HTML tag nameantlr.SemanticException
- thrown when the HTML tag is not validvoid validateHtmlAttribute(antlr.Token element, antlr.Token attribute) throws antlr.SemanticException
element
- the token of the parse tree that represents the HTML tagattribute
- the token of the parse tree that represents the HTML attributeantlr.SemanticException
- thrown if the attribute is not valid for the given HTML tagvoid validateHtmlAttributeValue(antlr.Token element, antlr.Token attribute, String attributeValue) throws antlr.SemanticException
element
- the token of the parse tree that represents the HTML tagattribute
- the token of the parse tree that represents the HTML attributeattributeValue
- the plain string value of the HTML attributeantlr.SemanticException
- thrown if the attribute value is not valid for the given HTML attribute and elementString getInvalidAttributeMessage(String elementName, String attributeName)
Copyright © 2015 Seam Framework. All Rights Reserved.