|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.izforge.izpack.util.OSClassHelper
com.izforge.izpack.util.os.RegistryHandler
This class represents a registry handler in a operating system independent way. OS specific subclasses are used to implement the necessary mapping from this generic API to the classes that reflect the system dependent AIP.
Field Summary | |
private static RegistryHandler |
defaultHandler
|
static java.util.Map |
ROOT_KEY_MAP
|
static java.lang.String |
UNINSTALL_ROOT
|
private static java.lang.String |
UNINSTALLER_ICON
|
protected java.lang.String |
uninstallName
|
Fields inherited from class com.izforge.izpack.util.OSClassHelper |
installdata, worker, workerClass |
Constructor Summary | |
RegistryHandler()
Default constructor. |
|
RegistryHandler(java.lang.String className)
Creates an registry handler which uses an oblect of the given class as worker. |
Method Summary | |
void |
activateLogging()
Activates logging of registry changes. |
void |
addLoggingInfo(java.util.List info)
|
void |
createKey(java.lang.String key)
Creates the given key in the registry. |
void |
deleteKey(java.lang.String key)
Deletes the given key if exist, else throws an exception. |
void |
deleteKeyIfEmpty(java.lang.String key)
Deletes a key under the current root if it is empty, else do nothing. |
void |
deleteValue(java.lang.String key,
java.lang.String value)
Deletes a value. |
boolean |
doPerform()
Returns whether an action with this handler should be performed or not. |
RegistryHandler |
getDefaultHandler()
Returns the default handler which is the first created registry handler. |
java.util.List |
getLoggingInfo()
|
int |
getRoot()
Return the root as integer (HKEY_xxx). |
java.lang.String[] |
getSubkeys(java.lang.String key)
Returns all keys which are defined under the given key. |
java.lang.String |
getUninstallName()
|
RegDataContainer |
getValue(java.lang.String key,
java.lang.String value)
Returns the contents of the key/value pair if value exist, else an exception is raised. |
RegDataContainer |
getValue(java.lang.String key,
java.lang.String value,
RegDataContainer defaultVal)
Returns the contents of the key/value pair if value exist, else the given default value. |
java.lang.String[] |
getValueNames(java.lang.String key)
Returns all value names which are defined under the given key. |
boolean |
isProductRegistered()
|
boolean |
keyExist(java.lang.String key)
Returns whether a key exist or not. |
void |
registerUninstallKey()
|
void |
resetLogging()
Resets logging of registry changes. |
void |
rewind()
|
private void |
setDefault()
Set this object as default handler if it is not done earlier. |
void |
setLoggingInfo(java.util.List info)
|
void |
setRoot(int i)
Sets the root for the next registry access. |
void |
setUninstallName(java.lang.String name)
|
void |
setValue(java.lang.String key,
java.lang.String value,
byte[] contents)
Sets the given contents to the given registry value. |
void |
setValue(java.lang.String key,
java.lang.String value,
long contents)
Sets the given contents to the given registry value. |
void |
setValue(java.lang.String key,
java.lang.String value,
java.lang.String contents)
Sets the given contents to the given registry value. |
void |
setValue(java.lang.String key,
java.lang.String value,
java.lang.String[] contents)
|
void |
suspendLogging()
Suspends logging of registry changes. |
boolean |
valueExist(java.lang.String key,
java.lang.String value)
Returns whether a the given value under the given key exist or not. |
boolean |
verify(AutomatedInstallData idata)
|
Methods inherited from class com.izforge.izpack.util.OSClassHelper |
good |
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 UNINSTALL_ROOT
public static final java.util.Map ROOT_KEY_MAP
protected java.lang.String uninstallName
private static final java.lang.String UNINSTALLER_ICON
private static RegistryHandler defaultHandler
Constructor Detail |
public RegistryHandler()
public RegistryHandler(java.lang.String className)
className
- full qualified class name of the class which should be used as workerMethod Detail |
private void setDefault()
public void setValue(java.lang.String key, java.lang.String value, java.lang.String contents) throws NativeLibException
key
- the registry key which should be used or createdvalue
- the registry value into which the contents should be setcontents
- the contents for the value
NativeLibException
public void setValue(java.lang.String key, java.lang.String value, java.lang.String[] contents) throws NativeLibException
NativeLibException
public void setValue(java.lang.String key, java.lang.String value, byte[] contents) throws NativeLibException
key
- the registry key which should be used or createdvalue
- the registry value into which the contents should be setcontents
- the contents for the value
NativeLibException
public void setValue(java.lang.String key, java.lang.String value, long contents) throws NativeLibException
key
- the registry key which should be used or createdvalue
- the registry value into which the contents should be setcontents
- the contents for the value
NativeLibException
public RegDataContainer getValue(java.lang.String key, java.lang.String value, RegDataContainer defaultVal) throws NativeLibException
key
- the registry key which should be usedvalue
- the registry value from which the contents should be requesteddefaultVal
- value to be used if no value exist in the registry
NativeLibException
public boolean keyExist(java.lang.String key) throws NativeLibException
key
- key to be evaluated
NativeLibException
public boolean valueExist(java.lang.String key, java.lang.String value) throws NativeLibException
key
- key to be used as path for the valuevalue
- value name to be evaluated
NativeLibException
public java.lang.String[] getSubkeys(java.lang.String key) throws NativeLibException
key
- key to be used as path for the sub keys
NativeLibException
public java.lang.String[] getValueNames(java.lang.String key) throws NativeLibException
key
- key to be used as path for the value names
NativeLibException
public RegDataContainer getValue(java.lang.String key, java.lang.String value) throws NativeLibException
key
- the registry key which should be usedvalue
- the registry value from which the contents should be requested
NativeLibException
public void createKey(java.lang.String key) throws NativeLibException
key
- key to be created
NativeLibException
public void deleteKey(java.lang.String key) throws NativeLibException
key
- key to be deleted
NativeLibException
public void deleteKeyIfEmpty(java.lang.String key) throws NativeLibException
key
- key to be deleted
NativeLibException
public void deleteValue(java.lang.String key, java.lang.String value) throws NativeLibException
key
- key of the value which should be deletedvalue
- value name to be deleted
NativeLibException
public void setRoot(int i) throws NativeLibException
i
- an integer which refers to a HKEY
NativeLibException
public int getRoot() throws NativeLibException
NativeLibException
public void activateLogging() throws NativeLibException
NativeLibException
public void suspendLogging() throws NativeLibException
NativeLibException
public void resetLogging() throws NativeLibException
NativeLibException
public java.util.List getLoggingInfo() throws NativeLibException
NativeLibException
public void setLoggingInfo(java.util.List info) throws NativeLibException
NativeLibException
public void addLoggingInfo(java.util.List info) throws NativeLibException
NativeLibException
public void rewind() throws NativeLibException
NativeLibException
public java.lang.String getUninstallName()
public boolean isProductRegistered() throws NativeLibException
NativeLibException
public void setUninstallName(java.lang.String name)
public void registerUninstallKey() throws NativeLibException
NativeLibException
public boolean verify(AutomatedInstallData idata) throws java.lang.Exception
verify
in class OSClassHelper
idata
-
java.lang.Exception
public boolean doPerform()
public RegistryHandler getDefaultHandler()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |