LibreOffice: ConfigurationAccess Service Reference

LibreOffice LibreOffice 24.2 SDK API Reference

Loading...
Searching...
No Matches
Included Services | List of all members
ConfigurationAccess Service Referencepublished

provides read access to a fragment of the configuration hierarchy. More...

`import <ConfigurationAccess.idl;`

Inheritance diagram for ConfigurationAccess:

## Included Services
service | HierarchyAccess
| provides interfaces to access child and descendent elements.
service | HierarchyElement
| provides interfaces to obtain information about this element and its role and context in the hierarchy.
service | SetAccess
| specializes HierarchyAccess, if this element is a Set.
service | GroupAccess
| specializes HierarchyAccess, if this element is a Group.
service | AccessRootElement
| specializes HierarchyElement, if this element is the Root of the whole hierarchy.
service | SetElement
| specializes HierarchyElement, if this element may be contained in a Set.
service | GroupElement
| specializes HierarchyElement, if this element is a child of a Group.
Included Services inherited from SetAccess
service | HierarchyAccess
| is the basic service for accessing child and descendent nodes in a hierarchy.
service | SimpleSetAccess
| is the basic service providing information about and access to elements of a not necessarily hierarchical set.
Included Services inherited from GroupAccess
service | HierarchyAccess
| is the basic service for accessing child and descendent nodes using a view of the tree as a container of values and structuring elements.
service | PropertyHierarchy
| is the basic service for accessing child and descendent nodes using a view of the tree as a hierarchy of properties and subproperties.
Included Services inherited from AccessRootElement
service | HierarchyElement
| the basic service for accessing information about an element in the hierarchy.
Included Services inherited from SetElement
service | HierarchyElement
| is the basic service for accessing information about an element in the hierarchy.
Included Services inherited from GroupElement
service | HierarchyElement
| is the basic service for accessing information about an element in the hierarchy.

