org.objectweb.jonas.ear.lib
Class EarFileManager
java.lang.Object
|
+--org.objectweb.jonas.ear.lib.EarFileManager
- public class EarFileManager
- extends java.lang.Object
JOnAS Ear File manager.
This class provides a way for managing the EAR files.
- Author:
- Florent Benoit, Ludovic Bert
Method Summary |
static java.lang.String |
fileToTimeStampDir(java.net.URL urlFileName)
Give the unpack destination directory of the specified file. |
protected static boolean |
isUnpackedEar(java.net.URL urlFileName,
java.net.URL urlDirName)
true If an unpacked directory has the same timestamp than the EAR file,
false otherwise. |
static java.net.URL |
unpackEar(java.net.URL urlFileName,
java.net.URL urlDirName)
Unpack the given EAR file to the specified directory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EarFileManager
public EarFileManager()
isUnpackedEar
protected static boolean isUnpackedEar(java.net.URL urlFileName,
java.net.URL urlDirName)
throws EarFileManagerException
- true If an unpacked directory has the same timestamp than the EAR file,
false otherwise.
- Parameters:
urlFileName
- the url of the name of the EAR file (ends with the
.ear extension).urlDirName
- the url of the directory where the file must be unpacked.- Returns:
- true If an unpacked directory has the same timestamp than the
EAR file,
false otherwise.
- Throws:
EarFileManagerException
- if the file doesn't exist
fileToTimeStampDir
public static java.lang.String fileToTimeStampDir(java.net.URL urlFileName)
throws EarFileManagerException
- Give the unpack destination directory of the specified file.
- Parameters:
urlFileName
- the url of the name of the EAR file (ends with the
.ear extension).- Returns:
- the timestamp destination directory of the specified file.
- Throws:
EarFileManagerException
- if we can't get the timestamp.
unpackEar
public static java.net.URL unpackEar(java.net.URL urlFileName,
java.net.URL urlDirName)
throws EarFileManagerException
- Unpack the given EAR file to the specified directory.
- Parameters:
urlFileName
- the url of the name of the EAR file to unpack.urlDirName
- the url of the destination directory where is
unpacked the EAR file.- Returns:
- the url of the unpacked directory
- Throws:
EarFileManagerException
- if we can't unpack the file.