public class Win_RegistryHandler extends RegistryHandler
RegistryHandler
.Modifier and Type | Field and Description |
---|---|
(package private) Registry |
regWorker |
ROOT_KEY_MAP, UNINSTALL_ROOT, uninstallName
installdata, worker, workerClass
Constructor and Description |
---|
Win_RegistryHandler()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
activateLogging()
Activates logging of registry changes.
|
void |
addLoggingInfo(List info) |
void |
createKey(String key)
Creates the given key in the registry.
|
void |
deleteKey(String key)
Deletes the given key if exist, else throws an exception.
|
void |
deleteKeyIfEmpty(String key)
Deletes a key under the current root if it is empty, else do nothing.
|
void |
deleteValue(String key,
String value)
Deletes a value.
|
List |
getLoggingInfo() |
int |
getRoot()
Return the root as integer (HKEY_xxx).
|
String[] |
getSubkeys(String key)
Returns all keys which are defined under the given key.
|
RegDataContainer |
getValue(String key,
String value)
Returns the contents of the key/value pair if value exist, else an exception is raised.
|
RegDataContainer |
getValue(String key,
String value,
RegDataContainer defaultVal)
Returns the contents of the key/value pair if value exist, else the given default value.
|
String[] |
getValueNames(String key)
Returns all value names which are defined under the given key.
|
boolean |
keyExist(String key)
Returns whether a key exist or not.
|
void |
resetLogging()
Resets logging of registry changes.
|
void |
rewind() |
void |
setLoggingInfo(List info) |
void |
setRoot(int i)
Sets the root for the next registry access.
|
void |
setValue(String key,
String value,
byte[] contents)
Sets the given contents to the given registry value.
|
void |
setValue(String key,
String value,
long contents)
Sets the given contents to the given registry value.
|
void |
setValue(String key,
String value,
String contents)
Sets the given contents to the given registry value.
|
void |
setValue(String key,
String value,
String[] contents)
Sets the given contents to the given registry value.
|
void |
suspendLogging()
Suspends logging of registry changes.
|
boolean |
valueExist(String key,
String value)
Returns whether a the given value under the given key exist or not.
|
doPerform, getDefaultHandler, getUninstallName, isProductRegistered, registerUninstallKey, setUninstallName, verify
good
public Win_RegistryHandler()
public void setValue(String key, String value, String contents) throws NativeLibException
setValue
in class RegistryHandler
key
- the registry key which should be used or createdvalue
- the registry value into which the contents should be setcontents
- the contents for the valueNativeLibException
NativeLibException
public void setValue(String key, String value, String[] contents) throws NativeLibException
setValue
in class RegistryHandler
key
- the registry key which should be used or createdvalue
- the registry value into which the contents should be setcontents
- the contents for the valueNativeLibException
public void setValue(String key, String value, byte[] contents) throws NativeLibException
setValue
in class RegistryHandler
key
- the registry key which should be used or createdvalue
- the registry value into which the contents should be setcontents
- the contents for the valueNativeLibException
public void setValue(String key, String value, long contents) throws NativeLibException
setValue
in class RegistryHandler
key
- the registry key which should be used or createdvalue
- the registry value into which the contents should be setcontents
- the contents for the valueNativeLibException
public RegDataContainer getValue(String key, String value, RegDataContainer defaultVal) throws NativeLibException
getValue
in class RegistryHandler
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 registryException
NativeLibException
public boolean keyExist(String key) throws NativeLibException
keyExist
in class RegistryHandler
key
- key to be evaluatedException
NativeLibException
public boolean valueExist(String key, String value) throws NativeLibException
valueExist
in class RegistryHandler
key
- key to be used as path for the valuevalue
- value name to be evaluatedException
NativeLibException
public String[] getSubkeys(String key) throws NativeLibException
getSubkeys
in class RegistryHandler
key
- key to be used as path for the sub keysException
NativeLibException
public String[] getValueNames(String key) throws NativeLibException
getValueNames
in class RegistryHandler
key
- key to be used as path for the value namesException
NativeLibException
public RegDataContainer getValue(String key, String value) throws NativeLibException
getValue
in class RegistryHandler
key
- the registry key which should be usedvalue
- the registry value from which the contents should be requestedException
NativeLibException
public void createKey(String key) throws NativeLibException
createKey
in class RegistryHandler
key
- key to be createdException
NativeLibException
public void deleteKey(String key) throws NativeLibException
deleteKey
in class RegistryHandler
key
- key to be deletedNativeLibException
public void deleteKeyIfEmpty(String key) throws NativeLibException
deleteKeyIfEmpty
in class RegistryHandler
key
- key to be deletedNativeLibException
public void deleteValue(String key, String value) throws NativeLibException
deleteValue
in class RegistryHandler
key
- key of the value which should be deletedvalue
- value name to be deletedNativeLibException
public void setRoot(int i) throws NativeLibException
setRoot
in class RegistryHandler
i
- an integer which refers to a HKEYException
NativeLibException
public int getRoot() throws NativeLibException
getRoot
in class RegistryHandler
Exception
NativeLibException
public void activateLogging() throws NativeLibException
activateLogging
in class RegistryHandler
Exception
NativeLibException
public void suspendLogging() throws NativeLibException
suspendLogging
in class RegistryHandler
Exception
NativeLibException
public void resetLogging() throws NativeLibException
resetLogging
in class RegistryHandler
Exception
NativeLibException
public List getLoggingInfo() throws NativeLibException
getLoggingInfo
in class RegistryHandler
NativeLibException
public void setLoggingInfo(List info) throws NativeLibException
setLoggingInfo
in class RegistryHandler
NativeLibException
public void addLoggingInfo(List info) throws NativeLibException
addLoggingInfo
in class RegistryHandler
NativeLibException
public void rewind() throws NativeLibException
rewind
in class RegistryHandler
NativeLibException
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses