Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

:: drafts :: com :: sun :: star :: configuration :: backend ::

interface XUpdateHandler
Base Hierarchy
::com::sun::star::uno::XInterface
 |
 +-XUpdateHandler
Description
receives a description of a configuration update or layer as a sequence of events. @todo Introcuce a special exception to indicate schema violations or improper nesting of calls.

Methods' Summary
startUpdate receives notification that a update or description is started.
endUpdate receives notification that the current update description is complete.
modifyNode receives notification that a modification of a node is started.
addOrReplaceNode receives notification that a node is started as a new item.
addOrReplaceNodeFromTemplate receives notification that a node is started as a new item based on a particular template.
endNode receives notification that a node modification is complete.
removeNode receives notification that an item is to be dropped from a set.
modifyProperty receives notification that modification of an existing property is started. .
setPropertyValue receives notification about a change to the value of the current property.
setPropertyValueForLocale receives notification about a change to the value of the current property for a specific locale.
resetPropertyValue receives notification that the value of the current property should be reset to its default.
resetPropertyValueForLocale receives notification that the value of the current property for a specific locale should be reset to its default.
endProperty receives notification that a property modification is complete.
resetProperty receives notification that a property is reset to its default state.
addOrReplaceProperty receives notification that a property having a value of void is added to the current node.
addOrReplacePropertyWithValue receives notification that a property having a non- NULL value is added to the current node.
removeProperty receives notification that a property is dropped from the current node.
Methods' Details
startUpdate
void
startUpdate(
 
[in] string 

raises(

 
aContext ) 
MalformedDataException,
::com::sun::star::container::NoSuchElementException,
::com::sun::star::lang::IllegalAccessException,
::com::sun::star::lang::IllegalArgumentException );

Description
receives notification that a update or description is started.
Parameter aContext
specifies the configuration path to the common parent node of the update.
Throws
drafts::com::sun::star::configuration::backend::MalformedDataException if the update already was started
Throws
com::sun::star::container::NoSuchElementException if the context node does not exist
Throws
com::sun::star::lang::IllegalAccessException if the context node is read-only
Throws
com::sun::star::lang::IllegalArgumentException if the argument is not a valid path.
endUpdate
void
endUpdate()
 

raises(

 
MalformedDataException,
::com::sun::star::lang::IllegalAccessException );

Description
receives notification that the current update description is complete.

Must match a previous call to XUpdateHandler::startUpdate() .

Throws
drafts::com::sun::star::configuration::backend::MalformedDataException if invalid data is detected in the update, if there is a unfinished subnode in progress or if no update is started at all.
Throws
com::sun::star::lang::IllegalAccessException if the update tries to change read-only data
modifyNode
void
modifyNode(
 
[in] string
[in] short
[in] short
[in] boolean 

raises(

 
aName,
aAttributes,
aAttributeMask,
bReset ) 
MalformedDataException,
::com::sun::star::container::NoSuchElementException,
::com::sun::star::lang::IllegalAccessException,
::com::sun::star::lang::IllegalArgumentException );

Description
receives notification that a modification of a node is started.

Subsequent calls describe changes to properties and items or members of the node until a matching call to XUpdateHandler::endNode() is encountered.

Parameter aName
specifies the name of the node.
Parameter aAttributes
specifies attribute values to be applied to the node in the current layer.

The value is a combination of NodeAttribute flags.

Only attributes which are selected in aAttributeMask are changed.

Parameter aAttributeMask
specifies which attributes should be changed for the node.

The value is a combination of NodeAttribute flags.

Parameter bReset
if true , specifies that the node should be reset to its default state as given by lower layers and the schema or template prior to applying the changes.
Throws
drafts::com::sun::star::configuration::backend::MalformedDataException if there isn't an update in progress at all or if a node is not valid in this place or if there already was a change to that node.
Throws
com::sun::star::container::NoSuchElementException if there is no node with that name.
Throws
com::sun::star::lang::IllegalAccessException if the node is read-only
Throws
com::sun::star::lang::IllegalArgumentException if the name is not a valid node name or if the attributes or mask are not valid for the node.
See also
com::sun::star::configuration::backend::NodeAttribute
addOrReplaceNode
void
addOrReplaceNode(
 
[in] string
[in] short 

raises(

 
aName,
aAttributes ) 
MalformedDataException,
::com::sun::star::container::NoSuchElementException,
::com::sun::star::container::ElementExistException,
::com::sun::star::lang::IllegalArgumentException );

