Class XMLAppNavBuilder
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.webmethods.caf.faces.bean.nav.xml.XMLAppNavBuilder
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
SAX parser handler which builds an
IAppNavPage
hierarchy
from a sequence of SAX events.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Default character encoding used by the parser.static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected StringBuilder
Buffer to keep values while parsing.protected FacesContext
The context.protected Class<?>
Class name of the page, this must be a sub-class ofXMLAppNavPage
.protected String
Resource bundle location.protected XMLAppNavPage
Root page of the navigation hierarchy.protected Stack<XMLAppNavPage>
Stack
ofXMLAppNavPage
s used while building the hierarchy. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.XMLAppNavBuilder
(FacesContext ctx, String pageClass) Constructor with page Class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) (non-Javadoc)void
(non-Javadoc)void
endElement
(String uri, String localName, String qName) (non-Javadoc)void
(non-Javadoc)void
(non-Javadoc)getRoot()
Gets the currentIAppNavPage
hierarchy root.resolveEntity
(String publicId, String systemId) (non-Javadoc)void
(non-Javadoc)void
startElement
(String uri, String localName, String qName, Attributes attributes) (non-Javadoc)void
(non-Javadoc)Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
ELEMENT_APP_NAV
- See Also:
-
ELEMENT_ID
- See Also:
-
ELEMENT_PAGE
- See Also:
-
ELEMENT_RESOURCE_BUNDLE
- See Also:
-
ELEMENT_RESOURCE_KEY
- See Also:
-
ELEMENT_TITLE
- See Also:
-
ELEMENT_URL
- See Also:
-
DEFAULT_CHARACTER_ENCODING
Default character encoding used by the parser.- See Also:
-
m_buf
Buffer to keep values while parsing. -
m_ctx
The context. -
m_pageClass
Class name of the page, this must be a sub-class ofXMLAppNavPage
. -
m_resourceBundle
Resource bundle location. -
m_root
Root page of the navigation hierarchy. -
m_stack
Stack
ofXMLAppNavPage
s used while building the hierarchy.
-
-
Constructor Details
-
XMLAppNavBuilder
Constructor.- Parameters:
ctx
-FacesContext
-
XMLAppNavBuilder
Constructor with page Class.- Parameters:
ctx
-FacesContext
pageClass
- Class name of the page, this must be a sub-class ofXMLAppNavPage
.
-
-
Method Details
-
resolveEntity
(non-Javadoc)- Specified by:
resolveEntity
in interfaceEntityResolver
- Overrides:
resolveEntity
in classDefaultHandler
- Throws:
SAXException
IOException
- See Also:
-
startDocument
(non-Javadoc)- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classDefaultHandler
- Throws:
SAXException
- See Also:
-
endDocument
(non-Javadoc)- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classDefaultHandler
- Throws:
SAXException
- See Also:
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException (non-Javadoc)- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
- See Also:
-
endElement
(non-Javadoc)- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
- See Also:
-
characters
(non-Javadoc)- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
- See Also:
-
fatalError
(non-Javadoc)- Specified by:
fatalError
in interfaceErrorHandler
- Overrides:
fatalError
in classDefaultHandler
- Throws:
SAXException
- See Also:
-
error
(non-Javadoc)- Specified by:
error
in interfaceErrorHandler
- Overrides:
error
in classDefaultHandler
- Throws:
SAXException
- See Also:
-
warning
(non-Javadoc)- Specified by:
warning
in interfaceErrorHandler
- Overrides:
warning
in classDefaultHandler
- Throws:
SAXException
- See Also:
-
getRoot
Gets the currentIAppNavPage
hierarchy root.
-