|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.taglib.util.validators.CoreTagLibraryValidator
public class CoreTagLibraryValidator
Translation-time validator class for a JSP page using the SAS core tag library. Validation is based on information built from
the CustomTagDoclet tags which are put inside the tag handler classes. Default validation mainly includes checking the subtags
for proper usage. A reference to this class must be set in the tld file to be recognized by the servlet container.
For example:
<validator>
<validator-class>com.sas.taglib.util.validators.CoreTagLibraryValidator</validator-class>
</validator>
ValidationInterface
Field Summary | |
---|---|
protected java.util.ArrayList |
messageList
Array list of type ValidationMessage for return of validate method. |
static java.lang.String |
RB_KEY
Static key for referencing the Internationalization Strings for this class |
protected org.w3c.dom.Document |
subtagXML
The Document class representation of the valid subtags. |
protected java.lang.String |
subtagXMLFile
The xml file listing the valid subtags of all tags in this library. |
Constructor Summary | |
---|---|
CoreTagLibraryValidator()
Default Constructor. |
Method Summary | |
---|---|
boolean |
isValidSubtag(org.w3c.dom.Element tag,
java.lang.String subtag,
java.util.HashSet multipleSet)
Checks if the subtag is a valid subtag of the tag. |
javax.servlet.jsp.tagext.ValidationMessage[] |
validate(java.lang.String prefix,
java.lang.String uri,
javax.servlet.jsp.tagext.PageData pageData)
Overrides the TagLibraryValidator validate method to validate a JSP page. |
void |
validateNode(java.lang.String prefix,
java.lang.String uri,
org.w3c.dom.Node node)
Validates a single node in the JSP page by calling any custom tag validation classes which implement the ValidationInterface. |
Field Detail |
---|
public static final java.lang.String RB_KEY
protected org.w3c.dom.Document subtagXML
protected java.lang.String subtagXMLFile
protected java.util.ArrayList messageList
Constructor Detail |
---|
public CoreTagLibraryValidator()
Method Detail |
---|
public javax.servlet.jsp.tagext.ValidationMessage[] validate(java.lang.String prefix, java.lang.String uri, javax.servlet.jsp.tagext.PageData pageData)
validate
in class javax.servlet.jsp.tagext.TagLibraryValidator
prefix
- The tag prefix used for this tag in the current page.uri
- The uri associated with the tag and prefix.node
- The Node object which contains all the xml document information.
public void validateNode(java.lang.String prefix, java.lang.String uri, org.w3c.dom.Node node)
prefix
- The tag prefix used for this tag in the current page.uri
- The uri associated with the tag and prefix.node
- The Node object which contains all the xml document information.public boolean isValidSubtag(org.w3c.dom.Element tag, java.lang.String subtag, java.util.HashSet multipleSet)
tag
- The Element in the validation xml file.subtag
- The name of the subtag to check against this tag.multipleSet
- The HashSet used to validate subtags that are only allowed once.
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |