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: XLayerHandler.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_XLayerHandler_idl__
31 #define __com_sun_star_configuration_backend_XLayerHandler_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 //=============================================================================
51 module com
{ module sun
{ module star
{ module configuration
{ module backend
{
53 //=============================================================================
55 /** receives a description of a configuration layer
56 as a sequence of events.
60 published
interface XLayerHandler
: ::com
::sun
::star
::uno
::XInterface
62 //-------------------------------------------------------------------------
64 /** receives notification that a layer description is started
67 <p> Subsequent calls describe the contents of the layer
68 until a matching call to <member>XLayerHandler::endLayer()</member>
72 @throws com::sun::star::configuration::backend::MalformedDataException
73 if there is an unfinished layer in progress
75 @throws com::sun::star::lang::WrappedTargetException
76 if an error occurs processing the event.
79 raises
( MalformedDataException
,
80 com
::sun
::star
::lang
::WrappedTargetException
);
81 //-------------------------------------------------------------------------
83 /** receives notification that a layer description is complete.
85 <p> Must match a previous call to <member>XLayerHandler::startLayer()</member>.
88 @throws com::sun::star::configuration::backend::MalformedDataException
90 <li>if invalid data is detected in the layer</li>
91 <li>if there is a unfinished subnode in progress</li>
92 <li>if no layer is started at all</li>
93 <li>if the layer tries to override read-only or final data</li>
95 <p><em>Not every implementation can detect each condition</em></p>
97 @throws com::sun::star::lang::WrappedTargetException
98 if an error occurs processing the event.
101 raises
( MalformedDataException
,
102 com
::sun
::star
::lang
::WrappedTargetException
);
103 //-------------------------------------------------------------------------
105 /** receives notification that a description of a node override is started.
107 <p> Subsequent calls describe overrides to properties and members
108 or items of the node until a matching call to
109 <member>XLayerHandler::endNode()</member>is encountered.
113 specifies the name of the node.
116 specifies attribute values to be applied to the node.
118 <p> The value is a combination of
119 <type>NodeAttribute</type> flags.
121 <p> The attributes are combined cumulatively with those
126 if <TRUE/>, specifies that the node should be cleared to an empty
127 state by removing all non-mandatory children from lower layers prior
128 to applying the overrides.
130 @throws com::sun::star::configuration::backend::MalformedDataException
132 <li>if there isn't a layer in progress</li>
133 <li>if there already was a change to that node</li>
134 <li>if there is no node with that name</li>
135 <li>if the node is marked read-only in a lower layer</li>
136 <li>if the name is not a valid node name</li>
137 <li>if the attributes are not valid for the node</li>
139 <p><em>Not every implementation can detect each condition</em></p>
141 @throws com::sun::star::lang::WrappedTargetException
142 if an error occurs processing the event.
144 @see com::sun::star::configuration::backend::NodeAttribute
146 void overrideNode
( [in] string aName
,
147 [in] short aAttributes
,
148 [in] boolean bClear
)
149 raises
( MalformedDataException
,
150 com
::sun
::star
::lang
::WrappedTargetException
);
151 //-------------------------------------------------------------------------
153 /** receives notification that a new item is started.
155 <p> The current node must be a set and
156 a preexisting item (if any) must be removeable.
158 <p> The new item will be created from the default template
161 <p> Subsequent calls describe the difference from the template
162 of properties and members or items of the node until
163 a matching call to <member>XLayerHandler::endNode()</member>
168 specifies the name of the item.
171 specifies attribute values to be applied to the new node.
173 <p> The value is a combination of
174 <type>NodeAttribute</type> flags. Note that
175 <member>NodeAttribute::FUSE</member> has an impact on the
176 semantics of this method.
179 @throws com::sun::star::configuration::backend::MalformedDataException
181 <li>if there isn't a set node in progress currently</li>
182 <li>if there already was a change to a node of that name</li>
183 <li>if the template for the new node is not found</li>
184 <li>if an item of that name on a lower layer is not removeable</li>
185 <li>if the name is not a valid item name</li>
186 <li>if the attributes are not valid for the node</li>
188 <p><em>Not every implementation can detect each condition</em></p>
190 @throws com::sun::star::lang::WrappedTargetException
191 if an error occurs processing the event.
193 @see com::sun::star::configuration::backend::NodeAttribute
195 void addOrReplaceNode
( [in] string aName
,
196 [in] short aAttributes
)
197 raises
( MalformedDataException
,
198 com
::sun
::star
::lang
::WrappedTargetException
);
199 //-------------------------------------------------------------------------
201 /** receives notification that a new item based on a particular template
204 <p> The current node must be a set and
205 a preexisting item (if any) must be removeable.
207 <p> Subsequent calls describe the difference from the template
208 of properties and members or items of the node until
209 a matching call to <member>XLayerHandler::endNode()</member>
214 specifies the name of the item.
217 specifies the template to use for the new node
220 specifies attribute values to be applied to the new node.
222 <p> The value is a combination of
223 <type>NodeAttribute</type> flags. Note that
224 <member>NodeAttribute::FUSE</member> has an impact on the
225 semantics of this method.
228 @throws com::sun::star::configuration::backend::MalformedDataException
230 <li>if there isn't a set node in progress currently</li>
231 <li>if there already was a change to a node of that name</li>
232 <li>if the template for the new node is not found</li>
233 <li>if the template is not a valid item type for the containing set</li>
234 <li>if an item of that name on a lower layer is not removeable</li>
235 <li>if the name is not a valid item name</li>
236 <li>if the attributes are not valid for the node</li>
238 <p><em>Not every implementation can detect each condition</em></p>
240 @throws com::sun::star::lang::WrappedTargetException
241 if an error occurs processing the event.
243 @see com::sun::star::configuration::backend::NodeAttribute
245 void addOrReplaceNodeFromTemplate
( [in] string aName
,
246 [in] TemplateIdentifier aTemplate
,
247 [in] short aAttributes
)
248 raises
( MalformedDataException
,
249 com
::sun
::star
::lang
::WrappedTargetException
);
250 //-------------------------------------------------------------------------
252 /** receives notification that a node description is complete.
254 <p> Must match the last open call to
255 <member>XLayerHandler::overrideNode()</member>,
256 <member>XLayerHandler::addOrReplaceNode()</member> or
257 <member>XLayerHandler::addOrReplaceNodeFromTemplate()</member>.
260 @throws com::sun::star::configuration::backend::MalformedDataException
262 <li>if invalid data is detected in the node</li>
263 <li>if no node is started at all</li>
265 <p><em>Not every implementation can detect each condition</em></p>
267 @throws com::sun::star::lang::WrappedTargetException
268 if an error occurs processing the event.
271 raises
( MalformedDataException
,
272 com
::sun
::star
::lang
::WrappedTargetException
);
273 //-------------------------------------------------------------------------
275 /** receives notification that a node is dropped from a set.
277 <p> The current node must be a set and
278 the item must be removeable.
282 specifies the name of the node.
284 @throws com::sun::star::configuration::backend::MalformedDataException
286 <li>if there isn't a set node in progress currently</li>
287 <li>if there already was a change to a node of that name</li>
288 <li>if there is no item with that name</li>
289 <li>if the item is not removeable</li>
290 <li>if the name is not a valid node name</li>
292 <p><em>Not every implementation can detect each condition</em></p>
294 @throws com::sun::star::lang::WrappedTargetException
295 if an error occurs processing the event.
297 void dropNode
( [in] string aName
)
298 raises
( MalformedDataException
,
299 com
::sun
::star
::lang
::WrappedTargetException
);
300 //-------------------------------------------------------------------------
302 /** receives notification that an existing property is modified.
304 <p> Subsequent calls describe new value(s) for the property until a
305 matching call to <member>XLayerHandler::endProperty()</member>
310 specifies the name of the property.
313 specifies the new attributes of the property.
315 <p> The value is a combination of
316 <type>NodeAttribute</type> flags.
318 <p> The attributes are combined cumulatively with those
323 specifies the type of the property.
325 <p> This must be the same type as is already defined in the schema
326 or lower layers, unless the previous type was unspecified
328 <const scope="com::sun::star::uno">TypeClass::ANY</const>.)
330 <p> A <void/> type indicates that the type is unspecified
332 In this case any subsequent value may be of a generic type
333 (e.g. <atom>string</atom> or - for list values -
334 <atom dim="[]">string</atom>.) Such values may be
335 converted to the type defined in the schema by
340 if <TRUE/>, specifies that the property should be cleared to an empty
341 state by discarding all values from lower layers prior
342 to applying the overrides.
344 @throws com::sun::star::configuration::backend::MalformedDataException
346 <li>if there isn't a group or extensible node in progress currently</li>
347 <li>if there already was a change to a property of that name</li>
348 <li>if there is no property with that name</li>
349 <li>if the property is read-only</li>
350 <li>if the type does not match the type of the property</li>
351 <li>if a type is missing and cannot be determined otherwise</li>
352 <li>if the name is not a valid property name</li>
353 <li>if the attributes are not valid for the property</li>
355 <p><em>Not every implementation can detect each condition</em></p>
357 @throws com::sun::star::lang::WrappedTargetException
358 if an error occurs processing the event.
360 @see com::sun::star::configuration::backend::NodeAttribute
362 void overrideProperty
( [in] string aName
,
363 [in] short aAttributes
,
365 [in] boolean bClear
)
366 raises
( MalformedDataException
,
367 com
::sun
::star
::lang
::WrappedTargetException
);
369 //-------------------------------------------------------------------------
371 /** receives notification that the value of the current property
375 specifies the new value of the property.
377 <p> The value must match the type of the current property.
378 If the property does not have the
379 <const>SchemaAttribute::REQUIRED</const> flag set,
380 the value can be <void/>.
382 <p> If the current property is localized, this value applies
383 to the default locale.
386 @throws com::sun::star::configuration::backend::MalformedDataException
388 <li>if there isn't a property in progress currently</li>
389 <li>if there already was a change to the value of that property</li>
390 <li>if the value does not have the proper type</li>
391 <li>if the value is not valid for the property</li>
393 <p><em>Not every implementation can detect each condition</em></p>
395 @throws com::sun::star::lang::WrappedTargetException
396 if an error occurs processing the event.
398 @see com::sun::star::configuration::backend::NodeAttribute
400 void setPropertyValue
( [in] any aValue
)
401 raises
( MalformedDataException
,
402 com
::sun
::star
::lang
::WrappedTargetException
);
404 //-------------------------------------------------------------------------
406 /** receives notification that the value of the current localized property
407 is overridden for a specific locale .
410 specifies the new value of the property.
412 <p> The value must match the type of the current property.
413 If the property does not have the
414 <const>SchemaAttribute::REQUIRED</const> flag set,
415 the value can be <void/>.
419 specifies the locale this value should apply to.
421 @throws com::sun::star::configuration::backend::MalformedDataException
423 <li>if there isn't a property in progress currently</li>
424 <li>if the current property isn't localized</li>
425 <li>if there already was a change to the property for that locale</li>
426 <li>if the value does not have the proper type</li>
427 <li>if the value is not valid for the property</li>
428 <li>if the locale is not a valid locale</li>
430 <p><em>Not every implementation can detect each condition</em></p>
432 @throws com::sun::star::lang::WrappedTargetException
433 if an error occurs processing the event.
435 @see com::sun::star::configuration::backend::NodeAttribute
437 void setPropertyValueForLocale
([in] any aValue
,
438 [in] string aLocale
)
439 raises
( MalformedDataException
,
440 com
::sun
::star
::lang
::WrappedTargetException
);
442 //-------------------------------------------------------------------------
444 /** receives notification that a property description is complete.
446 <p> Must match an open call to
447 <member>XLayerHandler::overrideProperty()</member>,
450 @throws com::sun::star::configuration::backend::MalformedDataException
452 <li>if invalid data is detected in the property</li>
453 <li>if no property is started at all</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.
461 raises
( MalformedDataException
,
462 com
::sun
::star
::lang
::WrappedTargetException
);
463 //-------------------------------------------------------------------------
465 /** receives notification that a property having a <void/> value is added
468 <p> The current node must be extensible.
472 specifies the name of the new property.
475 specifies the attributes of the new property.
477 <p> The value is a combination of
478 <type>NodeAttribute</type> flags and may also contain the
479 <const>SchemaAttribute::REQUIRED</const> flag.
481 <p> <const>NodeAttribute::MANDATORY</const> need not be set,
482 as dynamically added properties always are mandatory
483 in subsequent layers.
487 specifies the type of the new property.
489 @throws com::sun::star::configuration::backend::MalformedDataException
491 <li>if there isn't an extensible node in progress currently</li>
492 <li>if a property with that name already exists</li>
493 <li>if the specified type is not allowed for a property</li>
494 <li>if the name is not a valid property name</li>
495 <li><li>if the attributes are not valid for the property</li>
497 <p><em>Not every implementation can detect each condition</em></p>
499 @throws com::sun::star::lang::WrappedTargetException
500 if an error occurs processing the event.
502 @see com::sun::star::configuration::backend::SchemaAttribute
504 void addProperty
( [in] string aName
,
505 [in] short aAttributes
,
507 raises
( MalformedDataException
,
508 com
::sun
::star
::lang
::WrappedTargetException
);
510 //-------------------------------------------------------------------------
512 /** receives notification that a property having a non-<void/> value
513 is added to the current node.
515 <p> The current node must be extensible.
519 specifies the name of the new property.
522 specifies the attributes of the new property.
524 <p> The value is a combination of
525 <type>NodeAttribute</type> flags and may also contain the
526 <const>SchemaAttribute::REQUIRED</const> flag.
529 <p> <const>NodeAttribute::MANDATORY</const> need not be set,
530 as dynamic properties always are mandatory
531 in subsequent layers.
535 specifies the value of the new property.
537 <p> The value also determines the type.
538 Therefore the value must not be <void/>.
541 @throws com::sun::star::configuration::backend::MalformedDataException
543 <li>if there isn't an extensible node in progress currently</li>
544 <li>if a property with that name already exists</li>
545 <li>if the type of the value is not an allowed type
546 or if the value is <void/></li>
547 <li>if the name is not a valid property name</li>
548 <li>if the value is not valid for the property</li>
549 <li>if the attributes are not valid for the property</li>
551 <p><em>Not every implementation can detect each condition</em></p>
553 @throws com::sun::star::lang::WrappedTargetException
554 if an error occurs processing the event.
556 @see com::sun::star::configuration::backend::SchemaAttribute
558 void addPropertyWithValue
( [in] string aName
,
559 [in] short aAttributes
,
561 raises
( MalformedDataException
,
562 com
::sun
::star
::lang
::WrappedTargetException
);
564 //-------------------------------------------------------------------------
567 //=============================================================================
571 //=============================================================================