1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
27 #ifndef __com_sun_star_embed_XRelationshipAccess_idl__
28 #define __com_sun_star_embed_XRelationshipAccess_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include
<com
/sun
/star
/uno
/XInterface.idl
>
34 #ifndef __com_sun_star_beans_StringPair_idl__
35 #include
<com
/sun
/star
/beans
/StringPair.idl
>
38 #ifndef __com_sun_star_container_NoSuchElementException_idl__
39 #include
<com
/sun
/star
/container
/NoSuchElementException.idl
>
42 #ifndef __com_sun_star_container_ElementExistException_idl__
43 #include
<com
/sun
/star
/container
/ElementExistException.idl
>
46 #ifndef __com_sun_star_io_IOException_idl__
47 #include
<com
/sun
/star
/io
/IOException.idl
>
50 //============================================================================
52 module com
{ module sun
{ module star
{ module embed
{
54 //============================================================================
55 /** This interface allows to ge access to relationship data.
58 The relationship data is organized as a set of entries. Each of entry
59 is represented by a set of tags, where each tag has unique for this entry
60 name and a string value. An entry must contain at least one tag named
61 "ID", the value of this tag must be uniqued for the whole set of entries,
62 this tag is used as a uniqued identified of an entry.
65 published
interface XRelationshipAccess
: ::com
::sun
::star
::uno
::XInterface
67 // -----------------------------------------------------------------------
68 /** allows to detect whether there is an entry with specified value of
74 @throws ::com::sun::star::io::IOException
75 in case there is a problem reading the relations info
77 boolean hasByID
( [in] string sID
)
78 raises
( ::com
::sun
::star
::io
::IOException
);
80 // -----------------------------------------------------------------------
81 /** retrieves the value of "Target" tag from the entry with specified "ID"
85 If the entry has no "Target" tag an empty string is returned.
91 @throws ::com::sun::star::container::NoSuchElementException
92 in case there is no entry with specified tag
94 @throws ::com::sun::star::io::IOException
95 in case there is a problem reading the relations info
97 string getTargetByID
( [in] string sID
)
98 raises
( ::com
::sun
::star
::container
::NoSuchElementException
,
99 ::com
::sun
::star
::io
::IOException
);
101 // -----------------------------------------------------------------------
102 /** retrieves the value of "Type" tag from the entry with specified "ID"
106 If the entry has no "Type" tag an empty string is returned.
110 the value of "ID" tag
112 @throws ::com::sun::star::container::NoSuchElementException
113 in case there is no entry with specified tag
115 @throws ::com::sun::star::io::IOException
116 in case there is a problem reading the relations info
118 string getTypeByID
( [in] string sID
)
119 raises
( ::com
::sun
::star
::container
::NoSuchElementException
,
120 ::com
::sun
::star
::io
::IOException
);
122 // -----------------------------------------------------------------------
123 /** retrieves the sequence containing all the tags from the entry with
124 specified value of "ID" tag.
127 the value of "ID" tag
130 sequence, each element of the sequence represents tag,
131 <type scope="::com::sun::star::beans">StringPair</type>::First
132 represents the tag name and
133 <type scope="::com::sun::star::beans">StringPair</type>::Second
134 represents the tag value
136 @throws ::com::sun::star::container::NoSuchElementException
137 in case there is no entry with specified tag
139 @throws ::com::sun::star::io::IOException
140 in case there is a problem reading the relations info
142 sequence
< ::com
::sun
::star
::beans
::StringPair
>
143 getRelationshipByID
( [in] string sID
)
144 raises
( ::com
::sun
::star
::container
::NoSuchElementException
,
145 ::com
::sun
::star
::io
::IOException
);
147 // -----------------------------------------------------------------------
148 /** retrieves the sequence containing all the entries which "Type" tag
149 takes the specified value.
152 specified value of "Type" tag, the parameter can contain an empty
153 string, in this case all the entries that have empty "Type" tag or
154 no such tag at all are returned
157 sequence of entries, each entry is represented by sequence,
158 each element of the sequence represents tag,
159 <type scope="::com::sun::star::beans">StringPair</type>::First
160 represents the tag name and
161 <type scope="::com::sun::star::beans">StringPair</type>::Second
162 represents the tag value.
163 The sequence should contain the "ID" tag.
165 @throws ::com::sun::star::io::IOException
166 in case there is a problem reading the relations info
168 sequence
< sequence
< ::com
::sun
::star
::beans
::StringPair
> >
169 getRelationshipsByType
( [in] string sType
)
170 raises
( ::com
::sun
::star
::io
::IOException
);
172 // -----------------------------------------------------------------------
173 /** retrieves the sequence containing all the entries controlled by the
177 sequence of entries, each entry is represented by sequence,
178 each element of the sequence represents tag,
179 <type scope="::com::sun::star::beans">StringPair</type>::First
180 represents the tag name and
181 <type scope="::com::sun::star::beans">StringPair</type>::Second
182 represents the tag value
184 @throws ::com::sun::star::io::IOException
185 in case there is a problem reading the relations info
187 sequence
< sequence
< ::com
::sun
::star
::beans
::StringPair
> >
188 getAllRelationships
()
189 raises
( ::com
::sun
::star
::io
::IOException
);
191 // -----------------------------------------------------------------------
192 /** allows to insert an entry.
195 the value of "ID" tag
198 a sequence, each element of the sequence represents tag,
199 <type scope="::com::sun::star::beans">StringPair</type>::First
200 represents the tag name and
201 <type scope="::com::sun::star::beans">StringPair</type>::Second
202 represents the tag value.
203 May not contain "ID" tag, that is already specified in previous
207 specifies whether the replacement of existing entry is allowed
209 @throws ::com::sun::star::io::IOException
210 in case there is a problem reading/writing the relations info
212 @throws ::com::sun::star::container::ElementExistException
213 in case an element with the specified "ID" tag exists already, and
214 no replacement is allowed
216 void insertRelationshipByID
(
218 [in] sequence
< ::com
::sun
::star
::beans
::StringPair
> aEntry
,
219 [in] boolean bReplace
)
220 raises
( ::com
::sun
::star
::container
::ElementExistException
,
221 ::com
::sun
::star
::io
::IOException
);
223 // -----------------------------------------------------------------------
224 /** allows to remove an entry.
227 the value of "ID" tag
229 @throws ::com::sun::star::container::NoSuchElementException
230 in case there is no entry with specified tag
232 @throws ::com::sun::star::io::IOException
233 in case there is a problem reading/writing the relations info
235 void removeRelationshipByID
( [in] string sID
)
236 raises
( ::com
::sun
::star
::container
::NoSuchElementException
,
237 ::com
::sun
::star
::io
::IOException
);
239 // -----------------------------------------------------------------------
240 /** allows to insert a set of entries
243 sequence of entries, each entry is represented by sequence,
244 each element of the sequence represents tag,
245 <type scope="::com::sun::star::beans">StringPair</type>::First
246 represents the tag name and
247 <type scope="::com::sun::star::beans">StringPair</type>::Second
248 represents the tag value.
249 Each entry must contain "ID" tag.
252 specifies whether the replacement of existing entry is allowed
254 @throws ::com::sun::star::container::ElementExistException
255 in case an element with the provided "ID" tag exists already, and
256 no replacement is allowed
258 @throws ::com::sun::star::io::IOException
259 in case there is a problem reading/writing the relations info
261 void insertRelationships
(
262 [in] sequence
< sequence
< ::com
::sun
::star
::beans
::StringPair
> > aEntries
,
263 [in] boolean bReplace
)
264 raises
( ::com
::sun
::star
::container
::ElementExistException
,
265 ::com
::sun
::star
::io
::IOException
);
267 // -----------------------------------------------------------------------
268 /** allows to clear the set of entries.
270 @throws ::com::sun::star::io::IOException
271 in case there is a problem reading/writing the relations info
273 void clearRelationships
()
274 raises
( ::com
::sun
::star
::io
::IOException
);
278 //============================================================================