Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2004 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.netuix.application.transform.disassembler
Class XmlDisassemblerContext

    java.lang.Object
      com.bea.netuix.application.transform.disassembler.XmlDisassemblerContext

Direct Known Subclasses:
  PortalXmlDisassemblerContext

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.

Constructor Summary
`XmlDisassemblerContext(InputStream xmlIn)`

Method Summary
`abstract DesktopDefinitionId` | `getDesktopDefinitionId()` Implementations of this method must return an appropriate id (as specified) for the portal document.
`Document` | `getDocument()` Parse the xml stream.
`abstract Locale` | `getDocumentLocale()` Implementations of this method are required to return the `Locale` for the document being processed.
`com.bea.p13n.util.DefaultEntityResolver` | `getEntityResolver()`
`com.bea.netuix.xml.util.NetuixXMLErrorHandler` | `getErrorHandler()`
`Namespace` | `getNetuixNamespace()`
`abstract String` | `getWebAppName()` This method retrieves the name of the current WebApp module for which the .portlet file is deployed.
`protected InputStream` | `getXmlStream()` This method should only be called if `getDocument()` is overridden.
`protected void` | `inspectDocument(Document document)` This method may be optionally overridden by subclasses in order to inspect the document immediately after processing.
`protected void` | `invalidateXmlStream()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XmlDisassemblerContext

    public XmlDisassemblerContext(InputStream xmlIn)

Method Detail

### getDesktopDefinitionId

    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
  Throws:
    `XmlDisassemblerException` - Indicates a problem fetching the required id information

### getDocument

    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.

  Throws:
    `XmlDisassemblerException`

### getDocumentLocale

    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
  Throws:
    `XmlDisassemblerException` - Indicates a problem fetching the required locale information

### getEntityResolver

    public com.bea.p13n.util.DefaultEntityResolver getEntityResolver()

### getErrorHandler

    public com.bea.netuix.xml.util.NetuixXMLErrorHandler getErrorHandler()

### getNetuixNamespace

    public Namespace getNetuixNamespace()

### getWebAppName

    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.
  See Also:
    `ApplicationHelper.getWebAppName(javax.servlet.ServletContext)`

### getXmlStream

    protected InputStream getXmlStream()

  This method should only be called if `getDocument()` is overridden. If called after a call to `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

    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
  Throws:
    `XmlDisassemblerException` - Indicates a problem fetching information from the document

### invalidateXmlStream

    protected void invalidateXmlStream()

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2004 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved