|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.cargo.module.webapp.merge.MergedWarArchive
public class MergedWarArchive
Subclass representing the merged WAR file.
Method Summary | |
---|---|
void |
addProcessor(java.lang.String path,
MergeProcessor merger)
|
boolean |
containsClass(java.lang.String theClassName)
Returns whether a class of the specified name is contained in the archive. |
protected void |
executeMergeProcessors(java.io.File assembleDir)
|
void |
expandToPath(java.lang.String path)
Expand the archive to the specified directory. |
void |
expandToPath(java.lang.String path,
java.io.FileFilter filter)
Expand the archive to the specified directory, filtering out files. |
java.lang.String |
findResource(java.lang.String theName)
Returns the full path of a named resource in the archive. |
protected WarArchive |
firstWarFile()
|
java.io.InputStream |
getResource(java.lang.String thePath)
Returns a resource from the archive as input stream. |
java.util.List |
getResources(java.lang.String thePath)
Returns the list of resources in the specified directory in the archive. |
WebXml |
getWebXml()
Returns the deployment descriptor of the web application. |
WebXmlMerger |
getWebXmlMerger()
Get the web XML merger. |
void |
mergeJarFiles(boolean mergeJarFiles)
Control whether to also merge the JAR files. |
void |
store(java.io.File warFile)
The actual merging takes place on the store() method, which writes combined archive out into the new location. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
protected WarArchive firstWarFile()
public void addProcessor(java.lang.String path, MergeProcessor merger)
path
- in the path to merge tomerger
- in the processor to addpublic WebXmlMerger getWebXmlMerger() throws java.io.IOException, org.jdom.JDOMException
java.io.IOException
- on an IO Exception
org.jdom.JDOMException
- on a XML Parse Exceptionpublic WebXml getWebXml() throws java.io.IOException, org.jdom.JDOMException
getWebXml
in interface WarArchive
org.jdom.JDOMException
java.io.IOException
- If there was a problem reading the deployment descriptor in the WARWarArchive.getWebXml()
protected void executeMergeProcessors(java.io.File assembleDir) throws MergeException, java.io.IOException
assembleDir
- in the directory to output the merge data to
MergeException
- when there is a problem
java.io.IOException
- if an IO exceptionpublic void store(java.io.File warFile) throws MergeException, java.io.IOException, org.jdom.JDOMException
store
in interface WarArchive
warFile
- file to store the war in.
org.jdom.JDOMException
java.io.IOException
- If there was a problem reading the deployment descriptor in the WAR
MergeException
WarArchive.store(java.io.File)
public boolean containsClass(java.lang.String theClassName) throws java.io.IOException
containsClass
in interface JarArchive
theClassName
- The name of the class to search for
java.io.IOException
- If an I/O error occurred reading the archiveJarArchive.containsClass(java.lang.String)
public java.lang.String findResource(java.lang.String theName) throws java.io.IOException
findResource
in interface JarArchive
theName
- The name of the resource
java.io.IOException
- If an I/O error occurred reading the archiveJarArchive.findResource(java.lang.String)
public java.io.InputStream getResource(java.lang.String thePath) throws java.io.IOException
getResource
in interface JarArchive
thePath
- The path to the resource in the archive
null
if the resource was not found in the JAR
java.io.IOException
- If an I/O error occursJarArchive.getResource(java.lang.String)
public java.util.List getResources(java.lang.String thePath) throws java.io.IOException
getResources
in interface JarArchive
thePath
- The directory
java.io.IOException
- If an I/O error occursJarArchive.getResources(java.lang.String)
public void expandToPath(java.lang.String path) throws java.io.IOException
expandToPath
in interface JarArchive
path
- The path to expand to
java.io.IOException
- If an I/O error occursJarArchive.expandToPath(String)
public void expandToPath(java.lang.String path, java.io.FileFilter filter) throws java.io.IOException
expandToPath
in interface JarArchive
path
- The path to expand tofilter
- The filter to use
java.io.IOException
- If an I/O error occursJarArchive.expandToPath(java.lang.String, java.io.FileFilter)
public void mergeJarFiles(boolean mergeJarFiles)
mergeJarFiles
- true if we do (default)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |