org.apache.cactus.integration.ant.deployment
Class ApplicationXml

java.lang.Object
  extended byorg.apache.cactus.integration.ant.deployment.ApplicationXml

public class ApplicationXml
extends java.lang.Object

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

Since:
Cactus 1.5
Version:
$Id: ApplicationXml.java,v 1.2 2003/05/14 10:58:19 cmlenz Exp $
Author:
Christopher Lenz

Constructor Summary
ApplicationXml(org.w3c.dom.Document theDocument)
          Constructor.
 
Method Summary
 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

ApplicationXml

public ApplicationXml(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()
Returns the DOM document representing the deployment descriptor. The document will contain any modifications made through this instance.

Returns:
The document representing the deploy descriptor

getVersion

public final ApplicationXmlVersion getVersion()
Returns the J2EE API version.

Returns:
The version

getWebModule

public final 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.

Parameters:
theWebUri - The uri of the web module
Returns:
The DOM element representing the filter definition

getWebModuleContextRoot

public final java.lang.String getWebModuleContextRoot(java.lang.String theWebUri)
Returns the context root of the the specified web module.

Parameters:
theWebUri - The uri of the web module
Returns:
The context root of the web module

getWebModuleUris

public final java.util.Iterator getWebModuleUris()
Returns an iterator over the URIs of the web modules defined in the descriptor.

Returns:
An iterator over the URIs of the web modules

getElements

public final java.util.Iterator getElements(ApplicationXmlTag theTag)
Returns an iterator over the elements that match the specified tag.

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


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