|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.izforge.izpack.compiler.PackagerBase
public abstract class PackagerBase
The packager base class. The packager interface IPackager
is used by the compiler to put files into an installer, and
create the actual installer files. The packager implementation depends on different requirements (e.g. normal packager versus multi volume packager).
This class implements the common used method which can also be overload as needed.
Field Summary | |
---|---|
protected java.util.HashMap<java.io.FilterOutputStream,java.util.HashSet<java.lang.String>> |
alreadyWrittenFiles
Files which are always written into the container file |
protected java.io.File |
baseFile
Base file name of all jar files. |
protected PackCompressor |
compressor
The compression format to be used for pack compression |
protected java.util.List<CustomData> |
customDataList
The ordered custom actions informations. |
protected java.util.Map<java.lang.String,java.util.List<DynamicVariable>> |
dynamicvariables
dynamic variables |
protected GUIPrefs |
guiPrefs
Gui preferences of instatller. |
protected java.util.Set<java.lang.Object[]> |
includedJarURLs
Jar file URLs who's contents will be copied into the installer. |
protected Info |
info
Basic installer info. |
private java.util.List<InstallerRequirement> |
installerrequirements
|
protected java.util.Map<java.lang.String,java.net.URL> |
installerResourceURLMap
The langpack URLs keyed by locale name (e.g. de_CH). |
protected java.util.List<java.lang.String> |
langpackNameList
The ordered langpack locale names. |
protected PackagerListener |
listener
The listeners. |
protected boolean |
packJarsSeparate
Each pack is created in a separte jar if webDirURL is non-null. |
protected java.util.List<PackInfo> |
packsList
The ordered packs informations (as PackInfo objects). |
protected java.util.List<Panel> |
panelList
The ordered panels informations. |
protected java.util.Map<java.lang.String,Condition> |
rules
the conditions |
static java.lang.String |
SKELETON_SUBPATH
Path to the skeleton installer. |
protected java.util.Properties |
variables
The variables used in the project |
Constructor Summary | |
---|---|
PackagerBase()
|
Method Summary | |
---|---|
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. |
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 |
protected void |
sendMsg(java.lang.String job)
Dispatches a message to the listeners. |
protected void |
sendMsg(java.lang.String job,
int priority)
Dispatches a message to the listeners at specified priority. |
protected void |
sendStart()
Dispatches a start event to the listeners. |
protected void |
sendStop()
Dispatches a stop event to the listeners. |
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)
|
protected abstract void |
writeIncludedJars()
|
protected void |
writeInstaller()
|
protected abstract void |
writeInstallerObject(java.lang.String entryName,
java.lang.Object object)
|
protected abstract void |
writeInstallerResources()
|
protected abstract void |
writePacks()
|
protected abstract void |
writeSkeletonInstaller()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.izforge.izpack.compiler.IPackager |
---|
addConfigurationInformation, createInstaller |
Field Detail |
---|
public static final java.lang.String SKELETON_SUBPATH
protected java.io.File baseFile
protected Info info
protected GUIPrefs guiPrefs
protected java.util.Properties variables
protected java.util.List<Panel> panelList
protected java.util.List<PackInfo> packsList
protected java.util.List<java.lang.String> langpackNameList
protected java.util.List<CustomData> customDataList
protected java.util.Map<java.lang.String,java.net.URL> installerResourceURLMap
protected java.util.Map<java.lang.String,Condition> rules
protected java.util.Map<java.lang.String,java.util.List<DynamicVariable>> dynamicvariables
protected java.util.Set<java.lang.Object[]> includedJarURLs
protected boolean packJarsSeparate
protected PackagerListener listener
protected PackCompressor compressor
protected java.util.HashMap<java.io.FilterOutputStream,java.util.HashSet<java.lang.String>> alreadyWrittenFiles
private java.util.List<InstallerRequirement> installerrequirements
Constructor Detail |
---|
public PackagerBase()
Method Detail |
---|
protected void sendMsg(java.lang.String job)
job
- The job description.protected void sendMsg(java.lang.String job, int priority)
job
- The job description.priority
- The message priority.protected void sendStart()
protected void sendStop()
public void addCustomJar(CustomData ca, java.net.URL url)
IPackager
addCustomJar
in interface IPackager
ca
- custom action objecturl
- the URL to include oncepublic void addJarContent(java.net.URL jarURL)
IPackager
addJarContent
in interface IPackager
jarURL
- The url of the jar to add to the installer. We use a URL so the jar may be
nested within another.public void addJarContent(java.net.URL jarURL, java.util.List<java.lang.String> files)
IPackager
addJarContent
in interface IPackager
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 copiedpublic void addLangPack(java.lang.String iso3, java.net.URL xmlURL, java.net.URL flagURL)
IPackager
addLangPack
in interface IPackager
iso3
- The ISO3 code.xmlURL
- The location of the xml local infoflagURL
- The location of the flag image resourcepublic void addNativeLibrary(java.lang.String name, java.net.URL url) throws java.lang.Exception
IPackager
addNativeLibrary
in interface IPackager
name
- The native library name.url
- The url to get the data from.
java.lang.Exception
- Description of the Exceptionpublic void addNativeUninstallerLibrary(CustomData data)
IPackager
addNativeUninstallerLibrary
in interface IPackager
data
- the describing custom action data objectpublic void addPack(PackInfo pack)
IPackager
addPack
in interface IPackager
pack
- contains all the files and items that go with a packpublic void addPanelJar(Panel panel, java.net.URL jarURL)
IPackager
addPanelJar
in interface IPackager
public void addResource(java.lang.String resId, java.net.URL url)
IPackager
addResource
in interface IPackager
resId
- The resource Id.url
- The location of the datapublic PackCompressor getCompressor()
IPackager
getCompressor
in interface IPackager
public PackagerListener getPackagerListener()
IPackager
getPackagerListener
in interface IPackager
public java.util.List<PackInfo> getPacksList()
IPackager
getPacksList
in interface IPackager
public java.util.Properties getVariables()
IPackager
getVariables
in interface IPackager
public void initPackCompressor(java.lang.String compr_format, int compr_level) throws CompilerException
IPackager
initPackCompressor
in interface IPackager
CompilerException
public void setGUIPrefs(GUIPrefs prefs)
IPackager
setGUIPrefs
in interface IPackager
prefs
- The new gUIPrefs valuepublic void setInfo(Info info) throws java.lang.Exception
IPackager
setInfo
in interface IPackager
info
- The info section.
java.lang.Exception
- Description of the Exceptionpublic void setPackagerListener(PackagerListener listener)
IPackager
setPackagerListener
in interface IPackager
listener
- The listener.public java.util.Map<java.lang.String,Condition> getRules()
getRules
in interface IPackager
public void setRules(java.util.Map<java.lang.String,Condition> rules)
setRules
in interface IPackager
rules
- the rules to setprotected void writeInstaller() throws java.lang.Exception
java.lang.Exception
protected abstract void writeInstallerObject(java.lang.String entryName, java.lang.Object object) throws java.io.IOException
java.io.IOException
protected abstract void writeSkeletonInstaller() throws java.io.IOException
java.io.IOException
protected abstract void writeInstallerResources() throws java.io.IOException
java.io.IOException
protected abstract void writeIncludedJars() throws java.io.IOException
java.io.IOException
protected abstract void writePacks() throws java.lang.Exception
java.lang.Exception
public java.util.Map<java.lang.String,java.util.List<DynamicVariable>> getDynamicVariables()
IPackager
getDynamicVariables
in interface IPackager
public void setDynamicVariables(java.util.Map<java.lang.String,java.util.List<DynamicVariable>> dynamicvariables)
setDynamicVariables
in interface IPackager
dynamicvariables
- the dynamicvariables to setpublic void addInstallerRequirements(java.util.List<InstallerRequirement> conditions)
addInstallerRequirements
in interface IPackager
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |