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

java.lang.Object
  extended byorg.apache.cactus.integration.ant.deployment.JarArchive
      extended byorg.apache.cactus.integration.ant.deployment.EarArchive

public class EarArchive
extends JarArchive

Class that encapsulates access to a enterprise application archive (EAR).

Since:
Cactus 1.5
Version:
$Id: EarArchive.java,v 1.4 2003/06/11 16:18:33 cmlenz Exp $
Author:
Christopher Lenz

Constructor Summary
EarArchive(java.io.File theFile)
          Constructor.
EarArchive(java.io.InputStream theInputStream)
          Constructor.
 
Method Summary
 ApplicationXml getApplicationXml()
          Returns the deployment descriptor of the web application.
 WarArchive getWebModule(java.lang.String theUri)
          Returns the web-app archive stored in the EAR with the specified URI.
 
Methods inherited from class org.apache.cactus.integration.ant.deployment.JarArchive
containsClass, findResource, getResource, getResources
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EarArchive

public EarArchive(java.io.File theFile)
           throws java.io.IOException
Constructor.

Parameters:
theFile - The enterprise application archive
Throws:
java.io.IOException - If there was a problem reading the EAR

EarArchive

public EarArchive(java.io.InputStream theInputStream)
           throws java.io.IOException
Constructor.

Parameters:
theInputStream - The input stream for the enterprise application archive
Throws:
java.io.IOException - If there was a problem reading the EAR
Method Detail

getApplicationXml

public final ApplicationXml getApplicationXml()
                                       throws java.io.IOException,
                                              org.xml.sax.SAXException,
                                              javax.xml.parsers.ParserConfigurationException
Returns the deployment descriptor of the web application.

Returns:
The parsed deployment descriptor
Throws:
java.io.IOException - If there was a problem reading the deployment descriptor in the EAR
org.xml.sax.SAXException - If the deployment descriptor of the EAR could not be parsed
javax.xml.parsers.ParserConfigurationException - If there is an XML parser configration problem

getWebModule

public final WarArchive getWebModule(java.lang.String theUri)
                              throws java.io.IOException
Returns the web-app archive stored in the EAR with the specified URI.

Parameters:
theUri - The URI of the web module
Returns:
The web-app archive, or null if no WAR was found at the specified URI
Throws:
java.io.IOException - If there was an errors reading from the EAR or WAR


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