## Additional Inherited Members
Exported Interfaces inherited from HierarchyAccess
interface | com::sun::star::container::XNameAccess
| allows access to immediate children of this node.
interface | com::sun::star::container::XHierarchicalNameAccess
| allows access to all descendants of this node
interface | com::sun::star::container::XContainer
| allows attaching listeners to this node to monitor changes to immediate child nodes.
interface | com::sun::star::beans::XExactName
| provides support for inexact names.
interface | com::sun::star::beans::XPropertySetInfo
| provides information about immediate children of this node.
interface | com::sun::star::beans::XPropertyState
| provides access to the state of child elements of an implementation.
interface | com::sun::star::beans::XMultiPropertyStates
| provides access to the states of multiple child elements of an implementation.
Exported Interfaces inherited from HierarchyElement
interface | com::sun::star::container::XHierarchicalName
| provides the complete hierarchical name of this element within the hierarchy tree.
interface | com::sun::star::container::XNamed
| provides the local name of this element within its parent.
interface | com::sun::star::beans::XProperty
| provides a property descriptor for this element.
interface | com::sun::star::beans::XPropertyWithState
| provides access to the default state of this element.
interface | com::sun::star::container::XChild
| provides access to the parent of this element [optional].
Exported Interfaces inherited from SetAccess
interface | com::sun::star::container::XContainer
| allows attaching listeners to this node to monitor changes to the set.
Exported Interfaces inherited from SimpleSetAccess
interface | com::sun::star::container::XNameAccess
| is the basic service for accessing child and descendent nodes.
interface | com::sun::star::configuration::XTemplateContainer
| provides additional information about the element type.
interface | com::sun::star::util::XStringEscape
| allows normalizing and denormalizing external names.
interface | com::sun::star::container::XContainer
| allows attaching listeners to this node to monitor changes to the set.
Exported Interfaces inherited from GroupAccess
interface | com::sun::star::beans::XPropertyState
| provides access to the state of child elements of an implementation.
interface | com::sun::star::beans::XMultiPropertyStates
| provides access to the states of multiple child elements of an implementation.
Exported Interfaces inherited from PropertyHierarchy
interface | com::sun::star::beans::XPropertySet
| provides access to and information about the immediate properties of an implementation.
interface | com::sun::star::beans::XMultiPropertySet
| provides access to and information about the immediate properties of an implementation.
interface | com::sun::star::beans::XHierarchicalPropertySet
| provides access to and information about the whole hierarchy of properties and subproperties of an implementation.
interface | com::sun::star::beans::XMultiHierarchicalPropertySet
| provides access to and information about the whole hierarchy of properties and subproperties of an implementation.
Exported Interfaces inherited from AccessRootElement
interface | com::sun::star::lang::XComponent
| allows controlling or observing the lifetime of the whole hierarchy.
interface | com::sun::star::util::XChangesNotifier
| allows registering listeners that observe the whole hierarchy.
interface | com::sun::star::lang::XLocalizable
| provides access to the locale that applies to locale-dependent data in this hierarchy.
Exported Interfaces inherited from SetElement
interface | com::sun::star::container::XChild
| provides access to the containing set object.
interface | com::sun::star::lang::XComponent
| allows controlling or observing the lifetime of the object.
interface | com::sun::star::configuration::XTemplateInstance
| provides information about the type of the element.
Exported Interfaces inherited from GroupElement
interface | com::sun::star::container::XChild
| provides access to the containing group object.
Public Member Functions inherited from XNameAccess
any | getByName ([in] string aName) raises ( com::sun::star::container::NoSuchElementException, com::sun::star::lang::WrappedTargetException )
sequence< string > | getElementNames ()
boolean | hasByName ([in] string aName)
Public Member Functions inherited from XElementAccess
type | getElementType ()
boolean | hasElements ()
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.
Public Member Functions inherited from XHierarchicalNameAccess
any | getByHierarchicalName ([in] string aName) raises ( com::sun::star::container::NoSuchElementException )
boolean | hasByHierarchicalName ([in] string aName)
Public Member Functions inherited from XContainer
void | addContainerListener ([in] com::sun::star::container::XContainerListener xListener)
| adds the specified listener to receive events when elements are inserted or removed.
void | removeContainerListener ([in] com::sun::star::container::XContainerListener xListener)
| removes the specified listener so it does not receive any events from this container.
Public Member Functions inherited from XExactName
string | getExactName ([in] string aApproximateName)
Public Member Functions inherited from XHierarchicalName
string | getHierarchicalName ()
string | composeHierarchicalName ([in] string aRelativeName) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::NoSupportException )
| builds the hierarchical name of an object, given a relative name
Public Member Functions inherited from XNamed
string | getName ()
void | setName ([in] string aName)
| sets the programmatic name of the object.
Protected Member Functions inherited from XPropertySetInfo
sequence< com::sun::star::beans::Property > | getProperties ()
com::sun::star::beans::Property | getPropertyByName ([in] string aName) raises ( com::sun::star::beans::UnknownPropertyException )
boolean | hasPropertyByName ([in] string Name)
Protected Member Functions inherited from XPropertyState
com::sun::star::beans::PropertyState | getPropertyState ([in] string PropertyName) raises ( com::sun::star::beans::UnknownPropertyException )
sequence< com::sun::star::beans::PropertyState > | getPropertyStates ([in] sequence< string > aPropertyName) raises ( com::sun::star::beans::UnknownPropertyException )
void | setPropertyToDefault ([in] string PropertyName) raises ( com::sun::star::beans::UnknownPropertyException )
| Sets the property to default value.
any | getPropertyDefault ([in] string aPropertyName) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
Protected Member Functions inherited from XMultiPropertyStates
sequence< com::sun::star::beans::PropertyState > | getPropertyStates ([in] sequence< string > aPropertyName) raises ( com::sun::star::beans::UnknownPropertyException )
void | setAllPropertiesToDefault ()
| sets all properties to their default values.
void | setPropertiesToDefault ([in] sequence< string > aPropertyNames) raises ( com::sun::star::beans::UnknownPropertyException )
| sets the specified properties to their default values.
sequence< any > | getPropertyDefaults ([in] sequence< string > aPropertyNames) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
Protected Member Functions inherited from XProperty
com::sun::star::beans::Property | getAsProperty ()
Protected Member Functions inherited from XPropertyWithState
com::sun::star::beans::PropertyState | getStateAsProperty ()
void | setToDefaultAsProperty () raises ( com::sun::star::lang::WrappedTargetException )
| sets this to its default value.
com::sun::star::uno::XInterface | getDefaultAsProperty () raises ( com::sun::star::lang::WrappedTargetException )
Protected Member Functions inherited from XChild
com::sun::star::uno::XInterface | getParent ()
| grants access to the object containing this content.
void | setParent ([in] com::sun::star::uno::XInterface Parent) raises ( com::sun::star::lang::NoSupportException )
| sets the parent to this object.
Protected Member Functions inherited from XTemplateContainer
string | getElementTemplateName ()
| retrieves the name of the template
Protected Member Functions inherited from XStringEscape
string | escapeString ([in] string aString) raises ( com::sun::star::lang::IllegalArgumentException)
| encodes an arbitrary string into an escaped form compatible with some naming rules.
string | unescapeString ([in] string aEscapedString) raises ( com::sun::star::lang::IllegalArgumentException)
| decodes an escaped string into the original form.
Protected Member Functions inherited from XPropertySet
com::sun::star::beans::XPropertySetInfo | getPropertySetInfo ()
void | setPropertyValue ([in] string aPropertyName, [in] any aValue) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException )
| sets the value of the property with the specified name.
any | getPropertyValue ([in] string PropertyName) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
void | addPropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener xListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| adds an XPropertyChangeListener to the specified property.
void | removePropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| removes an XPropertyChangeListener from the listener list.
void | addVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| adds an XVetoableChangeListener to the specified property with the name PropertyName.
void | removeVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| removes an XVetoableChangeListener from the listener list.
Protected Member Functions inherited from XMultiPropertySet
com::sun::star::beans::XPropertySetInfo | getPropertySetInfo ()
void | setPropertyValues ([in] sequence< string > aPropertyNames, [in] sequence< any > aValues) raises ( com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException )
| sets the values to the properties with the specified names.
sequence< any > | getPropertyValues ([in] sequence< string > aPropertyNames)
void | addPropertiesChangeListener ([in] sequence< string > aPropertyNames, [in] com::sun::star::beans::XPropertiesChangeListener xListener)
| adds an XPropertiesChangeListener to the specified property with the specified names.
void | removePropertiesChangeListener ([in] com::sun::star::beans::XPropertiesChangeListener xListener)
| removes an XPropertiesChangeListener from the listener list.
void | firePropertiesChangeEvent ([in] sequence< string > aPropertyNames, [in] com::sun::star::beans::XPropertiesChangeListener xListener)
| fires a sequence of PropertyChangeEvents to the specified listener.
Protected Member Functions inherited from XHierarchicalPropertySet
com::sun::star::beans::XHierarchicalPropertySetInfo | getHierarchicalPropertySetInfo ()
| retrieve information about the hierarchy of properties
void | setHierarchicalPropertyValue ([in] string aHierarchicalPropertyName, [in] any aValue) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException )
| sets the value of the property with the specified nested name.
any | getHierarchicalPropertyValue ([in] string aHierarchicalPropertyName) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException )
Protected Member Functions inherited from XMultiHierarchicalPropertySet
com::sun::star::beans::XHierarchicalPropertySetInfo | getHierarchicalPropertySetInfo ()
| retrieve information about the hierarchy of properties
void | setHierarchicalPropertyValues ([in] sequence< string > aHierarchicalPropertyNames, [in] sequence< any > Values) raises ( com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException )
| sets the values of the properties with the specified nested names.
sequence< any > | getHierarchicalPropertyValues ([in] sequence< string > aPropertyNames) raises ( com::sun::star::lang::IllegalArgumentException , com::sun::star::lang::WrappedTargetException )
Protected Member Functions inherited from XComponent
void | dispose ()
| The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references.
void | addEventListener ([in] XEventListener xListener)
| adds an event listener to the object.
void | removeEventListener ([in] XEventListener aListener)
| removes an event listener from the listener list.
Protected Member Functions inherited from XChangesNotifier
void | addChangesListener ([in] com::sun::star::util::XChangesListener aListener)
| adds the specified listener to receive events when changes occurred.
void | removeChangesListener ([in] com::sun::star::util::XChangesListener aListener)
| removes the specified listener.
Protected Member Functions inherited from XLocalizable
void | setLocale ([in] Locale eLocale)
| sets the locale to be used by this object.
Locale | getLocale ()
Protected Member Functions inherited from XTemplateInstance
string | getTemplateName ()
| retrieves the name of the template

