1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 module com
{ module sun
{ module star
{ module ucb
{
23 /** manages one or more complete sets of hierarchy data and serves as a factory
24 for objects that provide access to a subset of the data.
26 <p><b>Note:</b> This is an abstract service. This means, that there should
27 never be implementations that can be instantiated using the service name
28 <code>com.sun.star.ucb.HierarchyDataSource</code>. Each implementation must
29 provide its own service name that can be used to create instances of that
30 service implementation. Important for those service specifications is also
31 to specify which of the optional parts are supported by the implementation.
33 published service HierarchyDataSource
35 /** allows creating access objects for specific views such as subsets and
36 fragments of the hierarchy data.
38 <p>The parameter <var>aServiceSpecifier</var> passed to
39 com::sun::star::lang::XMultiServiceFactory::createInstanceWithArguments()
40 supports at least the service specifier
41 <code>"com.sun.star.ucb.HierarchyDataReadAccess"</code>, which will
42 create a <b>read-only view</b> to the data. The object that is created
43 implements the service HierarchyDataReadAccess.
45 <p><b>Optionally</b> the factory may support <b>writable views</b>. A
46 writable view is requested by passing the service specifier
47 <code>"com.sun.star.ucb.HierarchyDataReadWriteAccess"</code> to
48 com::sun::star::lang::XMultiServiceFactory::createInstanceWithArguments()
49 The object that is created implements the service
50 HierarchyDataReadWriteAccess.
52 <p>The arguments passed to
53 com::sun::star::lang::XMultiServiceFactory::createInstanceWithArguments()
54 in parameter <var>aArguments</var> specify the view of the data that
55 should be created. That is, they determine the subset of elements that
56 can be accessed starting from the returned object. Each element of the
57 argument sequence should be a
58 com::sun::star::beans::PropertyValue, so that the
59 parameters can be identified by name rather than by position.
61 <p>With both of the standard service specifiers above, an implementation
62 must accept a property named <code>nodepath</code> of type
63 `string`. This property must contain the absolute path to an
64 element of the data. The view that is selected consists of the named
65 element and all its descendants. A path consists of segments that are
66 separated by a single slash ("/"). There is neither a leading nor a
67 trailing slash allowed. The <b>root</b> of the hierarchy data always
68 has an empty path. Refer to HierarchyDataReadAccess for
69 more information on hierarchical names.
71 <p>Other arguments can be used to control the behavior of the view.
72 These are different for different implementations. Whether and how they
73 are used may also depend on the configuration store and configuration
74 that were selected when the provider was created.
76 <p>An implementation must ignore unknown arguments.
78 <p>The implementation of
79 com::sun::star::lang::XMultiServiceFactory::createInstance()
80 must behave exactly as if
81 com::sun::star::lang::XMultiServiceFactory::createInstanceWithArguments()
82 were called passing one single property named <code>nodepath</code>
83 where the property value is an empty string. Thus it always creates a
84 view to the root of the hierarchy data.
86 interface com
::sun
::star
::lang
::XMultiServiceFactory
;
88 /** allows controlling or observing the lifetime of the hierarchy data
91 interface com
::sun
::star
::lang
::XComponent
;
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */