IBM Branch Transformation Toolkit Javadoc

com.ibm.btt.tools.migration.fileimport
Class ImportFromEAR

java.lang.Object
  extended bycom.ibm.btt.tools.migration.fileimport.ImportFromEAR

public class ImportFromEAR
extends java.lang.Object

ImportFromEAR Import the BTT 4.3.x defintion files from an EAR file


Field Summary
(package private)  java.util.Vector definitionFiles
           
protected  java.io.File earFile
           
(package private)  java.lang.String path
           
 
Constructor Summary
ImportFromEAR(java.io.File archive)
          Constructor
ImportFromEAR(java.lang.String archive)
          Constructor
 
Method Summary
protected  java.util.Vector createSelfDefinedOpList()
           
protected  java.util.zip.ZipInputStream find(java.lang.String name)
           
protected  java.util.zip.ZipInputStream find(java.util.zip.ZipInputStream in, java.lang.String name)
           
protected  java.util.Vector findFile(java.util.zip.ZipInputStream in, java.lang.String name, java.lang.String upperPath)
           
protected  java.util.Vector findFileInPath(java.util.zip.ZipInputStream in, java.lang.String pathInfo)
           
protected  void getDefSelfDefFiles(java.lang.String[] copiedFiles, java.lang.String targetLoc)
           
 java.lang.String[] getDseIniListInEAR()
          Retrieve the list of the dse.ini file in the EAR file.
 java.io.File getEarFile()
          Get the ear file instance
protected  java.lang.String getEntityPath()
           
 java.lang.String getTargetPath()
          Get the target path which will place the imported defintion files
protected  void importDefinitionFiles(boolean fromEAR, java.lang.String entityLoc, java.lang.String targetLoc)
           
 void importFromEAR(java.lang.String dseIniFile)
          Import the definition files according to the specified dse.ini file.
protected  void importSelfDefFiles(boolean fromEAR, java.lang.String entityLoc, java.lang.String targetLoc)
           
protected  boolean isArchive(java.lang.String name)
           
protected  boolean isBTTDefFiles(java.lang.String filename)
           
static void main(java.lang.String[] args)
           
protected  void makeDefFileNameList()
           
protected  int read_write(boolean fromEAR, java.lang.String importFile, java.lang.String targetFile)
           
 void resetEarByFile(java.io.File file)
          Reset the ear file instance by File instance
 void resetEarByName(java.lang.String earFileName)
          Reset the ear file instance by EAR file name
 void setEarFile(java.io.File file)
          Set the ear file instance
protected  void setEntityPath(java.lang.String string)
           
 void setTargetPath(java.lang.String string)
          Set the target path which will place the imported defintion files
protected  int writeFile(java.io.InputStream in, java.lang.String targetFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

path

java.lang.String path

earFile

protected java.io.File earFile

definitionFiles

java.util.Vector definitionFiles
Constructor Detail

ImportFromEAR

public ImportFromEAR(java.io.File archive)
Constructor

Parameters:
archive - File instance of an EAR file

ImportFromEAR

public ImportFromEAR(java.lang.String archive)
Constructor

Parameters:
archive - File Name(with the path information) of an EAR file
Method Detail

findFile

protected java.util.Vector findFile(java.util.zip.ZipInputStream in,
                                    java.lang.String name,
                                    java.lang.String upperPath)
                             throws java.lang.Exception
Throws:
java.lang.Exception

findFileInPath

protected java.util.Vector findFileInPath(java.util.zip.ZipInputStream in,
                                          java.lang.String pathInfo)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

find

protected java.util.zip.ZipInputStream find(java.lang.String name)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

find

protected java.util.zip.ZipInputStream find(java.util.zip.ZipInputStream in,
                                            java.lang.String name)
                                     throws java.io.IOException
Throws:
java.io.IOException

getDseIniListInEAR

public java.lang.String[] getDseIniListInEAR()
                                      throws java.lang.Exception
Retrieve the list of the dse.ini file in the EAR file.

Returns:
String[]
Throws:
java.lang.Exception

isBTTDefFiles

protected boolean isBTTDefFiles(java.lang.String filename)

isArchive

protected boolean isArchive(java.lang.String name)

main

public static void main(java.lang.String[] args)

makeDefFileNameList

protected void makeDefFileNameList()

importFromEAR

public void importFromEAR(java.lang.String dseIniFile)
                   throws java.lang.Exception
Import the definition files according to the specified dse.ini file. The dse.ini file contains all of the information about the related definition files of BTT.

Parameters:
dseIniFile -
Throws:
java.lang.Exception

importDefinitionFiles

protected void importDefinitionFiles(boolean fromEAR,
                                     java.lang.String entityLoc,
                                     java.lang.String targetLoc)
                              throws DSEException,
                                     java.lang.Exception
Throws:
DSEException
java.lang.Exception

importSelfDefFiles

protected void importSelfDefFiles(boolean fromEAR,
                                  java.lang.String entityLoc,
                                  java.lang.String targetLoc)
                           throws java.lang.Exception
Throws:
java.lang.Exception

createSelfDefinedOpList

protected java.util.Vector createSelfDefinedOpList()
                                            throws java.io.IOException
Throws:
java.io.IOException

getDefSelfDefFiles

protected void getDefSelfDefFiles(java.lang.String[] copiedFiles,
                                  java.lang.String targetLoc)
                           throws java.lang.Exception
Throws:
java.lang.Exception

read_write

protected int read_write(boolean fromEAR,
                         java.lang.String importFile,
                         java.lang.String targetFile)
                  throws java.lang.Exception
Throws:
java.lang.Exception

writeFile

protected int writeFile(java.io.InputStream in,
                        java.lang.String targetFile)
                 throws java.lang.Exception
Throws:
java.lang.Exception

getEntityPath

protected java.lang.String getEntityPath()

setEntityPath

protected void setEntityPath(java.lang.String string)

getTargetPath

public java.lang.String getTargetPath()
Get the target path which will place the imported defintion files

Returns:
String

setTargetPath

public void setTargetPath(java.lang.String string)
Set the target path which will place the imported defintion files

Parameters:
string -

getEarFile

public java.io.File getEarFile()
Get the ear file instance

Returns:
File the instance of EAR file

setEarFile

public void setEarFile(java.io.File file)
Set the ear file instance

Parameters:
file - the instance of EAR file

resetEarByFile

public void resetEarByFile(java.io.File file)
Reset the ear file instance by File instance

Parameters:
file - the instance of EAR file

resetEarByName

public void resetEarByName(java.lang.String earFileName)
Reset the ear file instance by EAR file name

Parameters:
earFileName - the name of EAR file

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005