public class EarUtils
extends java.lang.Object
| Constructor and Description |
|---|
EarUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
deleteDirTree(java.io.File dir)
Delete the directory tree speicfied by a File.
|
static void |
deleteDirTree(java.lang.String dir)
Delete the directory tree specified.
|
static void |
extractArchive(org.eclipse.jst.j2ee.commonarchivecore.internal.Archive arc,
java.lang.String dirName,
boolean bCleanup,
int options) |
static void |
extractEar(com.ibm.etools.commonarchive.EARFile earFile,
java.lang.String dirName,
boolean bCleanup)
Save this EAR file as a directory using the specified uri.
|
static void |
extractEar(com.ibm.etools.commonarchive.EARFile earFile,
java.lang.String dirName,
boolean bCleanup,
int options) |
static void |
extractEar(com.ibm.etools.commonarchive.EARFile earFile,
java.lang.String dirName,
boolean bCleanup,
int options,
java.util.Set<java.lang.String> expandOverrides)
Save this EAR file as a directory using the specified uri.
|
static int |
getAppVersionForDeployment(com.ibm.etools.commonarchive.EARFile ear)
Returns the application version contained in the deployment descriptor of the EAR.
|
static org.eclipse.jst.j2ee.commonarchivecore.internal.Archive |
getArchive(java.lang.String filePath,
boolean useReflection,
boolean isReadOnly) |
static com.ibm.etools.commonarchive.EARFile |
getEarFile(java.lang.String filePath,
boolean useReflection)
Opens an EAR file in read/write mode.
|
static com.ibm.etools.commonarchive.EARFile |
getEarFile(java.lang.String filePath,
boolean useReflection,
boolean isReadOnly)
Opens an EAR file in read only or read/write mode.
|
static int |
getLowestNodeVersionForModule(org.eclipse.jst.j2ee.application.Module module)
Returns the lowest node version for the module.
|
public static com.ibm.etools.commonarchive.EARFile getEarFile(java.lang.String filePath,
boolean useReflection)
throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException
filePath - - Absolute path to the EAR file.useReflection - - Indicator for whether auto java reflection should be turned on in the archive.org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureExceptionpublic static com.ibm.etools.commonarchive.EARFile getEarFile(java.lang.String filePath,
boolean useReflection,
boolean isReadOnly)
throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException
filePath - - Absolute path to the EAR file.useReflection - - Indicator for whether auto java reflection should be turned on in the archive.isReadOnly - - When true the EAR file is opened in read only mode.org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureExceptionpublic static org.eclipse.jst.j2ee.commonarchivecore.internal.Archive getArchive(java.lang.String filePath,
boolean useReflection,
boolean isReadOnly)
throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureExceptionpublic static void extractEar(com.ibm.etools.commonarchive.EARFile earFile,
java.lang.String dirName,
boolean bCleanup)
throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException,
java.io.IOException
earFile - EAR file to be extracted.dirName - Directory to extract the EAR file into.bCleanup - If directory tree exist then delete the tree before extractingorg.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureExceptionjava.io.IOExceptionpublic static void extractEar(com.ibm.etools.commonarchive.EARFile earFile,
java.lang.String dirName,
boolean bCleanup,
int options)
throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException,
java.io.IOException
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureExceptionjava.io.IOExceptionpublic static void extractEar(com.ibm.etools.commonarchive.EARFile earFile,
java.lang.String dirName,
boolean bCleanup,
int options,
java.util.Set<java.lang.String> expandOverrides)
throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException,
java.io.IOException
earFile - EAR file to be extracted.dirName - Directory to extract the EAR file into.bCleanup - If directory tree exist then delete the tree before extractingoptions - - The Archive class contains the follow constants that can be ORed to together.
EXPAND_NONE
EXPAND_WAR_FILES
EXPAND_EJBJAR_FILES
EXPAND_APPCLIENT_FILES
EXPAND_ARCHIVES
EXPAND_RAR_FILES
EXPAND_ALLexpandOverrides - Full relative URI values of locations which must be saved as directories.org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureExceptionjava.io.IOExceptionpublic static void extractArchive(org.eclipse.jst.j2ee.commonarchivecore.internal.Archive arc,
java.lang.String dirName,
boolean bCleanup,
int options)
throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException,
java.io.IOException
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureExceptionjava.io.IOExceptionpublic static void deleteDirTree(java.lang.String dir)
throws java.io.IOException
dir - - Absolute path of directory to delete.java.io.IOExceptionpublic static void deleteDirTree(java.io.File dir)
throws java.io.IOException
dir - - A java.io.File which specifies the file to delete.java.io.IOExceptionpublic static int getAppVersionForDeployment(com.ibm.etools.commonarchive.EARFile ear)
ear - - The EAR containing the deployment descriptor.public static int getLowestNodeVersionForModule(org.eclipse.jst.j2ee.application.Module module)
module - - The module to containing the version information