Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cactus.integration.ant.deployment.application
Class DefaultApplicationXml

    java.lang.Object
      org.apache.cactus.integration.ant.deployment.application.DefaultApplicationXml

All Implemented Interfaces:
  ApplicationXml

public class DefaultApplicationXml
extends java.lang.Object
implements ApplicationXml

Encapsulates the DOM representation of an EAR descriptor (`application.xml`) to provide convenience methods for easy access and manipulation.

Since:
  Cactus 1.5
Version:
  $Id: DefaultApplicationXml.java 239141 2005-02-15 10:31:44Z vmassol $

Constructor Summary
`DefaultApplicationXml(org.w3c.dom.Document theDocument)` Constructor.

Method Summary
`void` | `addElement(ApplicationXmlTag theTag, org.w3c.dom.Element theElement)` Adds an element of the specified tag to the descriptor.
`void` | `addWebModule(java.lang.String theUri, java.lang.String theContext)` Adds a web module to the deployment descriptor
`org.w3c.dom.Document` | `getDocument()` Returns the DOM document representing the deployment descriptor.
`java.util.Iterator` | `getElements(ApplicationXmlTag theTag)` Returns an iterator over the elements that match the specified tag.
`ApplicationXmlVersion` | `getVersion()` Returns the J2EE API version.
`org.w3c.dom.Element` | `getWebModule(java.lang.String theWebUri)` Returns the element that contains the definition of a specific web module, or `null` if a web module with the specified web-uri is not defined.
`java.lang.String` | `getWebModuleContextRoot(java.lang.String theWebUri)` Returns the context root of the the specified web module.
`java.util.Iterator` | `getWebModuleUris()` Returns an iterator over the URIs of the web modules defined in the descriptor.

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

Constructor Detail

### DefaultApplicationXml

    public DefaultApplicationXml(org.w3c.dom.Document theDocument)

  Constructor.

Parameters:
  `theDocument` - The DOM document representing the parsed deployment descriptor

Method Detail

### getDocument

    public final org.w3c.dom.Document getDocument()

  Description copied from interface: `ApplicationXml`
  Returns the DOM document representing the deployment descriptor. The document will contain any modifications made through this instance.

  Specified by:
    `getDocument` in interface `ApplicationXml`
  Returns:
    The document representing the deploy descriptor
  See Also:
    `ApplicationXml.getDocument()`

### getVersion

    public final ApplicationXmlVersion getVersion()

  Description copied from interface: `ApplicationXml`
  Returns the J2EE API version.

  Specified by:
    `getVersion` in interface `ApplicationXml`
  Returns:
    The version
  See Also:
    `ApplicationXml.getVersion()`

### getWebModule

    public final org.w3c.dom.Element getWebModule(java.lang.String theWebUri)

  Description copied from interface: `ApplicationXml`
  Returns the element that contains the definition of a specific web module, or `null` if a web module with the specified web-uri is not defined.

  Specified by:
    `getWebModule` in interface `ApplicationXml`
  Parameters:
    `theWebUri` - The uri of the web module
  Returns:
    The DOM element representing the web module definition
  See Also:
    `ApplicationXml.getWebModule(String)`

### getWebModuleContextRoot

    public final java.lang.String getWebModuleContextRoot(java.lang.String theWebUri)

  Description copied from interface: `ApplicationXml`
  Returns the context root of the the specified web module.

  Specified by:
    `getWebModuleContextRoot` in interface `ApplicationXml`
  Parameters:
    `theWebUri` - The uri of the web module
  Returns:
    The context root of the web module
  See Also:
    `ApplicationXml.getWebModuleContextRoot(String)`

### getWebModuleUris

    public final java.util.Iterator getWebModuleUris()

  Description copied from interface: `ApplicationXml`
  Returns an iterator over the URIs of the web modules defined in the descriptor.

  Specified by:
    `getWebModuleUris` in interface `ApplicationXml`
  Returns:
    An iterator over the URIs of the web modules
  See Also:
    `ApplicationXml.getWebModuleUris()`

### getElements

    public final java.util.Iterator getElements(ApplicationXmlTag theTag)

  Description copied from interface: `ApplicationXml`
  Returns an iterator over the elements that match the specified tag.

  Specified by:
    `getElements` in interface `ApplicationXml`
  Parameters:
    `theTag` - The descriptor tag of which the elements should be returned
  Returns:
    An iterator over the elements matching the tag, in the order they occur in the descriptor
  See Also:
    `ApplicationXml.getElements(ApplicationXmlTag)`

### addWebModule

    public void addWebModule(java.lang.String theUri,
                             java.lang.String theContext)

  Description copied from interface: `ApplicationXml`
  Adds a web module to the deployment descriptor

  Specified by:
    `addWebModule` in interface `ApplicationXml`
  Parameters:
    `theUri` - the uri of the new module
    `theContext` - the context of the new module
  See Also:
    `ApplicationXml.addWebModule(String, String)`

### addElement

    public final void addElement(ApplicationXmlTag theTag,
                                 org.w3c.dom.Element theElement)

  Adds an element of the specified tag to the descriptor.

  Parameters:
    `theTag` - The descriptor tag
    `theElement` - The element to add

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2004 Apache Software Foundation. All Rights Reserved.