|
install4j API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.install4j.api.launcher.Variables
public class Variables
This class provides methods to access compiler and installer variables from your launchers.
Do not use this class in the installer, uninstaller or in a custom installer application, in that case use
the methods in the context
instead.
All methods that access the Java preference store require at least Java 1.4. They do nothing if Java 1.3 is used.
Method Summary | |
---|---|
static java.lang.String |
getCompilerVariable(java.lang.String variableName)
Get the value of a compiler variable. |
static java.lang.Object |
getInstallerVariable(java.lang.String variableName)
Get the value of an installer variable that was saved to the automatically created response file response.varfile. |
static java.util.Map |
getInstallerVariables()
Get a map of installer variables that were saved to the automatically created response file response.varfile. |
static java.util.Map |
loadFromPreferenceStore(boolean userSpecific)
Load installer variables from the preference stores that have been saved by a "Save installer variables to the preference store" action. |
static java.util.Map |
loadFromPreferenceStore(java.lang.String packageName,
boolean userSpecific)
Load installer variables from the preference stores that have been saved by a "Save installer variables to the preference store" action. |
static void |
saveToPreferenceStore(java.util.Map variables,
boolean userSpecific)
Save a map of installer variables to the preference store. |
static void |
saveToPreferenceStore(java.util.Map variables,
java.lang.String packageName,
boolean userSpecific)
Save a map of installer variables to the preference store. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String getCompilerVariable(java.lang.String variableName) throws java.io.IOException
variableName
- the name of the compiler variable
java.io.IOException
- if the installer config file cannot be readpublic static java.util.Map getInstallerVariables() throws java.io.IOException
Context.registerResponseFileVariable(String)
. Variables to which
form components are bound are automatically registered as response file variables.
java.io.IOException
- if the automatically created response file cannot be readpublic static java.lang.Object getInstallerVariable(java.lang.String variableName) throws java.io.IOException
getInstallerVariables()
for more information.
variableName
- the name of the compiler variable
java.io.IOException
- if the automatically created response file cannot be readgetInstallerVariables()
public static java.util.Map loadFromPreferenceStore(boolean userSpecific) throws java.io.IOException
userSpecific
- if the user-specific preference store should be used or not
java.io.IOException
- if the operation fails due to a problem with the backing storepublic static java.util.Map loadFromPreferenceStore(java.lang.String packageName, boolean userSpecific) throws java.io.IOException
packageName
- the package name that was used when saving the installer variables to the preference storeuserSpecific
- if the user-specific preference store should be used or not
java.io.IOException
- if the operation fails due to a problem with the backing storepublic static void saveToPreferenceStore(java.util.Map variables, boolean userSpecific) throws java.io.IOException
loadFromPreferenceStore(boolean)
for the configuration of your application,
you can save changes made in the application back to the preference store with this method. Values that cannot be
decoded as described by Context.registerResponseFileVariable(String)
will be ignored.
Values that are present in the preference store and not in the supplied map will not be deleted.
The package name in the preference store is set to the application ID which is the default save location of the
"Save installer variables to the preference store" action.
variables
- the map with the installer variables as returned by loadFromPreferenceStore (boolean)
userSpecific
- if the user-specific preference store should be used or not
java.io.IOException
- if the operation fails due to a problem with the backing storepublic static void saveToPreferenceStore(java.util.Map variables, java.lang.String packageName, boolean userSpecific) throws java.io.IOException
loadFromPreferenceStore(String, boolean)
for the configuration of your application,
you can save changes made in the application back to the preference store with this method. Values that cannot be
decoded as described by Context.registerResponseFileVariable(String)
will be ignored.
Values that are present in the preference store and not in the supplied map will not be deleted.
variables
- the map with the installer variables as returned by loadFromPreferenceStore (String, boolean)
packageName
- the package name to which the installer variables should be saved in the preference storeuserSpecific
- if the user-specific preference store should be used or not
java.io.IOException
- if the operation fails due to a problem with the backing store
|
install4j API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |