|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.izforge.izpack.compiler.Packager
The packager class. A packager is used by the compiler to actually do the packaging job.
Field Summary | |
protected java.util.ArrayList |
langpacks
The langpacks ISO3 names. |
protected PackagerListener |
listener
The listeners. |
protected java.util.ArrayList |
packs
The packs informations. |
static java.lang.String |
SKELETON_SUBPATH
The path to the skeleton installer. |
Constructor Summary | |
Packager()
|
Method Summary | |
abstract void |
addJarContent(java.lang.String file)
Adds a jar file content to the installer. |
abstract void |
addLangPack(java.lang.String iso3,
java.io.InputStream input)
Adds a language pack. |
abstract void |
addNativeLibrary(java.lang.String name,
java.io.InputStream input)
Adds a native library. |
abstract 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). |
abstract void |
addPanelClass(java.lang.String classFilename,
java.io.InputStream input)
Adds a panel. |
abstract void |
addResource(java.lang.String resId,
java.io.InputStream input)
Adds a resource. |
protected long |
copyStream(java.io.InputStream in,
java.io.OutputStream out)
Copies all the data from the specified input stream to the specified output stream. |
abstract void |
finish()
Tells the packager to finish the job (misc writings, cleanups, closings , ...). |
protected void |
packAdded(int number,
long nbytes)
Called by the Compiler when the pack content adding is done. |
protected void |
sendMsg(java.lang.String job)
Dispatches a message to the listeners. |
protected void |
sendStart()
Dispatches a start event to the listeners. |
protected void |
sendStop()
Dispatches a stop event to the listeners. |
abstract void |
setGUIPrefs(GUIPrefs prefs)
Sets the GUI preferences. |
abstract void |
setInfo(Info info)
Sets the informations related to this installation. |
void |
setPackagerListener(PackagerListener listener)
Adds a listener. |
abstract void |
setPanelsOrder(java.util.ArrayList order)
Sets the panels order. |
abstract void |
setVariables(java.util.Properties varDef)
Adds Variable Declaration. |
void |
writeSkeletonInstaller(java.util.jar.JarOutputStream out)
Write the skeleton installer to the output JAR. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String SKELETON_SUBPATH
protected java.util.ArrayList packs
protected java.util.ArrayList langpacks
protected PackagerListener listener
Constructor Detail |
public Packager()
Method Detail |
public void setPackagerListener(PackagerListener listener)
listener
- The listener.protected void sendMsg(java.lang.String job)
job
- The job description.protected void sendStart()
protected void sendStop()
public void writeSkeletonInstaller(java.util.jar.JarOutputStream out) throws java.lang.Exception
java.lang.Exception
public abstract 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
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.
java.lang.Exception
- Description of the Exceptionpublic abstract void addPanelClass(java.lang.String classFilename, java.io.InputStream input) throws java.lang.Exception
classFilename
- The class filename.input
- The stream to get the file data from.
java.lang.Exception
- Description of the Exceptionpublic abstract void setGUIPrefs(GUIPrefs prefs) throws java.lang.Exception
prefs
- The new gUIPrefs value
java.lang.Exception
- Description of the Exceptionpublic abstract void setPanelsOrder(java.util.ArrayList order) throws java.lang.Exception
order
- The ordered list of the panels.
java.lang.Exception
- Description of the Exceptionpublic abstract void setInfo(Info info) throws java.lang.Exception
info
- The info section.
java.lang.Exception
- Description of the Exceptionpublic abstract void setVariables(java.util.Properties varDef) throws java.lang.Exception
varDef
- The variables definitions.
java.lang.Exception
- Description of the Exceptionpublic abstract void addResource(java.lang.String resId, java.io.InputStream input) throws java.lang.Exception
resId
- The resource Id.input
- The stream to get the data from.
java.lang.Exception
- Description of the Exceptionpublic abstract void addLangPack(java.lang.String iso3, java.io.InputStream input) throws java.lang.Exception
iso3
- The ISO3 code.input
- The stream to get the data from.
java.lang.Exception
- Description of the Exceptionpublic abstract void addNativeLibrary(java.lang.String name, java.io.InputStream input) throws java.lang.Exception
name
- The native library name.input
- The stream to get the data from.
java.lang.Exception
- Description of the Exceptionpublic abstract void addJarContent(java.lang.String file) throws java.lang.Exception
file
- The jar filename.
java.lang.Exception
- Description of the Exceptionpublic abstract void finish() throws java.lang.Exception
java.lang.Exception
- Description of the Exceptionprotected long copyStream(java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException
in
- the input stream to readout
- the output stream to write
java.io.IOException
- if an I/O error occursprotected void packAdded(int number, long nbytes)
number
- the pack numbernbytes
- the number of bytes written
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |