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