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#ifndef __com_sun_star_document_ExtendedTypeDetectionFactory_idl__ 23#define __com_sun_star_document_ExtendedTypeDetectionFactory_idl__ 24 25#ifndef __com_sun_star_lang_XMultiServiceFactory_idl__ 26#include <com/sun/star/lang/XMultiServiceFactory.idl> 27#endif 28 29#ifndef __com_sun_star_container_XNameContainer_idl__ 30#include <com/sun/star/container/XNameContainer.idl> 31#endif 32 33#ifndef __com_sun_star_container_XContainerQuery_idl__ 34#include <com/sun/star/container/XContainerQuery.idl> 35#endif 36 37#ifndef __com_sun_star_util_XFlushable_idl__ 38#include <com/sun/star/util/XFlushable.idl> 39#endif 40 41//============================================================================= 42 43module com { module sun { module star { module document { 44 45//============================================================================= 46/** factory to create extended type detection components. 47 48 <p> 49 This factory implements read/write access on the underlying configuration set. 50 and further a validate and flush mechanism for more performance and a special query mode 51 can be used here too. 52 </p> 53 54 @since OpenOffice 1.1.2 55 */ 56published service ExtendedTypeDetectionFactory 57{ 58 //------------------------------------------------------------------------- 59 /** factory interface to create and initialize extended type detection components. 60 61 <p> 62 A detection component must be specified by its uno implementation name and will be created then. 63 Every new created component can be initialized with its own configuration data 64 and may given optional arguments of the corresponding createInstanceWithArguments() request. To do so the 65 service must support the optional interface <type scope="com::sun::star::lang">XInitialization</type>. 66 The arguments parameter will have the following structure: 67 <ul> 68 <li>sequence< Any >[0] contains a sequence< <type scope="com::sun::star::beans">PropertyValue</type> >, 69 which represent the configuration data set of this detector component. The used properties are the same, as 70 they are available at the container interface of this factory service. (see below)</li> 71 <li>Every following item of the argument list sequence< Any >[1..n] contains the copied argument of the 72 corresponding createInstanceWithArguments() call. That means: Item 0 or the original list was copied as 73 item 1 of the destination list ... etc. 74 </ul> 75 </p> 76 */ 77 interface com::sun::star::lang::XMultiServiceFactory; 78 79 //------------------------------------------------------------------------- 80 /** provides read access to the complete set of configuration data. 81 82 <p> 83 Every container item is specified as a set of properties and will be 84 represented by a sequence< <type scope="com::sun::star::beans">PropertyValue</type> > structure. 85 Follow properties are supported: 86 (But note: not all of them must be present every time!) 87 </p> 88 <table border=1> 89 <tr> 90 <td><strong>Property Name</strong></td> 91 <td><strong>Value Type</strong></td> 92 <td><strong>Description</strong></td> 93 </tr> 94 <tr> 95 <td><em>Name</em></td> 96 <td>[string]</td> 97 <td>It means the uno implementation name of the detector component. 98 Note: It means the really the implementation instead of the uno service name. 99 Because it's not possible to distinguish between more then one components; if all of them 100 uses a generic service identifier!</td> 101 </tr> 102 <tr> 103 <td><em>Types</em></td> 104 <td>[sequence< string >]</td> 105 <td>It's a list of all types, which can be detected by this extended detection component. 106 All items of this list must match an item of the <type>TypeDetection</type> container service.</td> 107 </tr> 108 </table> 109 </p> 110 */ 111 interface com::sun::star::container::XNameAccess; 112 113 //------------------------------------------------------------------------- 114 /** provides a write access to the configuration data. 115 */ 116 [optional] interface com::sun::star::container::XNameContainer; 117 118 //------------------------------------------------------------------------- 119 /** provides search on the configuration data set. 120 121 <p> 122 Against simple property search it provides some complex algorithms too. 123 For further informations please read the SDK documentation. 124 </p> 125 */ 126 [optional] interface com::sun::star::container::XContainerQuery; 127 128 //------------------------------------------------------------------------- 129 /** can be used to perform container changes. 130 131 <p> 132 Because the complexity of such configuration set can be very high, 133 it does not seem very useful to update the underlying configuration layer 134 on every container change request immediately. Another strategy can be to 135 make all changes (adding/changing/removing of items) and call flush at the end. 136 That will validate the whole container and reject inconsistent data sets. 137 Only in case all made changes was correct, they will be written back to the 138 configuration. Further this interface provides the possibility, that interested 139 changes listener can be registered too. 140 </p> 141 */ 142 [optional] interface com::sun::star::util::XFlushable; 143}; 144 145//============================================================================= 146 147}; }; }; }; 148 149#endif 150