Package com.documentum.registry
Class DfRegistryWin32
java.lang.Object
com.documentum.registry.DfRegistry
com.documentum.registry.DfRegistryWin32
- All Implemented Interfaces:
IDfRegistry,IDfRegistryWin32
This class implements the registry storage mechanism with a win32 registry basis.
Notes:
- IMPORTANT: For the data of values, specific data types are necessary
for retrieving the correct data. An additional member function
getValueType( ) returns the correct enumerated data type so the caller can
use the correct get[TYPE]Value( ) function. Otherwise the caller will have
ASCII/hex/decimal/binary mismatches.
- Synchronization of the underlying storage of this class is handled by the win32 registry functions.
- The reallocation of opened registry resources of this class are handled in RegKey::finalize( ).
-
Field Summary
Fields inherited from class com.documentum.registry.DfRegistry
ARRAY_INDEX, ARRAY_SIZE_INDEXFields inherited from interface com.documentum.registry.IDfRegistry
ALL_ACCESS, ALTERNATE_FILEPATHS, DCTM_ROOT, HKEY_CLASSES_ROOT, HKEY_PERFORMANCE_DATA, HKEY_USERS, KEY_DELIMITER, LOCALMACHINE_ROOT, READ_ACCESS, USER_ROOTFields inherited from interface com.documentum.registry.IDfRegistryWin32
TYPE_BINARY, TYPE_INT, TYPE_NONE, TYPE_STRING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseKey()Closes an open key freeing system resources.voidprotected voidvoidvoiddeleteSubKey(String subKey) Deletes a sub-key of the open key.voidDeletes the sub-keys under the open key.voiddeleteValue(String name) Deletes a value and the value's data under the open key.getBinaryValue(String name) Returns a binary representation of the data at the given value.intgetIntValue(String name) Returns an integer representation of the data at the given value.getStringValue(String name) Returns a String representation of the data at the given value.intgetValueType(String name) Returns an integer descriptor of the value data of the given value.booleanReturns a flag specifying if the given sub-key is a sub-key of the open key.booleanisValueNamePresent(String name) voidSet the open key.voidvoidsetBinaryValue(String name, IDfList data) Sets the data field of the given value with binary data.voidsetIntValue(String name, int data) Sets the data field of the given value with integer data.voidsetStringValue(String name, String data) Sets the data field of the given value with String data.protected voidsetStringValues(RegistryEntriesHolder holder) subKeys()Returns the sub-keys of the open key.values()Returns the value names of the open key.Methods inherited from class com.documentum.registry.DfRegistry
acquireInterProcessLock, assertFunc, finalize, flush, getBinaryValueAt, getBinaryValues, getInterprocessLockCount, getIntValueAt, getIntValues, getStringValueAt, getStringValues, getValuesSize, releaseInterProcessLock, reset, setBinaryValueAt, setBinaryValues, setIntValueAt, setIntValues, setStringValueAt, setStringValues, setValuesSizeMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.documentum.registry.IDfRegistry
flush, getBinaryValueAt, getBinaryValues, getIntValueAt, getIntValues, getStringValueAt, getStringValues, getValuesSize, reset, setBinaryValueAt, setBinaryValues, setIntValueAt, setIntValues, setStringValueAt, setStringValues, setValuesSize
-
Constructor Details
-
DfRegistryWin32
Constructor.- Parameters:
rootKey- the handle to the top-level key in the registry to be used. This can be any key.- Throws:
DfException- if the operation failed.
-
-
Method Details
-
openRegistry
public void openRegistry() -
closeRegistry
public void closeRegistry() -
openKey
Set the open key. The key is created if it does not exist. If there is an open key it is closed prior to opening a the new key.- Specified by:
openKeyin interfaceIDfRegistry- Specified by:
openKeyin classDfRegistry- Parameters:
subKey- a new or existing key in the registry storage.- Throws:
DfException- if the operation failed.
-
createKey
- Specified by:
createKeyin interfaceIDfRegistry- Specified by:
createKeyin classDfRegistry- Throws:
DfException
-
isSubKey
Returns a flag specifying if the given sub-key is a sub-key of the open key.- Specified by:
isSubKeyin interfaceIDfRegistry- Specified by:
isSubKeyin classDfRegistry- Parameters:
subKey- the key to be found.- Returns:
- a flag specifying if the given sub-key is an actual sub-key.
- Throws:
DfException- if the operation failed.
-
deleteValue
Deletes a value and the value's data under the open key.- Specified by:
deleteValuein interfaceIDfRegistry- Specified by:
deleteValuein classDfRegistry- Parameters:
name- the value to be deleted.- Throws:
DfException- if the operation failed.
-
deleteSubKey
Deletes a sub-key of the open key.- Specified by:
deleteSubKeyin interfaceIDfRegistry- Specified by:
deleteSubKeyin classDfRegistry- Parameters:
subKey- the key to be deleted.- Throws:
DfException- if the operation failed.
-
deleteSubKeys
Deletes the sub-keys under the open key. The open key is not deleted.- Specified by:
deleteSubKeysin interfaceIDfRegistry- Specified by:
deleteSubKeysin classDfRegistry- Throws:
DfException- if the operation failed.
-
closeKey
Closes an open key freeing system resources.- Specified by:
closeKeyin interfaceIDfRegistry- Specified by:
closeKeyin classDfRegistry- Throws:
DfException- if the operation failed.
-
values
Returns the value names of the open key. To get the value's data, call get[TYPE]Value( ).- Specified by:
valuesin interfaceIDfRegistry- Specified by:
valuesin classDfRegistry- Returns:
- a list of String value names of the top-level key.
- Throws:
DfException- if the operation failed.
-
subKeys
Returns the sub-keys of the open key.- Specified by:
subKeysin interfaceIDfRegistry- Specified by:
subKeysin classDfRegistry- Returns:
- a list of String sub-key names of the top-level key.
- Throws:
DfException- if the operation failed.
-
getValueType
Returns an integer descriptor of the value data of the given value. Note:
- Even though the enumerated types returned are located within this class definition, please see documentation for Registry value types for a general list of more enumerated types.
- Specified by:
getValueTypein interfaceIDfRegistryWin32- Returns:
- an integer descriptor of the value data of the given value.
- Throws:
DfException- if the operation failed.
-
getIntValue
Returns an integer representation of the data at the given value.- Specified by:
getIntValuein interfaceIDfRegistry- Specified by:
getIntValuein classDfRegistry- Parameters:
name- the value to lookup.- Returns:
- an integer representation of the data at the given value.
- Throws:
DfException- if the operation failed.
-
setIntValue
Sets the data field of the given value with integer data.- Specified by:
setIntValuein interfaceIDfRegistry- Specified by:
setIntValuein classDfRegistry- Parameters:
name- the value whose data is to be set.data- the data to set.- Throws:
DfException- if the operation failed.
-
getStringValue
Returns a String representation of the data at the given value.- Specified by:
getStringValuein interfaceIDfRegistry- Specified by:
getStringValuein classDfRegistry- Parameters:
name- the value to lookup.- Returns:
- a String representation of the data at the given value.
- Throws:
DfException- if the operation failed.
-
setStringValue
Sets the data field of the given value with String data.- Specified by:
setStringValuein interfaceIDfRegistry- Specified by:
setStringValuein classDfRegistry- Parameters:
name- the value whose data is to be set.data- the data to set.- Throws:
DfException- if the operation failed.
-
setStringValues
- Specified by:
setStringValuesin classDfRegistry- Throws:
DfException
-
getBinaryValue
Returns a binary representation of the data at the given value.- Specified by:
getBinaryValuein interfaceIDfRegistry- Specified by:
getBinaryValuein classDfRegistry- Parameters:
name- the value to lookup.- Returns:
- a list with a binary representation of the data at the given value.
- Throws:
DfException- if the operation failed.
-
setBinaryValue
Sets the data field of the given value with binary data.- Specified by:
setBinaryValuein interfaceIDfRegistry- Specified by:
setBinaryValuein classDfRegistry- Parameters:
name- the value whose data is to be set.data- the data to set. This must be a list of integers of which each will be truncated to byte size.- Throws:
DfException- if the operation failed.
-
isValueNamePresent
- Specified by:
isValueNamePresentin interfaceIDfRegistry- Throws:
DfException
-
closeRootKey
- Specified by:
closeRootKeyin classDfRegistry- Throws:
DfException
-