Class DefaultEarArchive
- java.lang.Object
-
- org.codehaus.cargo.module.DefaultJarArchive
-
- org.codehaus.cargo.module.application.DefaultEarArchive
-
- All Implemented Interfaces:
EarArchive
,JarArchive
public class DefaultEarArchive extends DefaultJarArchive implements EarArchive
Encapsulates access to an EAR.
-
-
Constructor Summary
Constructors Constructor Description DefaultEarArchive(InputStream inputStream)
Constructor.DefaultEarArchive(String file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, 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(String file)
- See Also:
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 ApplicationXml getApplicationXml() throws IOException, org.jdom2.JDOMException
Returns the deployment descriptor of the web application.- Specified by:
getApplicationXml
in interfaceEarArchive
- Returns:
- The parsed deployment descriptor
- Throws:
IOException
- If there was a problem reading the deployment descriptor in the EARorg.jdom2.JDOMException
- If there is an exception reading the application xml
-
getWebModule
public WarArchive getWebModule(String uri) throws IOException
Returns the web-app archive stored in the EAR with the specified URI.- Specified by:
getWebModule
in interfaceEarArchive
- 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
-
getEjbModule
public EjbArchive getEjbModule(String uri) throws IOException
Returns the ejb archive stored in the EAR with the specified URI.- Specified by:
getEjbModule
in interfaceEarArchive
- 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
-
-