Description
receives notification that a node is started as a new item.

The current node must be a set and a preexisting item (if any) must be removeable.

The new item will be created from the default template of the set.

Subsequent calls describe the difference from the template of properties, items or members of the node until a matching call to XUpdateHandler::endNode() is encountered.

Parameter aName
specifies the name of the new item.
Parameter aAttributes
specifies attribute values to be applied to the new node.

The value is a combination of NodeAttribute flags.

Throws
drafts::com::sun::star::configuration::backend::MalformedDataException if there isn't a set node in progress currently or if there already was a change to an item of that name.
Throws
com::sun::star::container::NoSuchElementException if the template for the new node is not found.
Throws
com::sun::star::container::ElementExistException if an item of that name exists and is not removeable.
Throws
com::sun::star::lang::IllegalArgumentException if the name is not a valid item name or if the attributes are not valid for the node.
See also
com::sun::star::configuration::backend::NodeAttribute
addOrReplaceNodeFromTemplate
void
addOrReplaceNodeFromTemplate(
 
[in] string
[in] TemplateIdentifier
[in] short 

raises(

 
aName,
aTemplate,
aAttributes ) 
MalformedDataException,
::com::sun::star::container::NoSuchElementException,
::com::sun::star::container::ElementExistException,
::com::sun::star::lang::IllegalArgumentException );

Description
receives notification that a node is started as a new item based on a particular template.

The current node must be a set and a preexisting item (if any) must be removeable.

Subsequent calls describe the difference from the template of properties or members of the node until a matching call to XUpdateHandler::endNode() is encountered.

Parameter aName
specifies the name of the item.
Parameter aTemplate
specifies the template to use for the new node
Parameter aAttributes
specifies attribute values to be applied to the new node.

The value is a combination of NodeAttribute flags.

Throws
drafts::com::sun::star::configuration::backend::MalformedDataException if there isn't a set node in progress currently or if there already was a change to an item of that name.
Throws
com::sun::star::container::NoSuchElementException if the template for the new node is not found.
Throws
com::sun::star::container::ElementExistException if an item of that name exists and is not removeable.
Throws
com::sun::star::lang::IllegalArgumentException if the name is not a valid item name or or if the template is not a valid item type for the containing set or if the attributes are not valid for the node.
See also
com::sun::star::configuration::backend::NodeAttribute
endNode
void
endNode()
 

raises(

 
MalformedDataException,
::com::sun::star::lang::IllegalArgumentException );

Description
receives notification that a node modification is complete.

Must match the last open call to XUpdateHandler::modifyNode() , XUpdateHandler::addOrReplaceNode() or XUpdateHandler::addOrReplaceNodeFromTemplate() .

Throws
drafts::com::sun::star::configuration::backend::MalformedDataException if invalid data is detected in the node or if no node is started at all.
removeNode
void
removeNode(
 
[in] string 

raises(

 
aName ) 
MalformedDataException,
::com::sun::star::container::NoSuchElementException,
::com::sun::star::container::ElementExistException,
::com::sun::star::lang::IllegalArgumentException );

Description
receives notification that an item is to be dropped from a set.

The current node must be a set and the item must be removeable.

Parameter aName
specifies the name of the node.
Throws
drafts::com::sun::star::configuration::backend::MalformedDataException if there isn't a set node in progress currently or if there already was a change to a node of that name.
Throws
com::sun::star::container::NoSuchElementException if there is no item with that name.
Throws
com::sun::star::container::ElementExistException if the item is not removeable
Throws
com::sun::star::lang::IllegalArgumentException if the name is not a valid node name.
modifyProperty
void
modifyProperty(
 
[in] string
[in] short
[in] short 

raises(

 
aName,
aAttributes,
aAttributeMask ) 
MalformedDataException,
::com::sun::star::beans::UnknownPropertyException,
::com::sun::star::lang::IllegalAccessException,
::com::sun::star::lang::IllegalArgumentException );

Description
receives notification that modification of an existing property is started. .

Subsequent calls describe changes to the value(s) of the property until a matching call to XUpdateHandler::endProperty() is encountered.

