public class Win_RegistryHandler extends RegistryHandler
RegistryHandler.| Modifier and Type | Field and Description |
|---|---|
(package private) Registry |
regWorker |
ROOT_KEY_MAP, UNINSTALL_ROOT, uninstallNameinstalldata, worker, workerClass| Constructor and Description |
|---|
Win_RegistryHandler()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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 |
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.
|
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 |
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.
|
doPerform, getDefaultHandler, getUninstallName, isProductRegistered, registerUninstallKey, setUninstallName, verifygoodRegistry regWorker
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 valueNativeLibExceptionNativeLibExceptionpublic 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 valueNativeLibExceptionpublic 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 valueNativeLibExceptionpublic 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 valueNativeLibExceptionpublic 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 registryjava.lang.ExceptionNativeLibExceptionpublic boolean keyExist(java.lang.String key)
throws NativeLibException
keyExist in class RegistryHandlerkey - key to be evaluatedjava.lang.ExceptionNativeLibExceptionpublic 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 evaluatedjava.lang.ExceptionNativeLibExceptionpublic java.lang.String[] getSubkeys(java.lang.String key)
throws NativeLibException
getSubkeys in class RegistryHandlerkey - key to be used as path for the sub keysjava.lang.ExceptionNativeLibExceptionpublic java.lang.String[] getValueNames(java.lang.String key)
throws NativeLibException
getValueNames in class RegistryHandlerkey - key to be used as path for the value namesjava.lang.ExceptionNativeLibExceptionpublic 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 requestedjava.lang.ExceptionNativeLibExceptionpublic void createKey(java.lang.String key)
throws NativeLibException
createKey in class RegistryHandlerkey - key to be createdjava.lang.ExceptionNativeLibExceptionpublic void deleteKey(java.lang.String key)
throws NativeLibException
deleteKey in class RegistryHandlerkey - key to be deletedNativeLibExceptionpublic void deleteKeyIfEmpty(java.lang.String key)
throws NativeLibException
deleteKeyIfEmpty in class RegistryHandlerkey - key to be deletedNativeLibExceptionpublic 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 deletedNativeLibExceptionpublic void setRoot(int i)
throws NativeLibException
setRoot in class RegistryHandleri - an integer which refers to a HKEYjava.lang.ExceptionNativeLibExceptionpublic int getRoot()
throws NativeLibException
getRoot in class RegistryHandlerjava.lang.ExceptionNativeLibExceptionpublic void activateLogging()
throws NativeLibException
activateLogging in class RegistryHandlerjava.lang.ExceptionNativeLibExceptionpublic void suspendLogging()
throws NativeLibException
suspendLogging in class RegistryHandlerjava.lang.ExceptionNativeLibExceptionpublic void resetLogging()
throws NativeLibException
resetLogging in class RegistryHandlerjava.lang.ExceptionNativeLibExceptionpublic java.util.List getLoggingInfo()
throws NativeLibException
getLoggingInfo in class RegistryHandlerNativeLibExceptionpublic void setLoggingInfo(java.util.List info)
throws NativeLibException
setLoggingInfo in class RegistryHandlerNativeLibExceptionpublic void addLoggingInfo(java.util.List info)
throws NativeLibException
addLoggingInfo in class RegistryHandlerNativeLibExceptionpublic void rewind()
throws NativeLibException
rewind in class RegistryHandlerNativeLibException