com.sas.taglib.util.validators
Class ADSTagLibraryValidator

com.sas.taglib.util.validators.ADSTagLibraryValidator

public class ADSTagLibraryValidator

Translation-time validator class for a JSP page using the SAS ADS tag library. 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.ADSTagLibraryValidator</validator-class>
 </validator>
 


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
 
Constructor Summary
ADSTagLibraryValidator()
          Default Constructor.
 
Method Summary
 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

RB_KEY

public static final java.lang.String RB_KEY
Static key for referencing the Internationalization Strings for this class

See Also:
Constant Field Values

messageList

protected java.util.ArrayList messageList
Array list of type ValidationMessage for return of validate method.

Constructor Detail

ADSTagLibraryValidator

public ADSTagLibraryValidator()
Default Constructor.

Method Detail

validate

public 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. This will get invoked once per directive in the JSP page. This method will return null if the page is valid; otherwise the method should return an array of ValidationMessage objects. An array of length zero is also interpreted as no errors.

Overrides:
validate in class javax.servlet.jsp.tagext.TagLibraryValidator
Parameters:
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.
Returns:
An array of ValidationMessages. These are the errors which occured on the current JSP page.

validateNode

public 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. Recursively checks the subtags of this Node for validity.

Parameters:
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.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.