com.izforge.izpack.compiler
Interface IPackager

All Known Implementing Classes:
MultiVolumePackager, Packager, PackagerBase

public interface IPackager

Interface for all packager implementations

Author:
Dennis Reil,

Method Summary
 void addConfigurationInformation(XMLElement data)
          Adds configuration information to the packager.
 void addCustomJar(CustomData ca, java.net.URL url)
          Add a custom data like custom actions, where order is important.
 void addInstallerRequirements(java.util.List<InstallerRequirement> conditions)
           
 void addJarContent(java.net.URL jarURL)
          Adds a jar file content to the installer.
 void addJarContent(java.net.URL jarURL, java.util.List<java.lang.String> files)
          Adds a jar file content to the installer.
 void addLangPack(java.lang.String iso3, java.net.URL xmlURL, java.net.URL flagURL)
          Adds a language pack.
 void addNativeLibrary(java.lang.String name, java.net.URL url)
          Adds a native library.
 void addNativeUninstallerLibrary(CustomData data)
          Marks a native library to be added to the uninstaller.
 void addPack(PackInfo pack)
          Adds a pack, order is mostly irrelevant.
 void addPanelJar(Panel panel, java.net.URL jarURL)
          Add a panel, where order is important.
 void addResource(java.lang.String resId, java.net.URL url)
          Adds a resource.
 void createInstaller(java.io.File primaryFile)
          Create the installer, beginning with the specified jar.
 PackCompressor getCompressor()
          Returns the current pack compressor
 java.util.Map<java.lang.String,java.util.List<DynamicVariable>> getDynamicVariables()
          Returns a map of dynamically refreshed variables
 PackagerListener getPackagerListener()
          Get the PackagerListener.
 java.util.List<PackInfo> getPacksList()
          Gets the packages list
 java.util.Map<java.lang.String,Condition> getRules()
           
 java.util.Properties getVariables()
          Allows access to add, remove and update the variables for the project, which are maintained in the packager.
 void initPackCompressor(java.lang.String compr_format, int compr_level)
          Initializes a pack compressor if supported by the packager
 void setDynamicVariables(java.util.Map<java.lang.String,java.util.List<DynamicVariable>> dynamicvariables)
           
 void setGUIPrefs(GUIPrefs prefs)
          Sets the GUI preferences.
 void setInfo(Info info)
          Sets the informations related to this installation.
 void setPackagerListener(PackagerListener listener)
          Adds a listener.
 void setRules(java.util.Map<java.lang.String,Condition> rules)
           
 

Method Detail

createInstaller

void createInstaller(java.io.File primaryFile)
                     throws java.lang.Exception
Create the installer, beginning with the specified jar. If the name specified does not end in ".jar", it is appended. If secondary jars are created for packs (if the Info object added has a webDirURL set), they are created in the same directory, named sequentially by inserting ".pack#" (where '#' is the pack number) ".jar" suffix: e.g. "foo.pack1.jar". If any file exists, it is overwritten.

Throws:
java.lang.Exception

getPackagerListener

PackagerListener getPackagerListener()
Get the PackagerListener.

Returns:
the current PackagerListener

setPackagerListener

void setPackagerListener(PackagerListener listener)
Adds a listener.

Parameters:
listener - The listener.

setInfo

void setInfo(Info info)
             throws java.lang.Exception
Sets the informations related to this installation.

Parameters:
info - The info section.
Throws:
java.lang.Exception - Description of the Exception

setGUIPrefs

void setGUIPrefs(GUIPrefs prefs)
Sets the GUI preferences.

Parameters:
prefs - The new gUIPrefs value

getVariables

java.util.Properties getVariables()
Allows access to add, remove and update the variables for the project, which are maintained in the packager.

Returns:
map of variable names to values

addPanelJar

void addPanelJar(Panel panel,
                 java.net.URL jarURL)
Add a panel, where order is important. Only one copy of the class files neeed are inserted in the installer.


addCustomJar

void addCustomJar(CustomData ca,
                  java.net.URL url)
Add a custom data like custom actions, where order is important. Only one copy of the class files neeed are inserted in the installer.

Parameters:
ca - custom action object
url - the URL to include once

addPack

void addPack(PackInfo pack)
Adds a pack, order is mostly irrelevant.

Parameters:
pack - contains all the files and items that go with a pack

getPacksList

java.util.List<PackInfo> getPacksList()
Gets the packages list


addLangPack

void addLangPack(java.lang.String iso3,
                 java.net.URL xmlURL,
                 java.net.URL flagURL)
Adds a language pack.

Parameters:
iso3 - The ISO3 code.
xmlURL - The location of the xml local info
flagURL - The location of the flag image resource

addResource

void addResource(java.lang.String resId,
                 java.net.URL url)
Adds a resource.

Parameters:
resId - The resource Id.
url - The location of the data

addNativeLibrary

void addNativeLibrary(java.lang.String name,
                      java.net.URL url)
                      throws java.lang.Exception
Adds a native library.

Parameters:
name - The native library name.
url - The url to get the data from.
Throws:
java.lang.Exception - Description of the Exception

addJarContent

void addJarContent(java.net.URL jarURL)
Adds a jar file content to the installer. Package structure is maintained. Need mechanism to copy over signed entry information.

Parameters:
jarURL - The url of the jar to add to the installer. We use a URL so the jar may be nested within another.

addJarContent

void addJarContent(java.net.URL jarURL,
                   java.util.List<java.lang.String> files)
Adds a jar file content to the installer. Package structure is maintained. Need mechanism to copy over signed entry information. If the given file list is null the hole contents of the jar file will be copied else only the listed.

Parameters:
jarURL - The url of the jar to add to the installer. We use a URL so the jar may be nested within another.
files - to be copied

addNativeUninstallerLibrary

void addNativeUninstallerLibrary(CustomData data)
Marks a native library to be added to the uninstaller.

Parameters:
data - the describing custom action data object

addInstallerRequirements

void addInstallerRequirements(java.util.List<InstallerRequirement> conditions)

getCompressor

PackCompressor getCompressor()
Returns the current pack compressor

Returns:
Returns the current pack compressor.

initPackCompressor

void initPackCompressor(java.lang.String compr_format,
                        int compr_level)
                        throws CompilerException
Initializes a pack compressor if supported by the packager

Parameters:
compr_format -
compr_level -
Throws:
CompilerException

addConfigurationInformation

void addConfigurationInformation(XMLElement data)
Adds configuration information to the packager.

Parameters:
data - - the xml-element packaging from the install.xml

getRules

java.util.Map<java.lang.String,Condition> getRules()
Returns:
the rules

setRules

void setRules(java.util.Map<java.lang.String,Condition> rules)
Parameters:
rules - the rules to set

getDynamicVariables

java.util.Map<java.lang.String,java.util.List<DynamicVariable>> getDynamicVariables()
Returns a map of dynamically refreshed variables

Returns:
the map

setDynamicVariables

void setDynamicVariables(java.util.Map<java.lang.String,java.util.List<DynamicVariable>> dynamicvariables)
Parameters:
dynamicvariables -