org.codehaus.cargo.module.application
Class DefaultEarArchive

java.lang.Object
  extended by org.codehaus.cargo.module.DefaultJarArchive
      extended by org.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 1705 2008-09-02 13:14:55Z adriana $

Constructor Summary
DefaultEarArchive(InputStream inputStream)
          Constructor.
DefaultEarArchive(String file)
          
 
Method Summary
 ApplicationXml getApplicationXml()
          Returns the deployment descriptor of the web application.
 EjbArchive getEjbModule(String uri)
          Returns the ejb archive stored in the EAR with the specified URI.
 WarArchive getWebModule(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, 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, expandToPath, findResource, getResource, getResources
 

Constructor Detail

DefaultEarArchive

public DefaultEarArchive(String file)

See Also:
DefaultJarArchive.DefaultJarArchive(String)

DefaultEarArchive

public DefaultEarArchive(InputStream inputStream)
                  throws IOException
Constructor.

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

getApplicationXml

public final ApplicationXml getApplicationXml()
                                       throws IOException,
                                              org.jdom.JDOMException
Returns the deployment descriptor of the web application.

Specified by:
getApplicationXml in interface EarArchive
Returns:
The parsed deployment descriptor
Throws:
org.jdom.JDOMException
IOException - If there was a problem reading the deployment descriptor in the EAR
See Also:
EarArchive.getApplicationXml()

getWebModule

public final WarArchive getWebModule(String uri)
                              throws 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:
IOException - If there was an errors reading from the EAR or WAR
See Also:
EarArchive.getWebModule(String)

getEjbModule

public final EjbArchive getEjbModule(String uri)
                              throws 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:
IOException - If there was an errors reading from the EAR or EJB
See Also:
EarArchive.getWebModule(String)


Copyright © 2004-2012 Codehaus. All Rights Reserved.