|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.xsltmp.util.UnArchiverHelper
public class UnArchiverHelper
Gets files from archives.
Maintains a repository of all extracted files in a given directory. The repository is organized by the archive name and the path of the files within the archives.
When a file has already been extracted previously, it is served from the repository and not extracted again.
When it is not present in the repository, extracts it from the archive to the repository based on the requested file path within the archive and then serves it from the repository.
Once a file has been extracted from a given archive, remembers the path of the file within the archive. Subsequent requests for files within the same archive may specify the path relative to the path of the last request.
| Constructor Summary | |
|---|---|
UnArchiverHelper(org.apache.maven.plugin.logging.Log log,
org.apache.maven.project.MavenProject project,
org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager,
String commonExtractDir)
Constructor. |
|
| Method Summary | |
|---|---|
void |
extract(File archive,
String filePath)
Extract a file from an archive. |
org.codehaus.plexus.archiver.manager.ArchiverManager |
getArchiverManager()
|
Map |
getArchiveValidSubdirs()
|
File |
getCommonExtractDir()
|
File |
getFile(File archive,
String filePath)
Get a file from an archive. |
org.apache.maven.plugin.logging.Log |
getLog()
|
org.apache.maven.project.MavenProject |
getProject()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UnArchiverHelper(org.apache.maven.plugin.logging.Log log,
org.apache.maven.project.MavenProject project,
org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager,
String commonExtractDir)
log - Maven logproject - Maven projectarchiverManager - Plexus archiver managercommonExtractDir - The directory of the repository of extracted files| Method Detail |
|---|
public org.apache.maven.plugin.logging.Log getLog()
public org.apache.maven.project.MavenProject getProject()
public org.codehaus.plexus.archiver.manager.ArchiverManager getArchiverManager()
public File getCommonExtractDir()
public Map getArchiveValidSubdirs()
public File getFile(File archive,
String filePath)
archive - The archive filefilePath - Relative path to the file within the archive
public void extract(File archive,
String filePath)
archive - The archive filefilePath - Relative path to the file to be extracted within the archive
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||