XmlDisassemblerContext Class
- public abstract class XmlDisassemblerContext
extends Object
The XmlDisassemblerContext object represents contextual information needed by the disassembler,
including the source of the xml document, entity and error handlers, and locale information.
It is used in a read-only manner by the disassembler subsystem.
-
Hierarchy
-
Object
XmlDisassemblerContext
-
Direct Known Subclasses
-
PortalXmlDisassemblerContext
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XmlDisassemblerContext
public XmlDisassemblerContext(InputStream
xmlIn)
getDesktopDefinitionId() Method
public abstract DesktopDefinitionId
getDesktopDefinitionId()
throws XmlDisassemblerException
Implementations of this method must return an appropriate id (as specified) for the portal document.
Returns
- A populated, non-null
DesktopDefinitionId
instance capable of uniquely identifying the document
Exceptions
-
XmlDisassemblerException
- Indicates a problem fetching the required id information
getDocument() Method
public Document
getDocument()
throws XmlDisassemblerException
Parse the xml stream. The Document instance is stored locally, so you can later retrieve it by calling
this same method. This method also instantiates the netuixNamespace member.
The resultant XML document be schema-valid for the disassembler to work correctly.
Exceptions
-
XmlDisassemblerException
getDocumentLocale() Method
public abstract Locale
getDocumentLocale()
throws XmlDisassemblerException
Implementations of this method are required to return the Locale
for the document being processed.
Returns
- A non-null
Locale
appropriate for the document being processed
Exceptions
-
XmlDisassemblerException
- Indicates a problem fetching the required locale information
getEntityResolver() Method
public DefaultEntityResolver
getEntityResolver()
getErrorHandler() Method
public NetuixXMLErrorHandler
getErrorHandler()
getNetuixNamespace() Method
public Namespace
getNetuixNamespace()
getWebAppName() Method
public abstract String
getWebAppName()
This method retrieves the name of the current WebApp module for which the .portlet file is deployed.
The name is the deployed name of the module, and is often the name of the WAR file or directory, although
this is not always the case. This name is that name given in config.xml as the Name of the WebAppComponent
element (and thus WebAppComponentMBean's Name attribute). Note that this name is not the
name of the URL context root.
Returns
- The non-null deployed name of the webapp module.
Related Topics
ApplicationHelper.getWebAppName(ServletContext)
getXmlStream() Method
protected InputStream
getXmlStream()
This method should only be called if XmlDisassemblerContext.getDocument()
is overridden. If called after a call to
XmlDisassemblerContext.getDocument()
is made (and if not overridden itself), this method may return an invalid stream or null.
Returns
- The input stream for the XML document to be processed
inspectDocument(Document) Method
protected void inspectDocument(Document
document)
throws XmlDisassemblerException
This method may be optionally overridden by subclasses in order to inspect the document immediately after
processing. This allow the subclass to retrieve information from the document before the disassembly system
begins querying for such information.
Parameters
-
document
- The newly parsed document
Exceptions
-
XmlDisassemblerException
- Indicates a problem fetching information from the document
invalidateXmlStream() Method
protected void invalidateXmlStream()