1*cdf0e10cSrcweir/*************************************************************************
2*cdf0e10cSrcweir *
3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir *
5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir *
7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir *
9*cdf0e10cSrcweir * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir *
11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir *
15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir *
21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir *
26*cdf0e10cSrcweir ************************************************************************/
27*cdf0e10cSrcweir#ifndef __com_sun_star_configuration_SimpleSetUpdate_idl__
28*cdf0e10cSrcweir#define __com_sun_star_configuration_SimpleSetUpdate_idl__
29*cdf0e10cSrcweir
30*cdf0e10cSrcweir#ifndef __com_sun_star_configuration_SimpleSetAccess_idl__
31*cdf0e10cSrcweir#include <com/sun/star/configuration/SimpleSetAccess.idl>
32*cdf0e10cSrcweir#endif
33*cdf0e10cSrcweir
34*cdf0e10cSrcweir#ifndef __com_sun_star_container_XNameContainer_idl__
35*cdf0e10cSrcweir#include <com/sun/star/container/XNameContainer.idl>
36*cdf0e10cSrcweir#endif
37*cdf0e10cSrcweir
38*cdf0e10cSrcweir#ifndef __com_sun_star_lang_XSingleServiceFactory_idl__
39*cdf0e10cSrcweir#include <com/sun/star/lang/XSingleServiceFactory.idl>
40*cdf0e10cSrcweir#endif
41*cdf0e10cSrcweir
42*cdf0e10cSrcweir#ifndef __com_sun_star_lang_XMultiServiceFactory_idl__
43*cdf0e10cSrcweir#include <com/sun/star/lang/XMultiServiceFactory.idl>
44*cdf0e10cSrcweir#endif
45*cdf0e10cSrcweir
46*cdf0e10cSrcweir//=============================================================================
47*cdf0e10cSrcweir
48*cdf0e10cSrcweirmodule com { module sun { module star { module configuration {
49*cdf0e10cSrcweir
50*cdf0e10cSrcweir//=============================================================================
51*cdf0e10cSrcweir/** provides write access to a dynamic, homogeneous, non-hierarchical set of
52*cdf0e10cSrcweir values or objects.
53*cdf0e10cSrcweir
54*cdf0e10cSrcweir <p>Allows adding and removing elements.
55*cdf0e10cSrcweir Helps create new elements to be added.
56*cdf0e10cSrcweir </p>
57*cdf0e10cSrcweir
58*cdf0e10cSrcweir <p>This service extends <type>SimpleSetAccess</type> to support
59*cdf0e10cSrcweir modifying the container. Any child objects shall in turn support
60*cdf0e10cSrcweir modifying access.
61*cdf0e10cSrcweir </p>
62*cdf0e10cSrcweir*/
63*cdf0e10cSrcweirpublished service SimpleSetUpdate
64*cdf0e10cSrcweir{
65*cdf0e10cSrcweir/** is the basic service providing read access to a (not necessarily
66*cdf0e10cSrcweir hierarchical) <em>set</em>.
67*cdf0e10cSrcweir*/
68*cdf0e10cSrcweir	service SimpleSetAccess;
69*cdf0e10cSrcweir
70*cdf0e10cSrcweir/** allows inserting, removing, and replacing elements.
71*cdf0e10cSrcweir
72*cdf0e10cSrcweir <p>This interface extends the interface
73*cdf0e10cSrcweir <type scope="com::sun::star::container">XNameAccess</type> supported
74*cdf0e10cSrcweir by service <type>SimpleSetAccess</type> to allow modifying the container.
75*cdf0e10cSrcweir </p>
76*cdf0e10cSrcweir
77*cdf0e10cSrcweir <p>If available, changes can be observed by registering a listener with interface
78*cdf0e10cSrcweir <type scope="com::sun::star::container">XContainer</type>.
79*cdf0e10cSrcweir </p>
80*cdf0e10cSrcweir
81*cdf0e10cSrcweir <p>If the elements of this set are of simple type (the type returned by
82*cdf0e10cSrcweir <member scope="com::sun::star::container">XElementAccess::getElementType()</member>
83*cdf0e10cSrcweir is not an interface type), then values of that type can directly be passed to
84*cdf0e10cSrcweir <member scope="com::sun::star::container">XNameContainer::insertByName()</member>
85*cdf0e10cSrcweir and
86*cdf0e10cSrcweir <member scope="com::sun::star::container">XNameContainer::replaceByName()</member>.
87*cdf0e10cSrcweir </p>
88*cdf0e10cSrcweir
89*cdf0e10cSrcweir <p>Otherwise new elements have to be constructed to match the type
90*cdf0e10cSrcweir prescribed by the element template of this set. Such elements can be created
91*cdf0e10cSrcweir using interfaces <type scope="com::sun::star::lang">XSingleServiceFactory</type>
92*cdf0e10cSrcweir and, if supported, <type scope="com::sun::star::lang">XMultiServiceFactory</type>.
93*cdf0e10cSrcweir </p>
94*cdf0e10cSrcweir
95*cdf0e10cSrcweir <p>Objects to be inserted must not be contained in any set at the time of
96*cdf0e10cSrcweir insertion. <member scope="com::sun::star::container">XChild::getParent()</member>
97*cdf0e10cSrcweir must return <NULL/>. If a name had been assigned to the object prior to insertion
98*cdf0e10cSrcweir (using <member scope="com::sun::star::container">XNamed::setName()</member>
99*cdf0e10cSrcweir or by other means), this name is ignored and will be lost.
100*cdf0e10cSrcweir After insertion the name of the object is the name that was used as argument
101*cdf0e10cSrcweir to <member scope="com::sun::star::container">XNameContainer::insertByName()</member>
102*cdf0e10cSrcweir or <member scope="com::sun::star::container">XNameContainer::replaceByName()</member>.
103*cdf0e10cSrcweir</p>
104*cdf0e10cSrcweir
105*cdf0e10cSrcweir
106*cdf0e10cSrcweir <p>Objects that are removed using
107*cdf0e10cSrcweir <member scope="com::sun::star::container">XNameContainer::removeByName()</member>
108*cdf0e10cSrcweir or replaced using
109*cdf0e10cSrcweir <member scope="com::sun::star::container">XNameContainer::replaceByName()</member>
110*cdf0e10cSrcweir remain valid and can be reinserted into a set supporting the same template and
111*cdf0e10cSrcweir even under a different name.
112*cdf0e10cSrcweir </p>
113*cdf0e10cSrcweir
114*cdf0e10cSrcweir <p>An implementation need not support insertion of objects that were not
115*cdf0e10cSrcweir obtained in one of the ways described above. If it does, the implementation
116*cdf0e10cSrcweir must reject elements that do not have the correct structure as described
117*cdf0e10cSrcweir by the template.
118*cdf0e10cSrcweir </p>
119*cdf0e10cSrcweir*/
120*cdf0e10cSrcweir	interface com::sun::star::container::XNameContainer;
121*cdf0e10cSrcweir
122*cdf0e10cSrcweir/** allows creating an object that can be inserted into this set. [conditional]
123*cdf0e10cSrcweir
124*cdf0e10cSrcweir <p>This interface shall be implemented by an implementation,
125*cdf0e10cSrcweir if and only if the element type of the set, as returned by
126*cdf0e10cSrcweir <member scope="com::sun::star::container">XElementAccess::getElementType()</member>,
127*cdf0e10cSrcweir is an object type, such as an interface.
128*cdf0e10cSrcweir </p>
129*cdf0e10cSrcweir
130*cdf0e10cSrcweir <p>Using <member scope="com::sun::star::lang">XSingleServiceFactory::createInstance()</member>
131*cdf0e10cSrcweir an instance of the element template of this set is created. If the set
132*cdf0e10cSrcweir supports multiple templates or variations of the basic template, a default
133*cdf0e10cSrcweir variant of the basic template is instantiated. If an implementation supports
134*cdf0e10cSrcweir variations, they may be specified by passing arguments to
135*cdf0e10cSrcweir <member scope="com::sun::star::lang">XSingleServiceFactory::createInstanceWithArguments()</member>.
136*cdf0e10cSrcweir There are no predefined arguments for all versions of this service.
137*cdf0e10cSrcweir </p>
138*cdf0e10cSrcweir
139*cdf0e10cSrcweir <p>The object created is not contained in the set and does not have a name yet.
140*cdf0e10cSrcweir It may subsequently be inserted into the set and named using
141*cdf0e10cSrcweir <member scope="com::sun::star::container">XNameContainer::insertByName()</member>
142*cdf0e10cSrcweir or
143*cdf0e10cSrcweir <member scope="com::sun::star::container">XNameContainer::replaceByName()</member>.
144*cdf0e10cSrcweir </p>
145*cdf0e10cSrcweir*/
146*cdf0e10cSrcweir	[optional] interface com::sun::star::lang::XSingleServiceFactory;
147*cdf0e10cSrcweir
148*cdf0e10cSrcweir/** allows creating various objects that can be inserted into this set. [optional]
149*cdf0e10cSrcweir
150*cdf0e10cSrcweir <p>This interface may be implemented by an implementation of
151*cdf0e10cSrcweir service SetUpdate to support creating elements from other than
152*cdf0e10cSrcweir the basic element template. An example of this would be an
153*cdf0e10cSrcweir implementation that supports inheritance, allowing the use of
154*cdf0e10cSrcweir templates derived from the basic template by extension.
155*cdf0e10cSrcweir </p>
156*cdf0e10cSrcweir
157*cdf0e10cSrcweir <p>This interface may only be implemented if the element type of the set
158*cdf0e10cSrcweir (as returned by
159*cdf0e10cSrcweir <member scope="com::sun::star::container">XElementAccess::getElementType()</member>)
160*cdf0e10cSrcweir is an object type, such as an interface. An implementation should also implement
161*cdf0e10cSrcweir interface <type>XTemplateContainer</type> which is optional in this service.
162*cdf0e10cSrcweir </p>
163*cdf0e10cSrcweir
164*cdf0e10cSrcweir <p>The service identifier argument passed
165*cdf0e10cSrcweir to <member scope="com::sun::star::lang">XMultiServiceFactory::createInstance()</member>
166*cdf0e10cSrcweir or <member scope="com::sun::star::lang">XMultiServiceFactory::createInstanceWithArguments()</member>
167*cdf0e10cSrcweir names the template to be instantiated or otherwise identifies the structure
168*cdf0e10cSrcweir to be built. The implementation must at least support using the template
169*cdf0e10cSrcweir name obtained from <member>XTemplateContainer::getElementTemplateName()</member>
170*cdf0e10cSrcweir as a service identifier, in which case the result shall be the same as if
171*cdf0e10cSrcweir the corresponding member of <type scope="com::sun::star::lang">XSingleServiceFactory</type>
172*cdf0e10cSrcweir had been called.
173*cdf0e10cSrcweir </p>
174*cdf0e10cSrcweir
175*cdf0e10cSrcweir*/
176*cdf0e10cSrcweir	[optional] interface com::sun::star::lang::XMultiServiceFactory;
177*cdf0e10cSrcweir
178*cdf0e10cSrcweir};
179*cdf0e10cSrcweir
180*cdf0e10cSrcweir//=============================================================================
181*cdf0e10cSrcweir
182*cdf0e10cSrcweir}; }; }; };
183*cdf0e10cSrcweir
184*cdf0e10cSrcweir#endif
185