1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_ucb_HierarchyDataReadAccess_idl__ 28#define __com_sun_star_ucb_HierarchyDataReadAccess_idl__ 29 30#ifndef __com_sun_star_container_XNameAccess_idl__ 31#include <com/sun/star/container/XNameAccess.idl> 32#endif 33#ifndef __com_sun_star_container_XHierarchicalNameAccess_idl__ 34#include <com/sun/star/container/XHierarchicalNameAccess.idl> 35#endif 36#ifndef __com_sun_star_util_XChangesNotifier_idl__ 37#include <com/sun/star/util/XChangesNotifier.idl> 38#endif 39#ifndef __com_sun_star_lang_XComponent_idl__ 40#include <com/sun/star/lang/XComponent.idl> 41#endif 42 43//============================================================================= 44 45module com { module sun { module star { module ucb { 46 47//============================================================================= 48/** provides read access to a fragment of the hierarchy data. 49 50 <p>A hierarchy data source provides access to a tree of hierarchy data 51 nodes. Each hierarchy data node, except the root node, has a parent that 52 is a hierarchy data node too. A hierarchy data node has a name. 53 54 <p>Each hierarchy data node has three data members: 55 56 <ul> 57 <li>"Title", which is of type <atom>string</atom>. It contains a title 58 for the node. This value must not be empty. 59 <li>"TargetURL", which is of type <atom>string</atom></li> It may contain 60 any URL, which will be treated as the target of a hierarchy link. 61 <li>"Children", which is of type <type>HierarchyDataReadAccess</type> or 62 of type <type>HierarchyDataReadWriteAccess</type></li>, depending on the 63 type of the node. This member provides access to the children of a node. 64 </ul> 65*/ 66published service HierarchyDataReadAccess 67{ 68 //------------------------------------------------------------------------- 69 /** gives access to the data members of a hierarchy data node. 70 71 <p>Examples: 72 <ul> 73 <li><code>getByName( "Title" )</code> will return an <atom>any</atom> 74 containing a string containing the title of the node. 75 </li> 76 <li><code>getByName( "Children" )</code> will return an <atom>any</atom> 77 containing an implementation of service 78 <type>HierarchyDataReadAccess</type>, if it was called on a read-only 79 node. It will return an implementation of service 80 <type>HierarchyDataReadWriteAccess</type> if it was called on a 81 writable node. 82 </li> 83 </ul> 84 */ 85 interface com::sun::star::container::XNameAccess; 86 87 //------------------------------------------------------------------------- 88 /** gives access to the data members of a hierarchy data node as well 89 as to any child nodes or to the data members of child nodes using a 90 hierarchical name. 91 92 <p>A hierarchical name consists of segments that are separated by a 93 single slash ('/'). There is neither a leading nor a trailing slash 94 allowed. 95 96 <ul> 97 <li> 98 path = segment ( '/' segement )* 99 </li> 100 <li> 101 segment = '[' quoted-string ']' 102 </li> 103 <li> 104 quoted-string = "'" escaped-string "'" 105 </li> 106 <li> 107 escaped-string = escaped accoding to XML attribute naming conventions 108 </li> 109 </ul> 110 111 <p>Examples: 112 <ul> 113 <li> 114 <code>getByHierarchicalName( "Title" )</code> will return an 115 <atom>any</atom> containing a string containing the title of the node 116 itself. 117 </li> 118 <li> 119 <code>getByHierarchicalName( "Children/['subnode1']" )</code> will give 120 access to the child node named "subnode1" of the node. It will return 121 an <atom>any</atom> containing an implementation of service 122 <type>HierarchyDataReadAccess</type>, if it was called on a read-only 123 node. It will return an implementation of service 124 <type>HierarchyDataReadWriteAccess</type> if it was called on a 125 writable node. 126 </li> 127 <li> 128 <code>getByHierarchicalName( "Children/['subnode2']/TargetURL" )</code> 129 will give direct access to the "TargetURL" data member of the child node 130 named "subnode2" of the node. It will return an <atom>any</atom> 131 containing a <atom>string</atom> containing the target URL of the node. 132 </li> 133 <li> 134 <code>getByHierarchicalName( "Children/['subnode3']/Children" )</code> 135 will give direct access to the "Children" data member of the child node 136 named "subnode3" of the node. It will return an <atom>any</atom> 137 conntaining an implementation of service 138 <type>HierarchyDataReadAccess</type>, if it was called on a read-only 139 node. It will return an implementation of service 140 <type>HierarchyDataReadWriteAccess</type> if it was called on a 141 writable node. 142 </li> 143 </ul> 144 */ 145 interface com::sun::star::container::XHierarchicalNameAccess; 146 147 //------------------------------------------------------------------------- 148 /** allows registering listeners that observe the hierarchy data source. 149 150 <p>A client can register an 151 <type scope="com::sun::star::util">XChangesListener</type>, which will 152 receive notifications for any changes within the hierarchy (fragment) 153 this object represents. 154 155 <p>An implementation should collect as many changes as possible into a 156 single <type scope="com::sun::star::util">ChangesEvent</type>. 157 */ 158 interface com::sun::star::util::XChangesNotifier; 159 160 //------------------------------------------------------------------------- 161 /** allows controlling or observing the lifetime of the hierarchy data 162 access object. 163 */ 164 interface com::sun::star::lang::XComponent; 165}; 166 167//============================================================================= 168 169}; }; }; }; 170 171#endif 172