org.codehaus.cargo.module.application
Class DefaultEarArchive

java.lang.Object
  extended byorg.codehaus.cargo.module.DefaultJarArchive
      extended byorg.codehaus.cargo.module.application.DefaultEarArchive
All Implemented Interfaces:
EarArchive, JarArchive

public class DefaultEarArchive
extends DefaultJarArchive
implements EarArchive

Encapsulates access to an EAR.

Version:
$Id: DefaultEarArchive.java 1158 2006-07-29 10:55:48Z vmassol $

Constructor Summary
DefaultEarArchive(java.io.InputStream inputStream)
          Constructor.
DefaultEarArchive(java.lang.String file)
          {@inheritDoc}
 
Method Summary
 ApplicationXml getApplicationXml()
          Returns the deployment descriptor of the web application.
 EjbArchive getEjbModule(java.lang.String uri)
          Returns the ejb archive stored in the EAR with the specified URI.
 WarArchive getWebModule(java.lang.String uri)
          Returns the web-app archive stored in the EAR with the specified URI.
 
Methods inherited from class org.codehaus.cargo.module.DefaultJarArchive
containsClass, expandToPath, findResource, getContentAsStream, getFileHandler, getResource, getResources, setFileHandler, streamToByteArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.codehaus.cargo.module.JarArchive
containsClass, expandToPath, findResource, getResource, getResources
 

Constructor Detail

DefaultEarArchive

public DefaultEarArchive(java.lang.String file)
{@inheritDoc}

See Also:
DefaultJarArchive.DefaultJarArchive(String)

DefaultEarArchive

public DefaultEarArchive(java.io.InputStream inputStream)
                  throws java.io.IOException
Constructor.

Parameters:
inputStream - 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.

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

getWebModule

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

Specified by:
getWebModule in interface EarArchive
Parameters:
uri - 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
See Also:
EarArchive.getWebModule(String)

getEjbModule

public final EjbArchive getEjbModule(java.lang.String uri)
                              throws java.io.IOException
Returns the ejb archive stored in the EAR with the specified URI.

Specified by:
getEjbModule in interface EarArchive
Parameters:
uri - The URI of the ejb module
Returns:
The ejb 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 EJB
See Also:
EarArchive.getWebModule(String)


Copyright © 2004-2007 Codehaus. All Rights Reserved.