Top   Module   Use   Manual   Index 
 EXPORTING SERVICES | METHODS' SUMMARY | METHODS' DETAILS 

com :: sun :: star :: registry ::

interface XSimpleRegistry

Base Interface
com::sun::star::uno::XInterface

Description
allows access to a registry (a persistent data source). The data is stored in a hierarchical key structure beginning with a root key. Each key can store a value and can have multiple subkeys.
See also
XRegistryKey


Known Services which Export this Interface

com::sun::star::registry::DefaultRegistry implicitly supports a local registry and a read-only system registry for global information. In the context of this service, the functions open , close , and destroy from XSimpleRegistry are not supported and throw an exception if they are used.
com::sun::star::registry::NestedRegistry supports a shared view on two different registries. The registry files will be opened in two different modes, registry1 will be opened with read/write rights and registry2 will be opened read-only. In the context of this service, the functions open , close , and destroy from XSimpleRegistry are not supported and throw an exception if they are used.
com::sun::star::registry::SimpleRegistry makes it possible to create, open, or close a registry. Further, it is possible to merge a registry under a specified key in the open registry. Guarantees:
com::sun::star::registry::DefaultRegistry implicitly supports a local registry and a read-only system registry for global information. In the context of this service, the functions open , close , and destroy from XSimpleRegistry are not supported and throw an exception if they are used.
com::sun::star::registry::NestedRegistry supports a shared view on two different registries. The registry files will be opened in two different modes, registry1 will be opened with read/write rights and registry2 will be opened read-only. In the context of this service, the functions open , close , and destroy from XSimpleRegistry are not supported and throw an exception if they are used.
com::sun::star::registry::SimpleRegistry makes it possible to create, open, or close a registry. Further, it is possible to merge a registry under a specified key in the open registry. Guarantees:
com::sun::star::configuration::ConfigurationRegistry

Methods' Summary

getURL returns the URL of the current data source of the registry.
open connects the registry to a persistent data source represented by an URL.
isValid checks if the registry points to a valid data-source.
close disconnects the registry from the data-source.
destroy destroys the registry and the data source.
getRootKey
isReadOnly checks if the registry is readonly.
mergeKey DEPRECATED: this method lacks a registry key (better than a URL). merges a registry under the specified key.

Methods' Details

getURL
 
string
getURL();
Description
returns the URL of the current data source of the registry.
open
 
void
open(
[ in ] string rURL,
[ in ] boolean bReadOnly,
[ in ] boolean bCreate )
raises ( com::sun::star::registry::InvalidRegistryException );

Description
connects the registry to a persistent data source represented by an URL.

If a local registry is already open, this function will close the currently open registry.

Parameter aURL
specifies the complete URL to access the data source.
Parameter bReadOnly
specifies if the data source should be opened for read only.
Parameter bCreate
specifies if the data source should be created if it does not already exist.
Throws
InvalidRegistryException if the registry does not exist.
isValid
 
boolean
isValid();
Description
checks if the registry points to a valid data-source.
close
 
void
close( )
raises ( com::sun::star::registry::InvalidRegistryException );

Description
disconnects the registry from the data-source.
Throws
InvalidRegistryException if the registry is not open.
destroy
 
void
destroy( )
raises ( com::sun::star::registry::InvalidRegistryException );

Description
destroys the registry and the data source.
Throws
InvalidRegistryException if the registry is not open.
getRootKey
 
com::sun::star::registry::XRegistryKey
getRootKey( )
raises ( com::sun::star::registry::InvalidRegistryException );

Returns
the root key of the registry.
Throws
InvalidRegistryException if no registry is open
isReadOnly
 
boolean
isReadOnly( )
raises ( com::sun::star::registry::InvalidRegistryException );

Description
checks if the registry is readonly.
Throws
InvalidRegistryException if the registry is not open.
mergeKey
 
void
mergeKey(
[ in ] string aKeyName,
[ in ] string aUrl )
raises ( com::sun::star::registry::InvalidRegistryException, com::sun::star::registry::MergeConflictException );

Description
DEPRECATED: this method lacks a registry key (better than a URL). merges a registry under the specified key.

If the key does not exist it will be created. Existing keys will be overridden from keys of registry specified by aUrl .

Throws
InvalidRegistryException if the registry is not open.
Throws
MergeConflictException if any differences occur during merging

Top of Page