Package com.documentum.registry

# Class DfRegistryWin32

java.lang.Object
com.documentum.registry.DfRegistry
com.documentum.registry.DfRegistryWin32

All Implemented Interfaces:
  `IDfRegistry`, `IDfRegistryWin32`

public class DfRegistryWin32 extends DfRegistry implements 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_INDEX`

  ### Fields 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_ROOT`

  ### Fields inherited from interface com.documentum.registry.IDfRegistryWin32

  `TYPE_BINARY, TYPE_INT, TYPE_NONE, TYPE_STRING`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DfRegistryWin32(long rootKey, String subKey, int accessMode)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `closeKey()`
  Closes an open key freeing system resources.
  `void`
  `closeRegistry()`
  `protected void`
  `closeRootKey()`
  `void`
  `createKey()`
  `void`
  `deleteSubKey(String subKey)`
  Deletes a sub-key of the open key.
  `void`
  `deleteSubKeys()`
  Deletes the sub-keys under the open key.
  `void`
  `deleteValue(String name)`
  Deletes a value and the value's data under the open key.
  `IDfList`
  `getBinaryValue(String name)`
  Returns a binary representation of the data at the given value.
  `int`
  `getIntValue(String name)`
  Returns an integer representation of the data at the given value.
  `String`
  `getStringValue(String name)`
  Returns a String representation of the data at the given value.
  `int`
  `getValueType(String name)`
  Returns an integer descriptor of the value data of the given value.
  `boolean`
  `isSubKey(String subKey)`
  Returns a flag specifying if the given sub-key is a sub-key of the open key.
  `boolean`
  `isValueNamePresent(String name)`
  `void`
  `openKey(String subKey)`
  Set the open key.
  `void`
  `openRegistry()`
  `void`
  `setBinaryValue(String name, IDfList data)`
  Sets the data field of the given value with binary data.
  `void`
  `setIntValue(String name, int data)`
  Sets the data field of the given value with integer data.
  `void`
  `setStringValue(String name, String data)`
  Sets the data field of the given value with String data.
  `protected void`
  `setStringValues(RegistryEntriesHolder holder)`
  `IDfList`
  `subKeys()`
  Returns the sub-keys of the open key.
  `IDfList`
  `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, setValuesSize`

  ### Methods inherited from class java.lang.Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods 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

    public DfRegistryWin32(long rootKey, String subKey, int accessMode) throws DfException
    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

    public void openKey(String subKey) throws DfException
    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:
      `openKey` in interface `IDfRegistry`
    Specified by:
      `openKey` in class `DfRegistry`
    Parameters:
      `subKey` - a new or existing key in the registry storage.
    Throws:
      `DfException` - if the operation failed.

  - ### createKey

    public void createKey() throws DfException
    Specified by:
      `createKey` in interface `IDfRegistry`
    Specified by:
      `createKey` in class `DfRegistry`
    Throws:
      `DfException`

  - ### isSubKey

    public boolean isSubKey(String subKey) throws DfException
    Returns a flag specifying if the given sub-key is a sub-key of the open key.
    Specified by:
      `isSubKey` in interface `IDfRegistry`
    Specified by:
      `isSubKey` in class `DfRegistry`
    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

    public void deleteValue(String name) throws DfException
    Deletes a value and the value's data under the open key.
    Specified by:
      `deleteValue` in interface `IDfRegistry`
    Specified by:
      `deleteValue` in class `DfRegistry`
    Parameters:
      `name` - the value to be deleted.
    Throws:
      `DfException` - if the operation failed.

  - ### deleteSubKey

    public void deleteSubKey(String subKey) throws DfException
    Deletes a sub-key of the open key.
    Specified by:
      `deleteSubKey` in interface `IDfRegistry`
    Specified by:
      `deleteSubKey` in class `DfRegistry`
    Parameters:
      `subKey` - the key to be deleted.
    Throws:
      `DfException` - if the operation failed.

  - ### deleteSubKeys

    public void deleteSubKeys() throws DfException
    Deletes the sub-keys under the open key. The open key is not deleted.
    Specified by:
      `deleteSubKeys` in interface `IDfRegistry`
    Specified by:
      `deleteSubKeys` in class `DfRegistry`
    Throws:
      `DfException` - if the operation failed.

  - ### closeKey

    public void closeKey() throws DfException
    Closes an open key freeing system resources.
    Specified by:
      `closeKey` in interface `IDfRegistry`
    Specified by:
      `closeKey` in class `DfRegistry`
    Throws:
      `DfException` - if the operation failed.

  - ### values

    public IDfList values() throws DfException
    Returns the value names of the open key. To get the value's data, call get[TYPE]Value( ).
    Specified by:
      `values` in interface `IDfRegistry`
    Specified by:
      `values` in class `DfRegistry`
    Returns:
      a list of String value names of the top-level key.
    Throws:
      `DfException` - if the operation failed.

  - ### subKeys

    public IDfList subKeys() throws DfException
    Returns the sub-keys of the open key.
    Specified by:
      `subKeys` in interface `IDfRegistry`
    Specified by:
      `subKeys` in class `DfRegistry`
    Returns:
      a list of String sub-key names of the top-level key.
    Throws:
      `DfException` - if the operation failed.

  - ### getValueType

    public int getValueType(String name) throws DfException
    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:
      `getValueType` in interface `IDfRegistryWin32`
    Returns:
      an integer descriptor of the value data of the given value.
    Throws:
      `DfException` - if the operation failed.

  - ### getIntValue

    public int getIntValue(String name) throws DfException
    Returns an integer representation of the data at the given value.
    Specified by:
      `getIntValue` in interface `IDfRegistry`
    Specified by:
      `getIntValue` in class `DfRegistry`
    Parameters:
      `name` - the value to lookup.
    Returns:
      an integer representation of the data at the given value.
    Throws:
      `DfException` - if the operation failed.

  - ### setIntValue

    public void setIntValue(String name, int data) throws DfException
    Sets the data field of the given value with integer data.
    Specified by:
      `setIntValue` in interface `IDfRegistry`
    Specified by:
      `setIntValue` in class `DfRegistry`
    Parameters:
      `name` - the value whose data is to be set.
      `data` - the data to set.
    Throws:
      `DfException` - if the operation failed.

  - ### getStringValue

    public String getStringValue(String name) throws DfException
    Returns a String representation of the data at the given value.
    Specified by:
      `getStringValue` in interface `IDfRegistry`
    Specified by:
      `getStringValue` in class `DfRegistry`
    Parameters:
      `name` - the value to lookup.
    Returns:
      a String representation of the data at the given value.
    Throws:
      `DfException` - if the operation failed.

  - ### setStringValue

    public void setStringValue(String name, String data) throws DfException
    Sets the data field of the given value with String data.
    Specified by:
      `setStringValue` in interface `IDfRegistry`
    Specified by:
      `setStringValue` in class `DfRegistry`
    Parameters:
      `name` - the value whose data is to be set.
      `data` - the data to set.
    Throws:
      `DfException` - if the operation failed.

  - ### setStringValues

    protected void setStringValues(RegistryEntriesHolder holder) throws DfException
    Specified by:
      `setStringValues` in class `DfRegistry`
    Throws:
      `DfException`

  - ### getBinaryValue

    public IDfList getBinaryValue(String name) throws DfException
    Returns a binary representation of the data at the given value.
    Specified by:
      `getBinaryValue` in interface `IDfRegistry`
    Specified by:
      `getBinaryValue` in class `DfRegistry`
    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

    public void setBinaryValue(String name, IDfList data) throws DfException
    Sets the data field of the given value with binary data.
    Specified by:
      `setBinaryValue` in interface `IDfRegistry`
    Specified by:
      `setBinaryValue` in class `DfRegistry`
    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

    public boolean isValueNamePresent(String name) throws DfException
    Specified by:
      `isValueNamePresent` in interface `IDfRegistry`
    Throws:
      `DfException`

  - ### closeRootKey

    protected void closeRootKey() throws DfException
    Specified by:
      `closeRootKey` in class `DfRegistry`
    Throws:
      `DfException`