Overview | Module | Use | Devguide | Index

Methods' Summary | Attributes' Summary | Methods' Details | Attributes' Details

:: com :: sun :: star :: registry ::
interface XRegistryKey
Description makes structural information (except regarding tree structures) of a single registry key accessible. This is the main interface for registry keys. See also XSimpleRegistry

Methods' Summary
isReadOnly | checks if the key can be overwritten.
isValid | checks if the key points to an open valid key in the data-source.
getKeyType |
getValueType |
getLongValue |
setLongValue | sets a long value to the key.
getLongListValue |
setLongListValue | sets a long list value to the key.
getAsciiValue |
setAsciiValue | sets an ASCII string value to the key.
getAsciiListValue |
setAsciiListValue | sets an ASCII string list value to the key.
getStringValue |
setStringValue | sets a unicode string value to the key.
getStringListValue |
setStringListValue | sets a unicode string value to the key.
getBinaryValue |
setBinaryValue | sets a binary value to the key.
openKey | opens a sub key of the key.
createKey | creates a new key in the registry.
closeKey | closes a key in the registry.
deleteKey | deletes a key from the registry.
openKeys | opens all subkeys of the key. If a subkey is a link, the link will be resolved and the appropriate key will be opened.
getKeyNames |
createLink | creates a new link in the registry.
deleteLink | deletes a link from the registry.
getLinkTarget |
getResolvedName |

Attributes' Summary
KeyName | This is the key of the entry relative to its parent.

