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_ConfigurationAccess_idl__ 28*cdf0e10cSrcweir#define __com_sun_star_configuration_ConfigurationAccess_idl__ 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir#ifndef __com_sun_star_configuration_HierarchyAccess_idl__ 31*cdf0e10cSrcweir#include <com/sun/star/configuration/HierarchyAccess.idl> 32*cdf0e10cSrcweir#endif 33*cdf0e10cSrcweir 34*cdf0e10cSrcweir#ifndef __com_sun_star_configuration_HierarchyElement_idl__ 35*cdf0e10cSrcweir#include <com/sun/star/configuration/HierarchyElement.idl> 36*cdf0e10cSrcweir#endif 37*cdf0e10cSrcweir 38*cdf0e10cSrcweir#ifndef __com_sun_star_configuration_SetAccess_idl__ 39*cdf0e10cSrcweir#include <com/sun/star/configuration/SetAccess.idl> 40*cdf0e10cSrcweir#endif 41*cdf0e10cSrcweir 42*cdf0e10cSrcweir#ifndef __com_sun_star_configuration_GroupAccess_idl__ 43*cdf0e10cSrcweir#include <com/sun/star/configuration/GroupAccess.idl> 44*cdf0e10cSrcweir#endif 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir#ifndef __com_sun_star_configuration_AccessRootElement_idl__ 47*cdf0e10cSrcweir#include <com/sun/star/configuration/AccessRootElement.idl> 48*cdf0e10cSrcweir#endif 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir#ifndef __com_sun_star_configuration_SetElement_idl__ 51*cdf0e10cSrcweir#include <com/sun/star/configuration/SetElement.idl> 52*cdf0e10cSrcweir#endif 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir#ifndef __com_sun_star_configuration_GroupElement_idl__ 55*cdf0e10cSrcweir#include <com/sun/star/configuration/GroupElement.idl> 56*cdf0e10cSrcweir#endif 57*cdf0e10cSrcweir 58*cdf0e10cSrcweir//============================================================================= 59*cdf0e10cSrcweir 60*cdf0e10cSrcweirmodule com { module sun { module star { module configuration { 61*cdf0e10cSrcweir 62*cdf0e10cSrcweir//============================================================================= 63*cdf0e10cSrcweir/** provides read access to a fragment of the configuration hierarchy. 64*cdf0e10cSrcweir 65*cdf0e10cSrcweir <p>Values that are direct or indirect descendants of a root element can be 66*cdf0e10cSrcweir retrieved and, if themselves objects, navigated. Other interfaces provide 67*cdf0e10cSrcweir access to information about this element and its context. 68*cdf0e10cSrcweir Changes to values in the hierarchy can be monitored by event listeners. 69*cdf0e10cSrcweir </p> 70*cdf0e10cSrcweir 71*cdf0e10cSrcweir <p>Descendants of this service also implement this service. 72*cdf0e10cSrcweir </p> 73*cdf0e10cSrcweir 74*cdf0e10cSrcweir <p>Ultimately the configuration holds values. These values are organized into 75*cdf0e10cSrcweir a hierarchy using structural elements. The structure is defined in advance in 76*cdf0e10cSrcweir a schema. Necessary information from the schema is stored in the configuration 77*cdf0e10cSrcweir repository itself and is accessible through an implementation of this service. 78*cdf0e10cSrcweir </p> 79*cdf0e10cSrcweir 80*cdf0e10cSrcweir <p>Two different kinds of structural elements are used in the configuration 81*cdf0e10cSrcweir hierarchy: 82*cdf0e10cSrcweir </p> 83*cdf0e10cSrcweir <dl> 84*cdf0e10cSrcweir <dt>Sets</dt> 85*cdf0e10cSrcweir <dd>are dynamic containers of homogeneous elements. Which elements 86*cdf0e10cSrcweir a <em>set</em> contains can vary. Their names are defined by the 87*cdf0e10cSrcweir clients that insert them. On the other hand, the <em>type</em> of 88*cdf0e10cSrcweir the elements is the same for all elements. In the case of elements 89*cdf0e10cSrcweir that are themselves hierarchy objects, the <em>type</em> includes 90*cdf0e10cSrcweir the structure of the hierarchy fragment they contain. Such types 91*cdf0e10cSrcweir are defined in the configuration schema as <em>templates</em>. 92*cdf0e10cSrcweir </dd> 93*cdf0e10cSrcweir 94*cdf0e10cSrcweir <dt>Groups</dt> 95*cdf0e10cSrcweir <dd>are static collections of heterogeneous elements. The names and 96*cdf0e10cSrcweir types of the elements of a <em>group</em> are completely defined in the 97*cdf0e10cSrcweir configuration schema. Here each element may be of a different 98*cdf0e10cSrcweir <em>type</em>, allowing <em>groups</em> that contain a mix of 99*cdf0e10cSrcweir subobjects and simple values. 100*cdf0e10cSrcweir </dd> 101*cdf0e10cSrcweir </dl> 102*cdf0e10cSrcweir 103*cdf0e10cSrcweir <p>Objects in the configuration hierarchy, for example, implementations of this service, 104*cdf0e10cSrcweir can thus be classified in the following ways: 105*cdf0e10cSrcweir </p> 106*cdf0e10cSrcweir <ul> 107*cdf0e10cSrcweir <li><em>Container</em> role: 108*cdf0e10cSrcweir An object that can hold child elements as a <em>set</em> or a <em>group</em>. 109*cdf0e10cSrcweir </li> 110*cdf0e10cSrcweir <li><em>Element</em> role: 111*cdf0e10cSrcweir An object may be an element of a <em>set</em> or a <em>group</em> 112*cdf0e10cSrcweir or else it may be the root element. 113*cdf0e10cSrcweir </li> 114*cdf0e10cSrcweir </ul> 115*cdf0e10cSrcweir 116*cdf0e10cSrcweir <p>Several types of simple <em>values</em> can be used in the configuration. 117*cdf0e10cSrcweir In addition to the basic (scalar) types, sequences of the basic types are 118*cdf0e10cSrcweir supported. The basic types are: 119*cdf0e10cSrcweir </p> 120*cdf0e10cSrcweir 121*cdf0e10cSrcweir <ul> 122*cdf0e10cSrcweir <li><strong>string</strong> can hold a human-readable text. 123*cdf0e10cSrcweir <p>Values are represented as <atom>string</atom>.</p> 124*cdf0e10cSrcweir <p>Sequences are represented as <atom dim="[]">string</atom>.</p> 125*cdf0e10cSrcweir <p>'<em>human-readable</em>' here excludes non-printing characters 126*cdf0e10cSrcweir except for CR, LF and TAB [Unicode code points 9,10,13]. 127*cdf0e10cSrcweir For binary data, use type <strong>binary</strong> instead.</p> 128*cdf0e10cSrcweir </li> 129*cdf0e10cSrcweir <li><strong>boolean</strong> can hold the values <TRUE/> or <FALSE/>. 130*cdf0e10cSrcweir <p>Values are represented as <atom>boolean</atom>. 131*cdf0e10cSrcweir <p>Sequences are represented as <atom dim="[]">boolean</atom>.</p> 132*cdf0e10cSrcweir </li> 133*cdf0e10cSrcweir <li><strong>short</strong> can hold a 16-bit signed integer. 134*cdf0e10cSrcweir <p>Values are represented as <atom>short</atom>.</p> 135*cdf0e10cSrcweir <p>Sequences are represented as <atom dim="[]">short</atom>.</p> 136*cdf0e10cSrcweir </li> 137*cdf0e10cSrcweir <li><strong>int</strong> can hold a 32-bit signed integer. 138*cdf0e10cSrcweir <p>Values are represented as <atom>long</atom>.</p> 139*cdf0e10cSrcweir <p>Sequences are represented as <atom dim="[]">long</atom>.</p> 140*cdf0e10cSrcweir </li> 141*cdf0e10cSrcweir <li><strong>long</strong> can hold a 64-bit signed integer. 142*cdf0e10cSrcweir <p>Values are represented as <atom>hyper</atom>.</p> 143*cdf0e10cSrcweir <p>Sequences are represented as <atom dim="[]">hyper</atom>.</p> 144*cdf0e10cSrcweir </li> 145*cdf0e10cSrcweir <li><strong>double</strong> can hold a floating point number. 146*cdf0e10cSrcweir <p>Values are represented as <atom>double</atom>.</p> 147*cdf0e10cSrcweir <p>Sequences are represented as <atom dim="[]">double</atom>.</p> 148*cdf0e10cSrcweir </li> 149*cdf0e10cSrcweir <li><strong>binary</strong> can hold a sequence of octets. 150*cdf0e10cSrcweir <p>Values are represented as <atom dim="[]">byte</atom>.</p> 151*cdf0e10cSrcweir <p>Sequences are represented as <atom dim="[][]">byte</atom>.</p> 152*cdf0e10cSrcweir </li> 153*cdf0e10cSrcweir </ul> 154*cdf0e10cSrcweir 155*cdf0e10cSrcweir <p>Within templates an additional type <strong>any</strong> can occur. When 156*cdf0e10cSrcweir such a template is used to create a new <type>SetElement</type>, the type 157*cdf0e10cSrcweir of the element is initially reported as <atom>any</atom> (having no value). 158*cdf0e10cSrcweir When the value of such an element is first set, it will assume the type used. 159*cdf0e10cSrcweir </p> 160*cdf0e10cSrcweir 161*cdf0e10cSrcweir <p>If the schema marks a value as <em>nullable</em> (which is indicated by 162*cdf0e10cSrcweir attribute <const scope="com::sun::star::beans">PropertyAttribute::MAYBEVOID</const> ), 163*cdf0e10cSrcweir its contents may be <NULL/>. 164*cdf0e10cSrcweir </p> 165*cdf0e10cSrcweir 166*cdf0e10cSrcweir <p>The configuration should support explicit access to default values 167*cdf0e10cSrcweir (implementing <type scope="com::sun::star::beans">XPropertyState</type> 168*cdf0e10cSrcweir and <type scope="com::sun::star::beans">XPropertyWithState</type>). 169*cdf0e10cSrcweir </p> 170*cdf0e10cSrcweir 171*cdf0e10cSrcweir @see ConfigurationProvider 172*cdf0e10cSrcweir Root instances of this service can be requested from a 173*cdf0e10cSrcweir <type>ConfigurationProvider</type>. 174*cdf0e10cSrcweir 175*cdf0e10cSrcweir @see ConfigurationUpdateAccess 176*cdf0e10cSrcweir an extended service that includes facilities for modifying 177*cdf0e10cSrcweir configuration data. 178*cdf0e10cSrcweir*/ 179*cdf0e10cSrcweirpublished service ConfigurationAccess 180*cdf0e10cSrcweir{ 181*cdf0e10cSrcweir /** provides interfaces to access child and descendent elements. 182*cdf0e10cSrcweir 183*cdf0e10cSrcweir <p>An implementation actually implements a specialization of this service, 184*cdf0e10cSrcweir which depends on its <em>Container</em> role. 185*cdf0e10cSrcweir </p> 186*cdf0e10cSrcweir 187*cdf0e10cSrcweir <p>Implementations shall implement exactly one of:</p> 188*cdf0e10cSrcweir <ul> 189*cdf0e10cSrcweir <li><type>SetAccess</type> if this element is a <em>Set</em>.</li> 190*cdf0e10cSrcweir <li><type>GroupAccess</type> if this element is a <em>Group</em>.</li> 191*cdf0e10cSrcweir </ul> 192*cdf0e10cSrcweir */ 193*cdf0e10cSrcweir service HierarchyAccess; 194*cdf0e10cSrcweir 195*cdf0e10cSrcweir /** provides interfaces to obtain information about this element and its 196*cdf0e10cSrcweir role and context in the hierarchy. 197*cdf0e10cSrcweir 198*cdf0e10cSrcweir <p>An implementation actually implements a specialization of this service, 199*cdf0e10cSrcweir which depends on its <em>Element</em> role. 200*cdf0e10cSrcweir </p> 201*cdf0e10cSrcweir 202*cdf0e10cSrcweir <p>Implementations shall implement exactly one of:</p> 203*cdf0e10cSrcweir <ul> 204*cdf0e10cSrcweir <li><type>AccessRootElement</type> if this element is the 205*cdf0e10cSrcweir <em>Root</em> of the whole hierarchy. Objects that can be 206*cdf0e10cSrcweir created directly by a <type>ConfigurationProvider</type> 207*cdf0e10cSrcweir implement this service.</li> 208*cdf0e10cSrcweir <li><type>SetElement</type> if this element may be contained in a 209*cdf0e10cSrcweir <em>Set</em>.</li> 210*cdf0e10cSrcweir <li><type>GroupElement</type> if this element is a child of a 211*cdf0e10cSrcweir <em>Group</em>.</li> 212*cdf0e10cSrcweir </ul> 213*cdf0e10cSrcweir 214*cdf0e10cSrcweir */ 215*cdf0e10cSrcweir service HierarchyElement; 216*cdf0e10cSrcweir 217*cdf0e10cSrcweir /** specializes <type>HierarchyAccess</type>, if this element is a <em>Set</em>. 218*cdf0e10cSrcweir 219*cdf0e10cSrcweir <p>This is an alternative to <type>GroupAccess</type>. 220*cdf0e10cSrcweir </p> 221*cdf0e10cSrcweir */ 222*cdf0e10cSrcweir [optional] service SetAccess; 223*cdf0e10cSrcweir 224*cdf0e10cSrcweir /** specializes <type>HierarchyAccess</type>, 225*cdf0e10cSrcweir if this element is a <em>Group</em>. 226*cdf0e10cSrcweir <p>This is an alternative to <type>SetAccess</type>. 227*cdf0e10cSrcweir </p> 228*cdf0e10cSrcweir */ 229*cdf0e10cSrcweir [optional] service GroupAccess; 230*cdf0e10cSrcweir 231*cdf0e10cSrcweir /** specializes <type>HierarchyElement</type>, 232*cdf0e10cSrcweir if this element is the <em>Root</em> of the whole hierarchy. 233*cdf0e10cSrcweir <p>This is an alternative to <type>SetElement</type> 234*cdf0e10cSrcweir or <type>GroupElement</type>. 235*cdf0e10cSrcweir </p> 236*cdf0e10cSrcweir 237*cdf0e10cSrcweir @see ConfigurationProvider 238*cdf0e10cSrcweir Instances obtained from a <type>ConfigurationProvider</type> will 239*cdf0e10cSrcweir implement this version of <type>HierarchyElement</type>. 240*cdf0e10cSrcweir */ 241*cdf0e10cSrcweir [optional] service AccessRootElement; 242*cdf0e10cSrcweir 243*cdf0e10cSrcweir /** specializes <type>HierarchyElement</type>, 244*cdf0e10cSrcweir if this element may be contained in a <em>Set</em>. 245*cdf0e10cSrcweir <p>This is an alternative to <type>AccessRootElement</type> 246*cdf0e10cSrcweir or <type>GroupElement</type>. 247*cdf0e10cSrcweir </p> 248*cdf0e10cSrcweir */ 249*cdf0e10cSrcweir [optional] service SetElement; 250*cdf0e10cSrcweir 251*cdf0e10cSrcweir /** specializes <type>HierarchyElement</type>, 252*cdf0e10cSrcweir if this element is a child of a <em>Group</em>. 253*cdf0e10cSrcweir <p>This is an alternative to <type>AccessRootElement</type> 254*cdf0e10cSrcweir or <type>SetElement</type>. 255*cdf0e10cSrcweir </p> 256*cdf0e10cSrcweir*/ 257*cdf0e10cSrcweir [optional] service GroupElement; 258*cdf0e10cSrcweir}; 259*cdf0e10cSrcweir 260*cdf0e10cSrcweir//============================================================================= 261*cdf0e10cSrcweir 262*cdf0e10cSrcweir}; }; }; }; 263*cdf0e10cSrcweir 264*cdf0e10cSrcweir#endif 265*cdf0e10cSrcweir 266