Parameter aName
specifies the name of the property.
Parameter aAttributes
specifies new attributes of the property.

The value is a combination of NodeAttribute flags.

Only attributes which are selected in aAttributeMask are changed.

NodeAttribute::MANDATORY need not be set and can't be removed, as dynamic properties always are mandatory in subsequent layers.

Parameter aAttributeMask
specifies which attributes should be changed for the property.

The value is a combination of NodeAttribute flags.

Throws
drafts::com::sun::star::configuration::backend::MalformedDataException if there isn't a group or extensible node in progress currently or if there already was a change to a property of that name.
Throws
com::sun::star::beans::UnknownPropertyException if there is no property with that name.
Throws
com::sun::star::lang::IllegalAccessException if the property is read-only
Throws
com::sun::star::lang::IllegalArgumentException if the name is not a valid property name or if the attributes are not valid for the property.
See also
com::sun::star::configuration::backend::NodeAttribute
setPropertyValue
void
setPropertyValue(
 
[in] any 

raises(

 
aValue ) 
MalformedDataException,
::com::sun::star::beans::IllegalTypeException,
::com::sun::star::lang::IllegalArgumentException );

Description
receives notification about a change to the value of the current property.
Parameter aValue
specifies the new value of the property.

The value must match the type of the existing property. If the property does not have the SchemaAttribute::REQUIRED flag set, the value can be void .

Throws
drafts::com::sun::star::configuration::backend::MalformedDataException if there isn't a property modification in progress currently or if there already was a change to this value.
Throws
com::sun::star::beans::IllegalTypeException if the type of the value is not an allowed type.
Throws
com::sun::star::lang::IllegalArgumentException if the value is not valid for the property.
See also
com::sun::star::configuration::backend::NodeAttribute
setPropertyValueForLocale
void
setPropertyValueForLocale(
 
[in] any
[in] string 

raises(

 
aValue,
aLocale ) 
MalformedDataException,
::com::sun::star::beans::IllegalTypeException,
::com::sun::star::lang::IllegalArgumentException );

Description
receives notification about a change to the value of the current property for a specific locale.
Parameter aValue
specifies the new value of the property for the given locale.

The value must match the type of the existing property. If the property does not have the SchemaAttribute::REQUIRED flag set, the value can be void .

Parameter aLocale
specifies the locale that the new value applies to.
Throws
drafts::com::sun::star::configuration::backend::MalformedDataException if there isn't a property modification in progress currently, if the property is not localizable or if there already was a change to this value.
Throws
com::sun::star::beans::IllegalTypeException if the type of the value is not an allowed type.
Throws
com::sun::star::lang::IllegalArgumentException if the value is not valid for the property or if the locale is not a valid locale name.
See also
com::sun::star::configuration::backend::NodeAttribute
resetPropertyValue
void
resetPropertyValue()
 

raises(

 
MalformedDataException );

Description
receives notification that the value of the current property should be reset to its default.
Throws
drafts::com::sun::star::configuration::backend::MalformedDataException if there isn't a property modification in progress currently or if there already was a change to this value.
See also
com::sun::star::configuration::backend::NodeAttribute
resetPropertyValueForLocale
void
resetPropertyValueForLocale(
 
[in] string 

raises(

 
aLocale ) 
MalformedDataException,
::com::sun::star::lang::IllegalArgumentException );

Description
receives notification that the value of the current property for a specific locale should be reset to its default.
Parameter aLocale
specifies the locale the change applies to.
Throws
drafts::com::sun::star::configuration::backend::MalformedDataException if there isn't a property modification in progress currently, if the property is not localizable or if there already was a change to this value.
Throws
com::sun::star::lang::IllegalArgumentException if the locale is not a valid locale name.
See also
com::sun::star::configuration::backend::NodeAttribute
endProperty
void
endProperty()
 

raises(

 
MalformedDataException );

Description
receives notification that a property modification is complete.

Must match the last open call to XUpdateHandler::modifyProperty() .

Throws
drafts::com::sun::star::configuration::backend::MalformedDataException if invalid data is detected in the property or if no property is started at all.
resetProperty
void
resetProperty(
 
[in] string 

raises(

 
aName ) 
MalformedDataException,
::com::sun::star::beans::UnknownPropertyException,
::com::sun::star::lang::IllegalAccessException,
::com::sun::star::lang::IllegalArgumentException );

