HEADER

biouml.model.util
Class ModulePackager


public class ModulePackager

todo comments

Field Summary
 final static StringBMD_FILE_EXTENTION
           
 final static StringINFO_FILENAME
           
 final static StringLICENSE_FILENAME
           
 final static StringMF_MODULE_ACTIVATOR_CLASS
           
 final static StringMF_MODULE_DESCRIPTION
           
 final static StringMF_MODULE_NAME
           
 final static StringMF_MODULE_TYPE_CLASS
           
 final static StringMF_MODULE_VERSION
           

Method Summary
 static voidaddToJar(JarOutputStream jarOutputStream, int excludedPrefixPathSize, File file)
           
 static voidexportModule(Module module, String moduleName, String moduleVersion, String moduleDescription, String filename, FunctionJobControl jobControl, Set excludedNames)
          Export the specified module into distributive file.
 static FileextractFile(File dstDir, String fileName, JarFile moduleFile, JarEntry jarEntry)
           
 static ArrayListgetFiles(File dir, Set excludedNames)
           
 static StringgetModuleAttribute(JarFile jarFile, String attribute)
           
 static FilegetModuleDir(String moduleName)
           
 static ManifestgetModuleManifest(String moduleName)
           
 static voidimportModule(JDialog parentWindow, JarFile moduleFile, CreateDataCollectionController controller)
          Imports BioUML module from module distributive.
 static voidsetProperty(File moduleDir, String filename, String key, String value)
           

Field Detail

BMD_FILE_EXTENTION

public final static String BMD_FILE_EXTENTION

INFO_FILENAME

public final static String INFO_FILENAME

LICENSE_FILENAME

public final static String LICENSE_FILENAME

MF_MODULE_ACTIVATOR_CLASS

public final static String MF_MODULE_ACTIVATOR_CLASS

MF_MODULE_DESCRIPTION

public final static String MF_MODULE_DESCRIPTION

MF_MODULE_NAME

public final static String MF_MODULE_NAME

MF_MODULE_TYPE_CLASS

public final static String MF_MODULE_TYPE_CLASS

MF_MODULE_VERSION

public final static String MF_MODULE_VERSION
Method Detail

addToJar

public static void addToJar(JarOutputStream jarOutputStream, int excludedPrefixPathSize, File file)
throws java.io.IOException

exportModule

public static void exportModule(Module module, String moduleName, String moduleVersion, String moduleDescription, String filename, FunctionJobControl jobControl, Set excludedNames)
Export the specified module into distributive file.
todo comments
pending it is suggested that moduleName, moduleVersion, moduleDescriptor and fileName are not nulls.

extractFile

public static File extractFile(File dstDir, String fileName, JarFile moduleFile, JarEntry jarEntry)
throws java.io.IOException

getFiles

public static ArrayList getFiles(File dir, Set excludedNames)

getModuleAttribute

public static String getModuleAttribute(JarFile jarFile, String attribute)

getModuleDir

public static File getModuleDir(String moduleName)
pending hack version.

getModuleManifest

public static Manifest getModuleManifest(String moduleName)

importModule

public static void importModule(JDialog parentWindow, JarFile moduleFile, CreateDataCollectionController controller)
throws java.lang.Exception
Imports BioUML module from module distributive.
controller controls creating of data collection:
  • responds whether all previous files should be replased by new if imported data collection is already exists
  • provides {@link JobControl}

Implementation notes

Imported data collection is already exists

Here we have only two possibilities: cancel or remove old collection and create new one. We can not replace old data collection files because they can be locked by data collection.

Valid responces of controller are {link CreateDataCollectionController.CANCEL} or {link CreateDataCollectionController.REMOVE_ALL}, otherwise function will throw IllegalArgumentException.

If controller is null and data collection is already exists then function will throw IOException.

moduleFile module distributive file

setProperty

public static void setProperty(File moduleDir, String filename, String key, String value)
throws java.io.IOException

Association Links

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class org.apache.log4j.Category

to Class biouml.model.util.MessageBundle

to Class biouml.model.Module

to Class biouml.model.util.ModuleActivator


FOOTER

BOTTOM