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

java.lang.Object
  extended byorg.apache.cactus.integration.ant.deployment.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,v 1.1.2.1 2003/10/25 17:22:05 vmassol Exp $
Author:
Christopher Lenz, Vincent Massol

Constructor Summary
DefaultApplicationXml(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

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)


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