com.ibm.websphere.management.application

Class EarUtils

  1. java.lang.Object
  2. extended bycom.ibm.websphere.management.application.EarUtils

  1. public class EarUtils
  2. extends java.lang.Object

Constructor Summary

Constructor and Description
EarUtils()

Method Summary

Modifier and Type Method and Description
  1. static
  2. void
deleteDirTree(java.io.File dir)
Delete the directory tree speicfied by a File.
  1. static
  2. void
deleteDirTree(java.lang.String dir)
Delete the directory tree specified.
  1. static
  2. void
extractArchive(org.eclipse.jst.j2ee.commonarchivecore.internal.Archive arc,java.lang.String dirName,boolean bCleanup,int options)
  1. static
  2. 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.
  1. static
  2. void
extractEar(com.ibm.etools.commonarchive.EARFile earFile,java.lang.String dirName,boolean bCleanup,int options)
  1. static
  2. 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.
  1. static
  2. int
getAppVersionForDeployment(com.ibm.etools.commonarchive.EARFile ear)
Returns the application version contained in the deployment descriptor of the EAR.
  1. static
  2. org.eclipse.jst.j2ee.commonarchivecore.internal.Archive
getArchive(java.lang.String filePath,boolean useReflection,boolean isReadOnly)
  1. static
  2. com.ibm.etools.commonarchive.EARFile
getEarFile(java.lang.String filePath,boolean useReflection)
Opens an EAR file in read/write mode.
  1. static
  2. 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.
  1. static
  2. int
getLowestNodeVersionForModule(org.eclipse.jst.j2ee.application.Module module)
Returns the lowest node version for the module.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

EarUtils

  1. public EarUtils()

Method Detail

getEarFile

  1. public static com.ibm.etools.commonarchive.EARFile getEarFile( java.lang.String filePath,
  2. boolean useReflection)
  3. throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException
Opens an EAR file in read/write mode.
Parameters:
filePath - - Absolute path to the EAR file.
useReflection - - Indicator for whether auto java reflection should be turned on in the archive.
Returns:
EARFile - Opened EAR file.
Throws:
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException

getEarFile

  1. public static com.ibm.etools.commonarchive.EARFile getEarFile( java.lang.String filePath,
  2. boolean useReflection,
  3. boolean isReadOnly)
  4. throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException
Opens an EAR file in read only or read/write mode.
Parameters:
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.
Returns:
EARFile - Opened EAR file.
Throws:
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException

getArchive

  1. public static org.eclipse.jst.j2ee.commonarchivecore.internal.Archive getArchive( java.lang.String filePath,
  2. boolean useReflection,
  3. boolean isReadOnly)
  4. throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException
Throws:
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException

extractEar

  1. public static void extractEar(com.ibm.etools.commonarchive.EARFile earFile,
  2. java.lang.String dirName,
  3. boolean bCleanup)
  4. throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException
  5. java.io.IOException
Save this EAR file as a directory using the specified uri.
Parameters:
earFile - EAR file to be extracted.
dirName - Directory to extract the EAR file into.
bCleanup - If directory tree exist then delete the tree before extracting
Throws:
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException
java.io.IOException

extractEar

  1. public static void extractEar(com.ibm.etools.commonarchive.EARFile earFile,
  2. java.lang.String dirName,
  3. boolean bCleanup,
  4. int options)
  5. throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException
  6. java.io.IOException
Throws:
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException
java.io.IOException

extractEar

  1. public static void extractEar(com.ibm.etools.commonarchive.EARFile earFile,
  2. java.lang.String dirName,
  3. boolean bCleanup,
  4. int options,
  5. java.util.Set<java.lang.String> expandOverrides)
  6. throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException
  7. java.io.IOException
Save this EAR file as a directory using the specified uri.
Parameters:
earFile - EAR file to be extracted.
dirName - Directory to extract the EAR file into.
bCleanup - If directory tree exist then delete the tree before extracting
options - - 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_ALL
expandOverrides - Full relative URI values of locations which must be saved as directories.
Throws:
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException
java.io.IOException

extractArchive

  1. public static void extractArchive( org.eclipse.jst.j2ee.commonarchivecore.internal.Archive arc,
  2. java.lang.String dirName,
  3. boolean bCleanup,
  4. int options)
  5. throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException
  6. java.io.IOException
Throws:
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException
java.io.IOException

deleteDirTree

  1. public static void deleteDirTree( java.lang.String dir)
  2. throws java.io.IOException
Delete the directory tree specified.
Parameters:
dir - - Absolute path of directory to delete.
Throws:
java.io.IOException

deleteDirTree

  1. public static void deleteDirTree( java.io.File dir)
  2. throws java.io.IOException
Delete the directory tree speicfied by a File.
Parameters:
dir - - A java.io.File which specifies the file to delete.
Throws:
java.io.IOException

getAppVersionForDeployment

  1. public static int getAppVersionForDeployment( com.ibm.etools.commonarchive.EARFile ear)
Returns the application version contained in the deployment descriptor of the EAR.
Parameters:
ear - - The EAR containing the deployment descriptor.
Returns:
int - The application version as an int

getLowestNodeVersionForModule

  1. public static int getLowestNodeVersionForModule( org.eclipse.jst.j2ee.application.Module module)
Returns the lowest node version for the module.
Parameters:
module - - The module to containing the version information
Returns:
int - The lowest version found in the module.