## Detailed Description

provides read access to a fragment of the configuration hierarchy.

Values that are direct or indirect descendants of a root element can be retrieved and, if themselves objects, navigated. Other interfaces provide access to information about this element and its context. Changes to values in the hierarchy can be monitored by event listeners.

Descendants of this service also implement this service.

Ultimately the configuration holds values. These values are organized into a hierarchy using structural elements. The structure is defined in advance in a schema. Necessary information from the schema is stored in the configuration repository itself and is accessible through an implementation of this service.

Two different kinds of structural elements are used in the configuration hierarchy:

Sets

  are dynamic containers of homogeneous elements. Which elements a set contains can vary. Their names are defined by the clients that insert them. On the other hand, the type of the elements is the same for all elements. In the case of elements that are themselves hierarchy objects, the type includes the structure of the hierarchy fragment they contain. Such types are defined in the configuration schema as templates.

Groups
  are static collections of heterogeneous elements. The names and types of the elements of a group are completely defined in the configuration schema. Here each element may be of a different type, allowing groups that contain a mix of subobjects and simple values.

Objects in the configuration hierarchy, for example, implementations of this service, can thus be classified in the following ways:

- Container role: An object that can hold child elements as a set or a group.
- Element role: An object may be an element of a set or a group or else it may be the root element.

