1*b1cdbd2cSJim Jagielski/************************************************************** 2*b1cdbd2cSJim Jagielski * 3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one 4*b1cdbd2cSJim Jagielski * or more contributor license agreements. See the NOTICE file 5*b1cdbd2cSJim Jagielski * distributed with this work for additional information 6*b1cdbd2cSJim Jagielski * regarding copyright ownership. The ASF licenses this file 7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the 8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance 9*b1cdbd2cSJim Jagielski * with the License. You may obtain a copy of the License at 10*b1cdbd2cSJim Jagielski * 11*b1cdbd2cSJim Jagielski * http://www.apache.org/licenses/LICENSE-2.0 12*b1cdbd2cSJim Jagielski * 13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing, 14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an 15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b1cdbd2cSJim Jagielski * KIND, either express or implied. See the License for the 17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations 18*b1cdbd2cSJim Jagielski * under the License. 19*b1cdbd2cSJim Jagielski * 20*b1cdbd2cSJim Jagielski *************************************************************/ 21*b1cdbd2cSJim Jagielski 22*b1cdbd2cSJim Jagielski 23*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_ucb_HierarchyDataSource_idl__ 24*b1cdbd2cSJim Jagielski#define __com_sun_star_ucb_HierarchyDataSource_idl__ 25*b1cdbd2cSJim Jagielski 26*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_lang_XMultiServiceFactory_idl__ 27*b1cdbd2cSJim Jagielski#include <com/sun/star/lang/XMultiServiceFactory.idl> 28*b1cdbd2cSJim Jagielski#endif 29*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_lang_XComponent_idl__ 30*b1cdbd2cSJim Jagielski#include <com/sun/star/lang/XComponent.idl> 31*b1cdbd2cSJim Jagielski#endif 32*b1cdbd2cSJim Jagielski 33*b1cdbd2cSJim Jagielski//============================================================================= 34*b1cdbd2cSJim Jagielski 35*b1cdbd2cSJim Jagielskimodule com { module sun { module star { module ucb { 36*b1cdbd2cSJim Jagielski 37*b1cdbd2cSJim Jagielski//============================================================================= 38*b1cdbd2cSJim Jagielski/** manages one or more complete sets of hierarchy data and serves as a factory 39*b1cdbd2cSJim Jagielski for objects that provide access to a subset of the data. 40*b1cdbd2cSJim Jagielski 41*b1cdbd2cSJim Jagielski <p><b>Note:</b> This is an abstract service. This means, that there should 42*b1cdbd2cSJim Jagielski never be implementations that can be instanciated using the service name 43*b1cdbd2cSJim Jagielski <code>com.sun.star.ucb.HierarchyDataSource</code>. Each implementation must 44*b1cdbd2cSJim Jagielski provide its own service name that can be used to create instances of that 45*b1cdbd2cSJim Jagielski service implementation. Important for those service specifications is also 46*b1cdbd2cSJim Jagielski to specify which of the optional parts are supported by the implementation. 47*b1cdbd2cSJim Jagielski*/ 48*b1cdbd2cSJim Jagielskipublished service HierarchyDataSource 49*b1cdbd2cSJim Jagielski{ 50*b1cdbd2cSJim Jagielski //------------------------------------------------------------------------- 51*b1cdbd2cSJim Jagielski /** allows creating access objects for specific views such as subsets and 52*b1cdbd2cSJim Jagielski fragments of the hierrachy data. 53*b1cdbd2cSJim Jagielski 54*b1cdbd2cSJim Jagielski <p>The parameter <var>aServiceSpecifier</var> passed to 55*b1cdbd2cSJim Jagielski <member scope="com::sun::star::lang">XMultiServiceFactory::createInstanceWithArguments</member> 56*b1cdbd2cSJim Jagielski supports at least the service specifier 57*b1cdbd2cSJim Jagielski <code>"com.sun.star.ucb.HierarchyDataReadAccess"</code>, which will 58*b1cdbd2cSJim Jagielski create a <b>read-only view</b> to the data. The object that is created 59*b1cdbd2cSJim Jagielski implements the service <type>HierarchyDataReadAccess</type>. 60*b1cdbd2cSJim Jagielski 61*b1cdbd2cSJim Jagielski <p><b>Optionally</b> the factory may support <b>writable views</b>. A 62*b1cdbd2cSJim Jagielski writable view is requested by passing the service specifier 63*b1cdbd2cSJim Jagielski <code>"com.sun.star.ucb.HierarchyDataReadWriteAccess"</code> to 64*b1cdbd2cSJim Jagielski <member scope="com::sun::star::lang">XMultiServiceFactory::createInstanceWithArguments</member> 65*b1cdbd2cSJim Jagielski The object that is created implements the service 66*b1cdbd2cSJim Jagielski <type>HierarchyDataReadWriteAccess</type>. 67*b1cdbd2cSJim Jagielski 68*b1cdbd2cSJim Jagielski <p>The arguments passed to 69*b1cdbd2cSJim Jagielski <member scope="com::sun::star::lang">XMultiServiceFactory::createInstanceWithArguments</member> 70*b1cdbd2cSJim Jagielski in parameter <var>aArguments</var> specify the view of the data that 71*b1cdbd2cSJim Jagielski should be created. That is, they determine the subset of elements that 72*b1cdbd2cSJim Jagielski can be accessed starting from the returned object. Each element of the 73*b1cdbd2cSJim Jagielski argument sequence should be a 74*b1cdbd2cSJim Jagielski <type scope="com::sun::star::beans">PropertyValue</type>, so that the 75*b1cdbd2cSJim Jagielski parameters can be identified by name rather than by position. 76*b1cdbd2cSJim Jagielski 77*b1cdbd2cSJim Jagielski <p>With both of the standard service specifiers above, an implementation 78*b1cdbd2cSJim Jagielski must accept a property named <code>nodepath</code> of type 79*b1cdbd2cSJim Jagielski <atom>string</atom>. This property must contain the absolute path to an 80*b1cdbd2cSJim Jagielski element of the data. The view that is selected consists of the named 81*b1cdbd2cSJim Jagielski element and all its decendants. A path consists of segments that are 82*b1cdbd2cSJim Jagielski separated by a single slash ('/'). There is neither a leading nor a 83*b1cdbd2cSJim Jagielski trailing slash allowed. The <b>root</b> of the hierarchy data always 84*b1cdbd2cSJim Jagielski has an empty path. Refer to <type>HierarchyDataReadAccess</type> for 85*b1cdbd2cSJim Jagielski more informtion on hierarchical names. 86*b1cdbd2cSJim Jagielski 87*b1cdbd2cSJim Jagielski <p>Other arguments can be used to control the behavior of the view. 88*b1cdbd2cSJim Jagielski These are different for different implementations. Whether and how they 89*b1cdbd2cSJim Jagielski are used may also depend on the configuration store and configuration 90*b1cdbd2cSJim Jagielski that were selected when the provider was created. 91*b1cdbd2cSJim Jagielski 92*b1cdbd2cSJim Jagielski <p>An implementation must ignore unknown arguments. 93*b1cdbd2cSJim Jagielski 94*b1cdbd2cSJim Jagielski <p>The implementation of 95*b1cdbd2cSJim Jagielski <member scope="com::sun::star::lang">XMultiServiceFactory::createInstance</member> 96*b1cdbd2cSJim Jagielski must behave exactly as if 97*b1cdbd2cSJim Jagielski <member scope="com::sun::star::lang">XMultiServiceFactory::createInstanceWithArguments</member> 98*b1cdbd2cSJim Jagielski were called passing one single property named <code>nodepath</code> 99*b1cdbd2cSJim Jagielski where the property value is an empty string. Thus it always creates a 100*b1cdbd2cSJim Jagielski view to the root of the hierarchy data. 101*b1cdbd2cSJim Jagielski */ 102*b1cdbd2cSJim Jagielski interface com::sun::star::lang::XMultiServiceFactory; 103*b1cdbd2cSJim Jagielski 104*b1cdbd2cSJim Jagielski //------------------------------------------------------------------------- 105*b1cdbd2cSJim Jagielski /** allows controlling or observing the lifetime of the hierarchy data 106*b1cdbd2cSJim Jagielski source and its views. 107*b1cdbd2cSJim Jagielski */ 108*b1cdbd2cSJim Jagielski interface com::sun::star::lang::XComponent; 109*b1cdbd2cSJim Jagielski}; 110*b1cdbd2cSJim Jagielski 111*b1cdbd2cSJim Jagielski//============================================================================= 112*b1cdbd2cSJim Jagielski 113*b1cdbd2cSJim Jagielski}; }; }; }; 114*b1cdbd2cSJim Jagielski 115*b1cdbd2cSJim Jagielski#endif 116