com.izforge.izpack.compiler
Class StdPackager

java.lang.Object
  extended bycom.izforge.izpack.compiler.Packager
      extended bycom.izforge.izpack.compiler.StdPackager
Direct Known Subclasses:
StdKunststoffPackager

public class StdPackager
extends Packager

Standard packager.

Author:
Julien Ponge

Field Summary
protected  java.util.jar.JarOutputStream outJar
          The zipped output stream.
 
Fields inherited from class com.izforge.izpack.compiler.Packager
langpacks, listener, packs, SKELETON_SUBPATH
 
Constructor Summary
StdPackager(java.lang.String outputFilename, PackagerListener plistener)
          The constructor.
 
Method Summary
 void addJarContent(java.lang.String file)
          Adds a jar file content to the installer.
 void addLangPack(java.lang.String iso3, java.io.InputStream input)
          Adds a language pack.
 void addNativeLibrary(java.lang.String name, java.io.InputStream input)
          Adds a native library.
 java.util.zip.ZipOutputStream addPack(int packNumber, java.lang.String name, java.util.List osConstraints, boolean required, java.lang.String description, boolean preselected)
          Adds a pack (the compiler sends the merged data).
 void addPanelClass(java.lang.String classFilename, java.io.InputStream input)
          Adds a panel.
 void addResource(java.lang.String resId, java.io.InputStream input)
          Adds a resource.
 void finish()
          Tells the packager to finish the job (misc writings, cleanups, closings , ...).
 void setGUIPrefs(GUIPrefs prefs)
          Sets the GUI preferences.
 void setInfo(Info info)
          Sets the informations related to this installation.
 void setPanelsOrder(java.util.ArrayList order)
          Sets the panels order.
 void setVariables(java.util.Properties varDef)
          Adds Variable Declaration.
 
Methods inherited from class com.izforge.izpack.compiler.Packager
copyStream, packAdded, sendMsg, sendStart, sendStop, setPackagerListener, writeSkeletonInstaller
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outJar

protected java.util.jar.JarOutputStream outJar
The zipped output stream.

Constructor Detail

StdPackager

public StdPackager(java.lang.String outputFilename,
                   PackagerListener plistener)
            throws java.lang.Exception
The constructor.

Parameters:
outputFilename - The output filename.
plistener - The packager listener.
Throws:
java.lang.Exception - Description of the Exception
Method Detail

addPack

public java.util.zip.ZipOutputStream addPack(int packNumber,
                                             java.lang.String name,
                                             java.util.List osConstraints,
                                             boolean required,
                                             java.lang.String description,
                                             boolean preselected)
                                      throws java.lang.Exception
Adds a pack (the compiler sends the merged data).

Specified by:
addPack in class Packager
Parameters:
packNumber - The pack number.
name - The pack name.
required - Is the pack required ?
osConstraints - The target operation system(s) of this pack.
description - The pack description.
Returns:
Description of the Return Value
Throws:
java.lang.Exception - Description of the Exception

setGUIPrefs

public void setGUIPrefs(GUIPrefs prefs)
                 throws java.lang.Exception
Sets the GUI preferences.

Specified by:
setGUIPrefs in class Packager
Parameters:
prefs - The new gUIPrefs value
Throws:
java.lang.Exception - Description of the Exception

addPanelClass

public void addPanelClass(java.lang.String classFilename,
                          java.io.InputStream input)
                   throws java.lang.Exception
Adds a panel.

Specified by:
addPanelClass in class Packager
Parameters:
classFilename - The class filename.
input - The stream to get the file data from.
Throws:
java.lang.Exception - Description of the Exception

setPanelsOrder

public void setPanelsOrder(java.util.ArrayList order)
                    throws java.lang.Exception
Sets the panels order.

Specified by:
setPanelsOrder in class Packager
Parameters:
order - The ordered list of the panels.
Throws:
java.lang.Exception - Description of the Exception

setInfo

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

Specified by:
setInfo in class Packager
Parameters:
info - The info section.
Throws:
java.lang.Exception - Description of the Exception

setVariables

public void setVariables(java.util.Properties varDef)
                  throws java.lang.Exception
Adds Variable Declaration.

Specified by:
setVariables in class Packager
Parameters:
varDef - The variables definitions.
Throws:
java.lang.Exception - Description of the Exception

addResource

public void addResource(java.lang.String resId,
                        java.io.InputStream input)
                 throws java.lang.Exception
Adds a resource.

Specified by:
addResource in class Packager
Parameters:
resId - The resource Id.
input - The stream to get the data from.
Throws:
java.lang.Exception - Description of the Exception

addNativeLibrary

public void addNativeLibrary(java.lang.String name,
                             java.io.InputStream input)
                      throws java.lang.Exception
Adds a native library.

Specified by:
addNativeLibrary in class Packager
Parameters:
name - The native library name.
input - The stream to get the data from.
Throws:
java.lang.Exception - Description of the Exception

addLangPack

public void addLangPack(java.lang.String iso3,
                        java.io.InputStream input)
                 throws java.lang.Exception
Adds a language pack.

Specified by:
addLangPack in class Packager
Parameters:
iso3 - The ISO3 code.
input - The stream to get the data from.
Throws:
java.lang.Exception - Description of the Exception

addJarContent

public void addJarContent(java.lang.String file)
                   throws java.lang.Exception
Adds a jar file content to the installer.

Specified by:
addJarContent in class Packager
Parameters:
file - The jar filename.
Throws:
java.lang.Exception - Description of the Exception

finish

public void finish()
            throws java.lang.Exception
Tells the packager to finish the job (misc writings, cleanups, closings , ...).

Specified by:
finish in class Packager
Throws:
java.lang.Exception - Description of the Exception