com.webmethods.caf.faces.bean.nav.xml
Class XMLAppNavBuilder

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by com.webmethods.caf.faces.bean.nav.xml.XMLAppNavBuilder
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class XMLAppNavBuilder
extends DefaultHandler

SAX parser handler which builds an IAppNavPage hierarchy from a sequence of SAX events.


Field Summary
static String DEFAULT_CHARACTER_ENCODING
          Default character encoding used by the parser.
protected  StringBuilder m_buf
          Buffer to keep values while parsing.
protected  FacesContext m_ctx
          The context.
protected  Class m_pageClass
          Class name of the page, this must be a sub-class of XMLAppNavPage.
protected  String m_resourceBundle
          Resource bundle location.
protected  XMLAppNavPage m_root
          Root page of the navigation hierarchy.
protected  Stack m_stack
          Stack of XMLAppNavPages used while building the hierarchy.
 
Constructor Summary
XMLAppNavBuilder(FacesContext ctx)
          Constructor.
XMLAppNavBuilder(FacesContext ctx, String pageClass)
          Constructor with page Class.
 
Method Summary
 IAppNavPage getRoot()
          Gets the current IAppNavPage hierarchy root.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CHARACTER_ENCODING

public static final String DEFAULT_CHARACTER_ENCODING
Default character encoding used by the parser.

See Also:
Constant Field Values

m_buf

protected StringBuilder m_buf
Buffer to keep values while parsing.


m_ctx

protected FacesContext m_ctx
The context.


m_pageClass

protected Class m_pageClass
Class name of the page, this must be a sub-class of XMLAppNavPage.


m_resourceBundle

protected String m_resourceBundle
Resource bundle location.


m_root

protected XMLAppNavPage m_root
Root page of the navigation hierarchy.


m_stack

protected Stack m_stack
Stack of XMLAppNavPages used while building the hierarchy.

Constructor Detail

XMLAppNavBuilder

public XMLAppNavBuilder(FacesContext ctx)
Constructor.

Parameters:
ctx - FacesContext

XMLAppNavBuilder

public XMLAppNavBuilder(FacesContext ctx,
                        String pageClass)
Constructor with page Class.

Parameters:
ctx - FacesContext
pageClass - Class name of the page, this must be a sub-class of XMLAppNavPage.
Method Detail

getRoot

public IAppNavPage getRoot()
Gets the current IAppNavPage hierarchy root.