1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XUpdateHandler.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_configuration_backend_XUpdateHandler_idl__
31 #define __com_sun_star_configuration_backend_XUpdateHandler_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include
<com
/sun
/star
/uno
/XInterface.idl
>
37 #ifndef __com_sun_star_configuration_backend_TemplateIdentifier_idl__
38 #include
<com
/sun
/star
/configuration
/backend
/TemplateIdentifier.idl
>
41 #ifndef __com_sun_star_configuration_backend_MalformedDataException_idl__
42 #include
<com
/sun
/star
/configuration
/backend
/MalformedDataException.idl
>
45 #ifndef __com_sun_star_lang_WrappedTargetException_idl__
46 #include
<com
/sun
/star
/lang
/WrappedTargetException.idl
>
49 #ifndef __com_sun_star_lang_IllegalAccessException_idl__
50 #include
<com
/sun
/star
/lang
/IllegalAccessException.idl
>
53 //=============================================================================
55 module com
{ module sun
{ module star
{ module configuration
{ module backend
{
57 //=============================================================================
59 /** receives a description of a configuration update or layer
60 as a sequence of events.
64 published
interface XUpdateHandler
: ::com
::sun
::star
::uno
::XInterface
66 //-------------------------------------------------------------------------
68 /** receives notification that a update or description is started.
70 @throws com::sun::star::configuration::backend::MalformedDataException
71 if the update already was started
73 @throws com::sun::star::lang::IllegalAccessException
74 if the target layer is read-only
75 <p><em>Some implementations can only detect this when executing
76 <member>XUpdateHandler::endUpdate()</member></em>
79 @throws com::sun::star::lang::WrappedTargetException
80 if an error occurs processing the event.
83 raises
( MalformedDataException
,
84 com
::sun
::star
::lang
::IllegalAccessException
,
85 com
::sun
::star
::lang
::WrappedTargetException
);
86 //-------------------------------------------------------------------------
88 /** receives notification that the current update description is complete.
90 <p> Must match a previous call to <member>XUpdateHandler::startUpdate()</member>.
93 @throws com::sun::star::configuration::backend::MalformedDataException
95 <li>if no update is started at all</li>
96 <li>if invalid data is detected in the update</li>
97 <li>if there is an unfinished subnode in progress</li>
98 <li>if the update tries to change read-only data</li>
100 <p><em>Not every implementation can detect each condition</em></p>
102 @throws com::sun::star::lang::IllegalAccessException
103 if the target layer is read-only
105 @throws com::sun::star::lang::WrappedTargetException
106 if an error occurs processing the event.
109 raises
( MalformedDataException
,
110 com
::sun
::star
::lang
::IllegalAccessException
,
111 com
::sun
::star
::lang
::WrappedTargetException
);
112 //-------------------------------------------------------------------------
114 /** receives notification that a modification of a node is started.
116 <p> Subsequent calls describe changes to properties and items or
117 members of the node until a matching call to
118 <member>XUpdateHandler::endNode()</member> is encountered.
122 specifies the name of the node.
125 specifies attribute values to be applied to the node in the
128 <p> The value is a combination of
129 <type>NodeAttribute</type> flags.
131 <p> Only attributes which are selected in aAttributeMask
135 @param aAttributeMask
136 specifies which attributes should be changed for the node.
138 <p> The value is a combination of
139 <type>NodeAttribute</type> flags.
143 if <TRUE/>, specifies that the node should be reset to its default
144 state as given by lower layers and the schema or template prior
145 to applying the changes.
147 @throws com::sun::star::configuration::backend::MalformedDataException
149 <li>if there isn't an update in progress at all</li>
150 <li>if a node is not valid in this place</li>
151 <li>if there already was a change to that node</li>
152 <li>if there is no node with that name</li>
153 <li>if the node is read-only</li>
154 <li>if the name is not a valid node name</li>
155 <li>if the attributes or mask are not valid for the node</li>
157 <p><em>Not every implementation can detect each condition</em></p>
159 @throws com::sun::star::lang::WrappedTargetException
160 if an error occurs processing the event.
162 @see com::sun::star::configuration::backend::NodeAttribute
164 void modifyNode
( [in] string aName
,
165 [in] short aAttributes
,
166 [in] short aAttributeMask
,
167 [in] boolean bReset
)
168 raises
( MalformedDataException
,
169 com
::sun
::star
::lang
::WrappedTargetException
);
170 //-------------------------------------------------------------------------
172 /** receives notification that a node is started as a new item.
174 <p> The current node must be a set and
175 a preexisting item (if any) must be removeable.
177 <p> The new item will be created from the default template
180 <p> Subsequent calls describe the difference from the template
181 of properties, items or members of the node until a matching call
182 to <member>XUpdateHandler::endNode()</member> is encountered.
186 specifies the name of the new item.
189 specifies attribute values to be applied to the new node.
191 <p> The value is a combination of
192 <type>NodeAttribute</type> flags. Note that
193 <member>NodeAttribute::FUSE</member> has an impact on the
194 semantics of this method.
197 @throws com::sun::star::configuration::backend::MalformedDataException
199 <li>if there isn't a set node in progress currently</li>
200 <li>if there already was a change to an item of that name</li>
201 <li>if the template for the new node is not found</li>
202 <li>if an item of that name exists and is not removeable</li>
203 <li>if the name is not a valid item name</li>
204 <li>if the attributes are not valid for the node</li>
206 <p><em>Not every implementation can detect each condition</em></p>
208 @throws com::sun::star::lang::WrappedTargetException
209 if an error occurs processing the event.
211 @see com::sun::star::configuration::backend::NodeAttribute
213 void addOrReplaceNode
( [in] string aName
,
214 [in] short aAttributes
)
215 raises
( MalformedDataException
,
216 com
::sun
::star
::lang
::WrappedTargetException
);
217 //-------------------------------------------------------------------------
219 /** receives notification that a node is started as a new item
220 based on a particular template.
222 <p> The current node must be a set and
223 a preexisting item (if any) must be removeable.
225 <p> Subsequent calls describe the difference from the template
226 of properties or members of the node until a matching call
227 to <member>XUpdateHandler::endNode()</member> is encountered.
231 specifies the name of the item.
234 specifies the template to use for the new node
237 specifies attribute values to be applied to the new node.
239 <p> The value is a combination of
240 <type>NodeAttribute</type> flags. Note that
241 <member>NodeAttribute::FUSE</member> has an impact on the
242 semantics of this method.
245 @throws com::sun::star::configuration::backend::MalformedDataException
247 <li>if there isn't a set node in progress currently</li>
248 <li>if there already was a change to an item of that name</li>
249 <li>if the template for the new node is not found</li>
250 <li>if an item of that name exists and is not removeable</li>
251 <li>if the name is not a valid item name</li>
252 <li>if the template is not a valid item type for the containing set</li>
253 <li>if the attributes are not valid for the node</li>
255 <p><em>Not every implementation can detect each condition</em></p>
257 @throws com::sun::star::lang::WrappedTargetException
258 if an error occurs processing the event.
260 @see com::sun::star::configuration::backend::NodeAttribute
262 void addOrReplaceNodeFromTemplate
( [in] string aName
,
263 [in] short aAttributes
,
264 [in] TemplateIdentifier aTemplate
)
265 raises
( MalformedDataException
,
266 com
::sun
::star
::lang
::WrappedTargetException
);
267 //-------------------------------------------------------------------------
269 /** receives notification that a node modification is complete.
271 <p> Must match the last open call to
272 <member>XUpdateHandler::modifyNode()</member>,
273 <member>XUpdateHandler::addOrReplaceNode()</member> or
274 <member>XUpdateHandler::addOrReplaceNodeFromTemplate()</member>.
277 @throws com::sun::star::configuration::backend::MalformedDataException
279 <li>if invalid data is detected in the node</li>
280 <li>if no node is started at all</li>
282 <p><em>Not every implementation can detect each condition</em></p>
284 @throws com::sun::star::lang::WrappedTargetException
285 if an error occurs processing the event.
288 raises
( MalformedDataException
,
289 com
::sun
::star
::lang
::WrappedTargetException
);
290 //-------------------------------------------------------------------------
292 /** receives notification that an item is to be dropped from a set.
294 <p> The current node must be a set and
295 the item must be removeable.
299 specifies the name of the node.
301 @throws com::sun::star::configuration::backend::MalformedDataException
303 <li>if there isn't a set node in progress currently</li>
304 <li>if there already was a change to a node of that name</li>
305 <li>if there is no item with that name</li>
306 <li>if the item is not removeable</li>
307 <li>if the name is not a valid node name</li>
309 <p><em>Not every implementation can detect each condition</em></p>
311 @throws com::sun::star::lang::WrappedTargetException
312 if an error occurs processing the event.
314 void removeNode
( [in] string aName
)
315 raises
( MalformedDataException
,
316 com
::sun
::star
::lang
::WrappedTargetException
);
317 //-------------------------------------------------------------------------
319 /** receives notification that modification of an existing property is started. .
321 <p> Subsequent calls describe changes to the value(s)
322 of the property until a matching call to
323 <member>XUpdateHandler::endProperty()</member> is encountered.
327 specifies the name of the property.
330 specifies new attributes of the property.
332 <p> The value is a combination of
333 <type>NodeAttribute</type> flags.
335 <p> Only attributes which are selected in aAttributeMask are changed.
337 <p> <const>NodeAttribute::MANDATORY</const> need not be set
338 and can't be removed, as dynamic properties always are mandatory
339 in subsequent layers.
342 @param aAttributeMask
343 specifies which attributes should be changed for the property.
345 <p> The value is a combination of
346 <type>NodeAttribute</type> flags.
350 specifies the type of the property.
352 <p> A <void/> type can be used to signify that
353 the type is unknown and should not be recorded.
356 @throws com::sun::star::configuration::backend::MalformedDataException
358 <li>if there isn't a group or extensible node in progress currently</li>
359 <li>if there already was a change to a property of that name</li>
360 <li>if there is no property with that name</li>
361 <li>if the property is read-only</li>
362 <li>if the name is not a valid property name</li>
363 <li>if the attributes are not valid for the property</li>
365 <p><em>Not every implementation can detect each condition</em></p>
367 @throws com::sun::star::lang::WrappedTargetException
368 if an error occurs processing the event.
370 @see com::sun::star::configuration::backend::NodeAttribute
372 void modifyProperty
( [in] string aName
,
373 [in] short aAttributes
,
374 [in] short aAttributeMask
,
376 raises
( MalformedDataException
,
377 com
::sun
::star
::lang
::WrappedTargetException
);
378 //-------------------------------------------------------------------------
380 /** receives notification about a change to the value of
381 the current property.
384 specifies the new value of the property.
386 <p> The value must match the type of the existing property.
387 If the property does not have the
388 <const>SchemaAttribute::REQUIRED</const> flag set,
389 the value can be <void/>.
392 @throws com::sun::star::configuration::backend::MalformedDataException
394 <li>if there isn't a property modification in progress currently</li>
395 <li>if there already was a change to this value</li>
396 <li>if the type of the value is not an allowed type</li>
397 <li>if the value is not valid for the property</li>
399 <p><em>Not every implementation can detect each condition</em></p>
401 @throws com::sun::star::lang::WrappedTargetException
402 if an error occurs processing the event.
404 @see com::sun::star::configuration::backend::NodeAttribute
406 void setPropertyValue
( [in] any aValue
)
407 raises
( MalformedDataException
,
408 com
::sun
::star
::lang
::WrappedTargetException
);
409 //-------------------------------------------------------------------------
411 /** receives notification about a change to the value of
412 the current property for a specific locale.
415 specifies the new value of the property for the given locale.
417 <p> The value must match the type of the existing property.
418 If the property does not have the
419 <const>SchemaAttribute::REQUIRED</const> flag set,
420 the value can be <void/>.
424 specifies the locale that the new value applies to.
426 @throws com::sun::star::configuration::backend::MalformedDataException
428 <li>if there isn't a property modification in progress currently</li>
429 <li>if the property is not localizable</li>
430 <li>if there already was a change to this value</li>
431 <li>if the type of the value is not an allowed type</li>
432 <li>if the value is not valid for the property</li>
433 <li>if the locale is not a valid locale name</li>
435 <p><em>Not every implementation can detect each condition</em></p>
437 @throws com::sun::star::lang::WrappedTargetException
438 if an error occurs processing the event.
440 @see com::sun::star::configuration::backend::NodeAttribute
442 void setPropertyValueForLocale
( [in] any aValue
, [in] string aLocale
)
443 raises
( MalformedDataException
,
444 com
::sun
::star
::lang
::WrappedTargetException
);
445 //-------------------------------------------------------------------------
447 /** receives notification that the value of the current property
448 should be reset to its default.
450 @throws com::sun::star::configuration::backend::MalformedDataException
452 <li>if there isn't a property modification in progress currently</li>
453 <li>if there already was a change to this value</li>
455 <p><em>Not every implementation can detect each condition</em></p>
457 @throws com::sun::star::lang::WrappedTargetException
458 if an error occurs processing the event.
460 @see com::sun::star::configuration::backend::NodeAttribute
462 void resetPropertyValue
( )
463 raises
( MalformedDataException
,
464 com
::sun
::star
::lang
::WrappedTargetException
);
465 //-------------------------------------------------------------------------
467 /** receives notification that the value of the current property
468 for a specific locale should be reset to its default.
471 specifies the locale the change applies to.
473 @throws com::sun::star::configuration::backend::MalformedDataException
475 <li>if there isn't a property modification in progress currently</li>
476 <li>if the property is not localizable</li>
477 <li>if there already was a change to this value</li>
478 <li>if the locale is not a valid locale name</li>
480 <p><em>Not every implementation can detect each condition</em></p>
482 @throws com::sun::star::lang::WrappedTargetException
483 if an error occurs processing the event.
485 @see com::sun::star::configuration::backend::NodeAttribute
487 void resetPropertyValueForLocale
( [in] string aLocale
)
488 raises
( MalformedDataException
,
489 com
::sun
::star
::lang
::WrappedTargetException
);
490 //-------------------------------------------------------------------------
492 /** receives notification that a property modification is complete.
494 <p> Must match the last open call to
495 <member>XUpdateHandler::modifyProperty()</member>.
498 @throws com::sun::star::configuration::backend::MalformedDataException
500 <li>if invalid data is detected in the property</li>
501 <li>if no property is started at all</li>
503 <p><em>Not every implementation can detect each condition</em></p>
505 @throws com::sun::star::lang::WrappedTargetException
506 if an error occurs processing the event.
509 raises
( MalformedDataException
,
510 com
::sun
::star
::lang
::WrappedTargetException
);
511 //-------------------------------------------------------------------------
513 /** receives notification that a property is reset to its default state.
516 specifies the name of the property.
518 @throws com::sun::star::configuration::backend::MalformedDataException
520 <li>if there isn't a group or extensible node in progress currently</li>
521 <li>if there already was a change to a property of that name</li>
522 <li>if there is no property with that name, or if the property
524 <li>if the property is read-only</li>
525 <li>if the name is not a valid property name</li>
527 <p><em>Not every implementation can detect each condition</em></p>
529 @throws com::sun::star::lang::WrappedTargetException
530 if an error occurs processing the event.
532 @see com::sun::star::configuration::backend::NodeAttribute
534 void resetProperty
( [in] string aName
)
535 raises
( MalformedDataException
,
536 com
::sun
::star
::lang
::WrappedTargetException
);
537 //-------------------------------------------------------------------------
539 /** receives notification that a property having a value of <void/>
540 is added to the current node.
542 <p> The current node must be extensible and
543 a preexisting property (if any) must be
544 removeable in this layer.
548 specifies the name of the new property.
551 specifies the attributes of the new property.
553 <p> The value is a combination of
554 <type>NodeAttribute</type> flags and may also contain the
555 <const>SchemaAttribute::REQUIRED</const> flag.
558 <p> <const>NodeAttribute::MANDATORY</const> need not be set,
559 as dynamic properties always are mandatory
560 in subsequent layers.
564 specifies the type of the new property.
566 @throws com::sun::star::configuration::backend::MalformedDataException
568 <li>if there isn't a group or extensible node in progress currently</li>
569 <li>if there already was a change to a property of that name</li>
570 <li>if a property of that name exists and is not removeable</li>
571 <li>if the specified type is not allowed</li>
572 <li>if the name is not a valid property name</li>
573 <li>if the attributes are not valid for the property</li>
575 <p><em>Not every implementation can detect each condition</em></p>
577 @throws com::sun::star::lang::WrappedTargetException
578 if an error occurs processing the event.
580 @see com::sun::star::configuration::backend::SchemaAttribute
582 void addOrReplaceProperty
( [in] string aName
,
583 [in] short aAttributes
,
585 raises
( MalformedDataException
,
586 com
::sun
::star
::lang
::WrappedTargetException
);
587 //-------------------------------------------------------------------------
589 /** receives notification that a property having a non-<NULL/> value
590 is added to the current node.
592 <p> The current node must be extensible and
593 a preexisting property (if any) must be
594 removeable in this layer.
598 specifies the name of the new property.
601 specifies the attributes of the new property.
603 <p> The value is a combination of
604 <type>NodeAttribute</type> flags and may also contain the
605 <const>SchemaAttribute::REQUIRED</const> flag.
608 <p> <const>NodeAttribute::MANDATORY</const> need not be set,
609 as dynamic properties always are mandatory
610 in subsequent layers.
614 specifies the value of the new property.
616 <p> The value also determines the type.
617 Therefore the value must not be <void/>.
620 @throws com::sun::star::configuration::backend::MalformedDataException
622 <li>if there isn't a group or extensible node in progress currently</li>
623 <li>if there already was a change to a property of that name</li>
624 <li>if a property of that name exists and is not removeable</li>
625 <li>if the type of the value is not an allowed type,
626 or if the value is <void/></li>
627 <li>if the name is not a valid property name</li>
628 <li>if the attributes are not valid for the property</li>
630 <p><em>Not every implementation can detect each condition</em></p>
632 @throws com::sun::star::lang::WrappedTargetException
633 if an error occurs processing the event.
635 @see com::sun::star::configuration::backend::SchemaAttribute
637 void addOrReplacePropertyWithValue
( [in] string aName
,
638 [in] short aAttributes
,
640 raises
( MalformedDataException
,
641 com
::sun
::star
::lang
::WrappedTargetException
);
642 //-------------------------------------------------------------------------
644 /** receives notification that a property is dropped from the current node.
646 <p>The current node must be extensible and the property removeable.</p>
649 specifies the name of the property.
651 @throws com::sun::star::configuration::backend::MalformedDataException
653 <li>if there isn't a group or extensible node in progress currently</li>
654 <li>if there is no property with that name</li>
655 <li>if the property is not removeable</li>
656 <li>if the name is not a valid node name</li>
658 <p><em>Not every implementation can detect each condition</em></p>
660 @throws com::sun::star::lang::WrappedTargetException
661 if an error occurs processing the event.
663 void removeProperty
( [in] string aName
)
664 raises
( MalformedDataException
,
665 com
::sun
::star
::lang
::WrappedTargetException
);
666 //-------------------------------------------------------------------------
670 //=============================================================================
674 //=============================================================================