Several types of simple values can be used in the configuration. In addition to the basic (scalar) types, sequences of the basic types are supported. The basic types are:

- string can hold a human-readable text.

  Values are represented as `string`.

  Sequences are represented as `string[]`.

  "<em>human-readable</em>" here excludes non-printing characters except for CR, LF and TAB [Unicode code points 9,10,13]. For binary data, use type binary instead.

- boolean can hold the values `TRUE` or `FALSE`.

  Values are represented as `boolean`.

  Sequences are represented as `boolean[]`.

- short can hold a 16-bit signed integer.

  Values are represented as `short`.

  Sequences are represented as `short[]`.

- int can hold a 32-bit signed integer.

  Values are represented as `long`.

  Sequences are represented as `long[]`.

- long can hold a 64-bit signed integer.

  Values are represented as `hyper`.

  Sequences are represented as `hyper[]`.

- double can hold a floating point number.

  Values are represented as `double`.

  Sequences are represented as `double[]`.

- binary can hold a sequence of octets.

  Values are represented as `byte[]`.

  Sequences are represented as `byte[][]`.

Within templates an additional type any can occur. When such a template is used to create a new SetElement, the type of the element is initially reported as `any` (having no value). When the value of such an element is first set, it will assume the type used.

If the schema marks a value as nullable (which is indicated by attribute com::sun::star::beans::PropertyAttribute::MAYBEVOID ), its contents may be `NULL`.

The configuration should support explicit access to default values (implementing com::sun::star::beans::XPropertyState and com::sun::star::beans::XPropertyWithState).

See also
  ConfigurationProvider Root instances of this service can be requested from a ConfigurationProvider.
  ConfigurationUpdateAccess an extended service that includes facilities for modifying configuration data.

Developers Guide
  Configuration Management - Reading Configuration Data
  Configuration Management - Object Model

## Exported Interfaces

## ◆ AccessRootElement

service AccessRootElement
| optional

specializes HierarchyElement, if this element is the Root of the whole hierarchy.

This is an alternative to SetElement or GroupElement.

See also
  ConfigurationProvider Instances obtained from a ConfigurationProvider will implement this version of HierarchyElement.

## ◆ GroupAccess

service GroupAccess
| optional

specializes HierarchyAccess, if this element is a Group.

This is an alternative to SetAccess.

## ◆ GroupElement

service GroupElement
| optional

specializes HierarchyElement, if this element is a child of a Group.

This is an alternative to AccessRootElement or SetElement.

## ◆ HierarchyAccess

service HierarchyAccess

provides interfaces to access child and descendent elements.

An implementation actually implements a specialization of this service, which depends on its Container role.

Implementations shall implement exactly one of:

- SetAccess if this element is a Set.
- GroupAccess if this element is a Group.

## ◆ HierarchyElement

service HierarchyElement

provides interfaces to obtain information about this element and its role and context in the hierarchy.

An implementation actually implements a specialization of this service, which depends on its Element role.

Implementations shall implement exactly one of:

- AccessRootElement if this element is the Root of the whole hierarchy. Objects that can be created directly by a ConfigurationProvider implement this service.
- SetElement if this element may be contained in a Set.
- GroupElement if this element is a child of a Group.

## ◆ SetAccess

service SetAccess
| optional

specializes HierarchyAccess, if this element is a Set.

This is an alternative to GroupAccess.

## ◆ SetElement

service SetElement
| optional

specializes HierarchyElement, if this element may be contained in a Set.

This is an alternative to AccessRootElement or GroupElement.

The documentation for this service was generated from the following file:

- com/sun/star/configuration/ConfigurationAccess.idl