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

java.lang.Object
  extended byorg.apache.cactus.integration.ant.deployment.DefaultJarArchive
      extended byorg.apache.cactus.integration.ant.deployment.DefaultWarArchive
All Implemented Interfaces:
JarArchive, WarArchive

public class DefaultWarArchive
extends DefaultJarArchive
implements WarArchive

Class that encapsulates access to a WAR.

Since:
Cactus 1.5
Version:
$Id: DefaultWarArchive.java,v 1.1.2.1 2003/10/25 17:22:05 vmassol Exp $
Author:
Christopher Lenz, Vincent Massol

Constructor Summary
DefaultWarArchive(java.io.File theFile)
          Constructor.
DefaultWarArchive(java.io.InputStream theInputStream)
          Constructor.
 
Method Summary
 boolean containsClass(java.lang.String theClassName)
          Returns whether a class of the specified name is contained in the web-app archive, either directly in WEB-INF/classes, or in one of the JARs in WEB-INF/lib.
 WebXml getWebXml()
          Returns the deployment descriptor of the web application.
 
Methods inherited from class org.apache.cactus.integration.ant.deployment.DefaultJarArchive
findResource, getResource, getResources
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cactus.integration.ant.deployment.JarArchive
findResource, getResource, getResources
 

Constructor Detail

DefaultWarArchive

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

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

DefaultWarArchive

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

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

getWebXml

public final WebXml getWebXml()
                       throws java.io.IOException,
                              org.xml.sax.SAXException,
                              javax.xml.parsers.ParserConfigurationException
Description copied from interface: WarArchive
Returns the deployment descriptor of the web application.

Specified by:
getWebXml in interface WarArchive
Returns:
The parsed deployment descriptor
Throws:
javax.xml.parsers.ParserConfigurationException - If there is an XML parser configration problem
org.xml.sax.SAXException - If the deployment descriptor of the WAR could not be parsed
java.io.IOException - If there was a problem reading the deployment descriptor in the WAR
See Also:
WarArchive.getWebXml()

containsClass

public final boolean containsClass(java.lang.String theClassName)
                            throws java.io.IOException
Returns whether a class of the specified name is contained in the web-app archive, either directly in WEB-INF/classes, or in one of the JARs in WEB-INF/lib.

Specified by:
containsClass in interface JarArchive
Overrides:
containsClass in class DefaultJarArchive
Parameters:
theClassName - The name of the class to search for
Returns:
Whether the class was found in the archive
Throws:
java.io.IOException - If an I/O error occurred reading the archive
See Also:
JarArchive.containsClass(String)


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