Methods' Details
isReadOnly
boolean
isReadOnly()
raises( | InvalidRegistryException );
Description checks if the key can be overwritten. Throws InvalidRegistryException if the registry is not open.
isValid
boolean
isValid();
Description checks if the key points to an open valid key in the data-source.
getKeyType
RegistryKeyType
getKeyType( | [in] string | rKeyName )
raises( | InvalidRegistryException );
Returns the type of the specified key. Parameter rKeyName specifies the relative path from the current key to the key of the type which will be returned. Throws InvalidRegistryException if the registry is not open.
getValueType
RegistryValueType
getValueType()
raises( | InvalidRegistryException );
Returns the type of the key value or NOT_DEFINED if the key has no value. Throws InvalidRegistryException if the registry is not open.
getLongValue
long
getLongValue()
raises( | InvalidRegistryException, InvalidValueException );
Returns a long value if the key contains one. Throws InvalidRegistryException if the registry is not open. Throws InvalidValueException if the value is not of type long.
setLongValue
void
setLongValue( | [in] long | value )
raises( | InvalidRegistryException );
Description sets a long value to the key. If the key already has a value, the value will be overridden. Throws InvalidRegistryException if the registry is not open.
getLongListValue
sequence< long >
getLongListValue()
raises( | InvalidRegistryException, InvalidValueException );
Returns a sequence of longs if the key contains a long list value. Throws InvalidRegistryException if the registry is not open. Throws InvalidValueException if the actual value is not of type long list.
setLongListValue
void
setLongListValue( | [in] sequence< long > | seqValue )
raises( | InvalidRegistryException );
Description sets a long list value to the key. If the key already has a value, the value will be overridden. Throws InvalidRegistryException if the registry is not open.
getAsciiValue
string
getAsciiValue()
raises( | InvalidRegistryException, InvalidValueException );
Returns an ascii string value if the key contains one. Throws InvalidRegistryException if the registry is not open. Throws InvalidValueException if the actual value is not of type ascii.
setAsciiValue
void
setAsciiValue( | [in] string | value )
raises( | InvalidRegistryException );
Description sets an ASCII string value to the key. The high byte of the string should be NULL. If not, there is no guarantee that the string will be correctly transported. If the key already has a value, the value will be overridden. Throws InvalidRegistryException if the registry is not open.
getAsciiListValue
sequence< string >
getAsciiListValue()
raises( | InvalidRegistryException, InvalidValueException );
Returns a sequence of ascii strings if the key contains an asci list value. Throws InvalidRegistryException if the registry is not open. Throws InvalidValueException if the actual value is not of type ascii list.
setAsciiListValue
void
setAsciiListValue( | [in] sequence< string > | seqValue )
raises( | InvalidRegistryException );
Description sets an ASCII string list value to the key. The high byte of the string should be NULL. If not, there is no guarantee that the string will be correctly transported. If the key already has a value, the value will be overridden. Throws InvalidRegistryException if the registry is not open.
getStringValue
string
getStringValue()
raises( | InvalidRegistryException, InvalidValueException );
Returns a unicode string value if the key contains one. Throws InvalidRegistryException if the registry is not open. Throws InvalidValueException if the actual value is not of type string.
setStringValue
void
setStringValue( | [in] string | value )
raises( | InvalidRegistryException );
Description sets a unicode string value to the key. If the key already has a value, the value will be overridden. Throws InvalidRegistryException if the registry is not open.
getStringListValue
sequence< string >
getStringListValue()
raises( | InvalidRegistryException, InvalidValueException );
Returns a sequence of unicode strings if the key contains an unicode string list value. Throws InvalidRegistryException if the registry is not open. Throws InvalidValueException if the actual value is not of type string list.
setStringListValue
void
setStringListValue( | [in] sequence< string > | seqValue )
raises( | InvalidRegistryException );
Description sets a unicode string value to the key. If the key already has a value, the value will be overridden. Throws InvalidRegistryException if the registry is not open.
getBinaryValue
sequence< byte >
getBinaryValue()
raises( | InvalidRegistryException, InvalidValueException );
Returns a binary value if the key contains one. Throws InvalidRegistryException if the registry is not open. Throws InvalidValueException if the actual value is not of type binary.
setBinaryValue
void
setBinaryValue( | [in] sequence< byte > | value )
raises( | InvalidRegistryException );
Description sets a binary value to the key. If the key already has a value, the value will be overridden. Throws InvalidRegistryException if the registry is not open.
openKey
XRegistryKey
openKey( | [in] string | aKeyName )
raises( | InvalidRegistryException );
Description opens a sub key of the key. If the sub key does not exist, the function returns a NULL-interface. Parameter aKeyName the relative path from the current key to the key which will be created. Returns a NULL interface if the key does not exist. Throws InvalidRegistryException if the registry is not open.
createKey
XRegistryKey
createKey( | [in] string | aKeyName )
raises( | InvalidRegistryException );
Description creates a new key in the registry. If the key already exists, the function will open the key. Parameter aKeyName specifies the relative path from the current key to the key which will be created. Returns a NULL interface if the key could not be created. Throws InvalidRegistryException if the registry is not open, the registry is readonly or if the key exists and is of type LINK.
closeKey
void
closeKey()
raises( | InvalidRegistryException );
Description closes a key in the registry. Throws InvalidRegistryException if the registry is not open.
deleteKey
void
deleteKey( | [in] string | rKeyName )
raises( | InvalidRegistryException );
Description deletes a key from the registry. Parameter aKeyName specifies the relative path from the current key to the key which will be deleted. Throws InvalidRegistryException if the registry is not open, the registry is readonly, the key does not exists or if the key is of type LINK.
openKeys
sequence< XRegistryKey >
openKeys()
raises( | InvalidRegistryException );
Description opens all subkeys of the key. If a subkey is a link, the link will be resolved and the appropriate key will be opened. Returns an empty sequence if the key has no subkeys. Throws InvalidRegistryException if the registry is not open.
getKeyNames
sequence< string >
getKeyNames()
raises( | InvalidRegistryException );
Returns a sequence with the names of all subkeys of the key. If the key has no subkeys, the function returns an empty sequence. If a subkey is a link, the name of the link will be returned. Throws InvalidRegistryException if the registry is not open.
createLink
boolean
createLink( | [in] string | aLinkName,
| [in] string | aLinkTarget )
raises( | InvalidRegistryException );
Description creates a new link in the registry. Returns true if the link was created. If the link already exists or the link target does not exist, the function returns false. Parameter aLinkName specifies the relative path from the current key to the link which will be created. Parameter aLinkTarget specifies the full path of the key which will be referenced by the link. Throws InvalidRegistryException if the registry is not open or the registry is readonly.
deleteLink
void
deleteLink( | [in] string | rLinkName )
raises( | InvalidRegistryException );
Description deletes a link from the registry. Parameter aLinkName specifies the relative path from the current key to the link which will be deleted. Throws InvalidRegistryException if the registry is not open, the registry is readonly, or if the link does not exist.
getLinkTarget
string
getLinkTarget( | [in] string | rLinkName )
raises( | InvalidRegistryException );
Returns the target (complete path of a key) of the link specified by rLinkName. Parameter rLinKName specifies the relative path from the current key to the link which target will be returned. Throws InvalidRegistryException if the registry is not open or the link does not exists.
getResolvedName
string
getResolvedName( | [in] string | aKeyName )
raises( | InvalidRegistryException );
Returns the resolved name of a key. The function resolve the complete name of the key. If a link could not be resolved, the linktarget concatenated with the unresolved rest of the name, will be returned. Parameter rKeyName specifies a relative path from the current key which will be resolved from all links. Throws InvalidRegistryException if the registry is not open or a recursion was detected.

Attributes' Details
KeyName
[ readonly ] string KeyName; Description This is the key of the entry relative to its parent. The access path starts with the root "/" and all parent entry names are delimited with slashes "/" too, like in a UNIX (R) file system. Slashes which are part of single names are represented as hexadecimals preceded with a "%" like in URL syntax.

Top of Page

Copyright © 2000, 2014 LibreOffice contributors and/or their affiliates. All rights reserved.

LibreOffice was created by The Document Foundation, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.

The Document Foundation acknowledges all community members, please find more info at our website.

Privacy Policy | Impressum (Legal Info) | Copyright information: The source code of LibreOffice is licensed under the GNU Lesser General Public License (LGPLv3). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.