1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_document_ExtendedTypeDetectionFactory_idl__
24#define __com_sun_star_document_ExtendedTypeDetectionFactory_idl__
25
26#ifndef __com_sun_star_lang_XMultiServiceFactory_idl__
27#include <com/sun/star/lang/XMultiServiceFactory.idl>
28#endif
29
30#ifndef __com_sun_star_container_XNameContainer_idl__
31#include <com/sun/star/container/XNameContainer.idl>
32#endif
33
34#ifndef __com_sun_star_container_XContainerQuery_idl__
35#include <com/sun/star/container/XContainerQuery.idl>
36#endif
37
38#ifndef __com_sun_star_util_XFlushable_idl__
39#include <com/sun/star/util/XFlushable.idl>
40#endif
41
42//=============================================================================
43
44module com { module sun { module star { module document {
45
46//=============================================================================
47/** factory to create extended type detection components.
48
49    <p>
50    This factory implements read/write access on the underlying configuration set.
51    and further a validate and flush mechanism for more performance and a special query mode
52    can be used here too.
53    </p>
54
55	@since OpenOffice 1.1.2
56 */
57published service ExtendedTypeDetectionFactory
58{
59    //-------------------------------------------------------------------------
60    /** factory interface to create and initialize extended type detection components.
61
62        <p>
63        A detection component must be specified by it's uno implementation name and will be crated then.
64        Every new created component can be intialized with it's own configuration data
65        and may given optional arguments of the corresponding createInstanceWithArguments() request. To do so the
66        service must support the optional interface <type scope="com::sun::star::lang">XInitialization</type>.
67        The arguments parameter will have the following structure:
68        <ul>
69            <li>sequence< Any >[0] contains a sequence< <type scope="com::sun::star::beans">PropertyValue</type> >,
70                which represent the configuration data set of this detector component. The used properties are the same, as
71                they are available at the container interface of this factoyr service. (see below)</li>
72            <li>Every following item of the argument list sequence< Any >[1..n] contains the copied argument of the
73                corresponding createInstanceWithArguments() call. That means: Item 0 or the original list was copied as
74                item 1 of the destination list ... etc.
75        </ul>
76        </p>
77     */
78    interface com::sun::star::lang::XMultiServiceFactory;
79
80	//-------------------------------------------------------------------------
81    /** provides read access to the complete set of configuration data.
82
83        <p>
84        Every container item is specified as a set of properties and will be
85        represented by a sequence< <type scope="com::sun::star::beans">PropertyValue</type> > structure.
86        Follow properties are supported:
87        (But note: not all of them must be present everytimes!)
88        </p>
89        <table border=1>
90            <tr>
91                <td><strong>Property Name</strong></td>
92                <td><strong>Value Type</strong></td>
93                <td><strong>Description</strong></td>
94            </tr>
95            <tr>
96                <td><em>Name</em></td>
97                <td>[string]</td>
98                <td>It means the uno implementation name of the detector component.
99                    Note: It means the realy the implementation instead of the uno service name.
100                    Because it's not possible to distinguish between more then one components; if all of them
101                    uses a generic service identifier!</td>
102            </tr>
103            <tr>
104                <td><em>Types</em></td>
105                <td>[sequence< string >]</td>
106                <td>It's a list of all types, which can be detected by this extended detection component.
107                    All items of this list must match an item of the <type>TypeDetection</type> container service.</td>
108            </tr>
109        </table>
110        </p>
111     */
112    interface com::sun::star::container::XNameAccess;
113
114    //-------------------------------------------------------------------------
115    /** provides a write access to the configuration data.
116     */
117    [optional] interface com::sun::star::container::XNameContainer;
118
119    //-------------------------------------------------------------------------
120    /** provides search on the configuration data set.
121
122        <p>
123        Against simple property search it provides some complex algorithms too.
124        For further informations please read the SDK documentation.
125        </p>
126     */
127    [optional] interface com::sun::star::container::XContainerQuery;
128
129    //-------------------------------------------------------------------------
130    /** can be used to perform container changes.
131
132        <p>
133        Because the complexness of such configuration set can be very high,
134        it seams not very usefull to update the undelying configuration layer
135        on every container change request immediatly. Another strategy can be to
136        make all changes (adding/changing/removing of items) and call flush at the end.
137        That will validate the whole container and reject inconsistent data sets.
138        Only in case all made changes was correct, they will be written back to the
139        configuration. Further this interface provides the possibelity, that interested
140        changes listener can be registered too.
141        </p>
142     */
143    [optional] interface com::sun::star::util::XFlushable;
144};
145
146//=============================================================================
147
148}; }; }; };
149
150#endif
151