Description
receives notification that a property is reset to its default state.
Parameter aName
specifies the name of the property.
Throws
drafts::com::sun::star::configuration::backend::MalformedDataException if there isn't a group or extensible node in progress currently or if there already was a change to a property of that name.
Throws
com::sun::star::beans::UnknownPropertyException if there is no property with that name, or if the property has no default.
Throws
com::sun::star::lang::IllegalAccessException if the property is read-only
Throws
com::sun::star::lang::IllegalArgumentException if the name is not a valid property name.
See also
com::sun::star::configuration::backend::NodeAttribute
addOrReplaceProperty
void
addOrReplaceProperty(
 
[in] string
[in] short
[in] type 

raises(

 
aName,
aAttributes,
aType ) 
MalformedDataException,
::com::sun::star::beans::PropertyExistException,
::com::sun::star::beans::IllegalTypeException,
::com::sun::star::lang::IllegalArgumentException );

Description
receives notification that a property having a value of void is added to the current node.

The current node must be extensible and a preexisting property (if any) must be removeable in this layer.

Parameter aName
specifies the name of the new property.
Parameter aAttributes
specifies the attributes of the new property.

The value is a combination of NodeAttribute flags and may also contain the SchemaAttribute::REQUIRED flag.

NodeAttribute::MANDATORY need not be set, as dynamic properties always are mandatory in subsequent layers.

Parameter aType
specifies the type of the new property.
Throws
drafts::com::sun::star::configuration::backend::MalformedDataException if there isn't a group or extensible node in progress currently or if there already was a change to a property of that name.
Throws
com::sun::star::beans::PropertyExistException if a property of that name exists and is not removeable
Throws
com::sun::star::beans::IllegalTypeException if the specified type is not allowed
Throws
com::sun::star::lang::IllegalArgumentException if the name is not a valid property name or if the attributes are not valid for the property.
See also
com::sun::star::configuration::backend::SchemaAttribute
addOrReplacePropertyWithValue
void
addOrReplacePropertyWithValue(
 
[in] string
[in] short
[in] any 

raises(

 
aName,
aAttributes,
aValue ) 
MalformedDataException,
::com::sun::star::beans::PropertyExistException,
::com::sun::star::beans::IllegalTypeException,
::com::sun::star::lang::IllegalArgumentException );

Description
receives notification that a property having a non- NULL value is added to the current node.

The current node must be extensible and a preexisting property (if any) must be removeable in this layer.

Parameter aName
specifies the name of the new property.
Parameter aAttributes
specifies the attributes of the new property.

The value is a combination of NodeAttribute flags and may also contain the SchemaAttribute::REQUIRED flag.

NodeAttribute::MANDATORY need not be set, as dynamic properties always are mandatory in subsequent layers.

Parameter aValue
specifies the value of the new property.

The value also determines the type. Therefore the value must not be void .

Throws
drafts::com::sun::star::configuration::backend::MalformedDataException if there isn't a group or extensible node in progress currently or if there already was a change to a property of that name.
Throws
com::sun::star::beans::PropertyExistException if a property of that name exists and is not removeable
Throws
com::sun::star::beans::IllegalTypeException if the type of the value is not an allowed type, or if the value is void .
Throws
com::sun::star::lang::IllegalArgumentException if the name is not a valid property name or if the attributes are not valid for the property.
See also
com::sun::star::configuration::backend::SchemaAttribute
removeProperty
void
removeProperty(
 
[in] string 

raises(

 
aName ) 
MalformedDataException,
::com::sun::star::beans::UnknownPropertyException,
::com::sun::star::beans::PropertyExistException,
::com::sun::star::lang::IllegalArgumentException );

Description
receives notification that a property is dropped from the current node.

The current node must be extensible and the property removeable.

Parameter aName
specifies the name of the property.
Throws
drafts::com::sun::star::configuration::backend::MalformedDataException if there isn't a group or extensible node in progress currently
Throws
com::sun::star::beans::UnknownPropertyException if there is no property with that name.
Throws
com::sun::star::beans::PropertyExistException if the property is not removeable
Throws
com::sun::star::lang::IllegalArgumentException if the name is not a valid node name.
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.