|
|||||||||
| 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
com.izforge.izpack.util.os.Win_RegistryHandler
public class Win_RegistryHandler
This is the Microsoft Windows specific implementation of RegistryHandler.
| Field Summary | |
|---|---|
(package private) Registry |
regWorker
|
| Fields inherited from class com.izforge.izpack.util.os.RegistryHandler |
|---|
ROOT_KEY_MAP, UNINSTALL_ROOT, uninstallName |
| Fields inherited from class com.izforge.izpack.util.OSClassHelper |
|---|
installdata, worker, workerClass |
| Constructor Summary | |
|---|---|
Win_RegistryHandler()
Default constructor. |
|
| 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. |
java.util.List<java.lang.Object> |
getLoggingInfo()
|
boolean |
getLogPrevSetValueFlag()
Determines whether or not previous contents of registry values will be logged by the 'setValue()' method. |
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. |
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 |
keyExist(java.lang.String key)
Returns whether a key exist or not. |
void |
resetLogging()
Resets logging of registry changes. |
void |
rewind()
|
void |
setLoggingInfo(java.util.List info)
|
void |
setLogPrevSetValueFlag(boolean flagVal)
Sets up whether or not previous contents of registry values will be logged by the 'setValue()' method. |
void |
setRoot(int i)
Sets the root for the next registry access. |
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)
Sets the given contents to the given registry value. |
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. |
| Methods inherited from class com.izforge.izpack.util.os.RegistryHandler |
|---|
doPerform, getDefaultHandler, getUninstallName, isProductRegistered, registerUninstallKey, setUninstallName, verify |
| 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 |
|---|
Registry regWorker
| Constructor Detail |
|---|
public Win_RegistryHandler()
| Method Detail |
|---|
public void setValue(java.lang.String key,
java.lang.String value,
java.lang.String contents)
throws NativeLibException
setValue in class RegistryHandlerkey - 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
NativeLibException
public void setValue(java.lang.String key,
java.lang.String value,
java.lang.String[] contents)
throws NativeLibException
setValue in class RegistryHandlerkey - 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,
byte[] contents)
throws NativeLibException
setValue in class RegistryHandlerkey - 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
setValue in class RegistryHandlerkey - 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
getValue in class RegistryHandlerkey - 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
keyExist in class RegistryHandlerkey - key to be evaluated
NativeLibException
public boolean valueExist(java.lang.String key,
java.lang.String value)
throws NativeLibException
valueExist in class RegistryHandlerkey - 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
getSubkeys in class RegistryHandlerkey - key to be used as path for the sub keys
NativeLibException
public java.lang.String[] getValueNames(java.lang.String key)
throws NativeLibException
getValueNames in class RegistryHandlerkey - key to be used as path for the value names
NativeLibException
public RegDataContainer getValue(java.lang.String key,
java.lang.String value)
throws NativeLibException
getValue in class RegistryHandlerkey - 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
createKey in class RegistryHandlerkey - key to be created
NativeLibException
public void deleteKey(java.lang.String key)
throws NativeLibException
deleteKey in class RegistryHandlerkey - key to be deleted
NativeLibException
public void deleteKeyIfEmpty(java.lang.String key)
throws NativeLibException
deleteKeyIfEmpty in class RegistryHandlerkey - key to be deleted
NativeLibException
public void deleteValue(java.lang.String key,
java.lang.String value)
throws NativeLibException
deleteValue in class RegistryHandlerkey - key of the value which should be deletedvalue - value name to be deleted
NativeLibException
public void setRoot(int i)
throws NativeLibException
setRoot in class RegistryHandleri - an integer which refers to a HKEY
NativeLibException
public int getRoot()
throws NativeLibException
getRoot in class RegistryHandlerNativeLibExceptionpublic void setLogPrevSetValueFlag(boolean flagVal)
setLogPrevSetValueFlag in class RegistryHandlerflagVal - true to have the previous contents of registry
values logged by the 'setValue()' method.public boolean getLogPrevSetValueFlag()
getLogPrevSetValueFlag in class RegistryHandler
public void activateLogging()
throws NativeLibException
activateLogging in class RegistryHandlerNativeLibException
public void suspendLogging()
throws NativeLibException
suspendLogging in class RegistryHandlerNativeLibException
public void resetLogging()
throws NativeLibException
resetLogging in class RegistryHandlerNativeLibException
public java.util.List<java.lang.Object> getLoggingInfo()
throws NativeLibException
getLoggingInfo in class RegistryHandlerNativeLibException
public void setLoggingInfo(java.util.List info)
throws NativeLibException
setLoggingInfo in class RegistryHandlerNativeLibException
public void addLoggingInfo(java.util.List info)
throws NativeLibException
addLoggingInfo in class RegistryHandlerNativeLibException
public void rewind()
throws NativeLibException
rewind in class RegistryHandlerNativeLibException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||