public class WarArchiveMerger.MergedWarArchive extends Object implements WarArchive
Modifier and Type | Class and Description |
---|---|
class |
WarArchiveMerger.MergedWarArchive.ArchiveResourceMerger
Class to store merging operations.
|
Modifier and Type | Method and Description |
---|---|
void |
addProcessor(String path,
MergeProcessor merger) |
boolean |
containsClass(String theClassName)
Returns whether a class of the specified name is contained in the archive.
|
protected void |
executeMergeProcessors(File assembleDir) |
void |
expandToPath(String path)
Expand the archive to the specified directory.
|
String |
findResource(String theName)
Returns the full path of a named resource in the archive.
|
protected DefaultWarArchive |
firstWarFile() |
InputStream |
getResource(String thePath)
Returns a resource from the archive as input stream.
|
List |
getResources(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 |
store(File warFile)
Stores the war archive to file.
|
protected DefaultWarArchive firstWarFile()
public void addProcessor(String path, MergeProcessor merger)
path
- in the path to merge tomerger
- in the processor to addpublic WebXmlMerger getWebXmlMerger() throws IOException, SAXException, ParserConfigurationException
IOException
- on an IO ExceptionSAXException
- on a SAX Parse ExceptionParserConfigurationException
- on Parser config exceptionpublic WebXml getWebXml() throws IOException, SAXException, ParserConfigurationException
getWebXml
in interface WarArchive
IOException
- If there was a problem reading the deployment descriptor in the WARSAXException
- If the deployment descriptor of the WAR could not be parsedParserConfigurationException
- If there is an XML parser configuration problemWarArchive.getWebXml()
protected void executeMergeProcessors(File assembleDir) throws MergeException, IOException
assembleDir
- in the directory to output the merge data toMergeException
- when there is a problemIOException
- if an IO exceptionpublic void store(File warFile) throws MergeException, IOException, SAXException, ParserConfigurationException
store
in interface WarArchive
warFile
- file to store the war in.IOException
- If there was a problem reading the deployment descriptor in the WARSAXException
- If the deployment descriptor of the WAR could not be parsedParserConfigurationException
- If there is an XML parser configuration problemMergeException
WarArchive.store(java.io.File)
public boolean containsClass(String theClassName) throws IOException
containsClass
in interface JarArchive
theClassName
- The name of the class to search forIOException
- If an I/O error occurred reading the archiveJarArchive.containsClass(java.lang.String)
public String findResource(String theName) throws IOException
findResource
in interface JarArchive
theName
- The name of the resourceIOException
- If an I/O error occurred reading the archiveJarArchive.findResource(java.lang.String)
public InputStream getResource(String thePath) throws IOException
getResource
in interface JarArchive
thePath
- The path to the resource in the archivenull
if the resource was not found in the JARIOException
- If an I/O error occursJarArchive.getResource(java.lang.String)
public List getResources(String thePath) throws IOException
getResources
in interface JarArchive
thePath
- The directoryIOException
- If an I/O error occursJarArchive.getResources(java.lang.String)
public void expandToPath(String path) throws IOException
expandToPath
in interface JarArchive
path
- The path to expand toIOException
- If an I/O error occursJarArchive.expandToPath(String)
Copyright © 2004-2013 Codehaus. All Rights Reserved.