1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XRelationshipAccess.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_embed_XRelationshipAccess_idl__
31 #define __com_sun_star_embed_XRelationshipAccess_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include
<com
/sun
/star
/uno
/XInterface.idl
>
37 #ifndef __com_sun_star_beans_StringPair_idl__
38 #include
<com
/sun
/star
/beans
/StringPair.idl
>
41 #ifndef __com_sun_star_container_NoSuchElementException_idl__
42 #include
<com
/sun
/star
/container
/NoSuchElementException.idl
>
45 #ifndef __com_sun_star_container_ElementExistException_idl__
46 #include
<com
/sun
/star
/container
/ElementExistException.idl
>
49 #ifndef __com_sun_star_io_IOException_idl__
50 #include
<com
/sun
/star
/io
/IOException.idl
>
53 //============================================================================
55 module com
{ module sun
{ module star
{ module embed
{
57 //============================================================================
58 /** This interface allows to ge access to relationship data.
61 The relationship data is organized as a set of entries. Each of entry
62 is represented by a set of tags, where each tag has unique for this entry
63 name and a string value. An entry must contain at least one tag named
64 "ID", the value of this tag must be uniqued for the whole set of entries,
65 this tag is used as a uniqued identified of an entry.
68 interface XRelationshipAccess
: ::com
::sun
::star
::uno
::XInterface
70 // -----------------------------------------------------------------------
71 /** allows to detect whether there is an entry with specified value of
77 @throws ::com::sun::star::io::IOException
78 in case there is a problem reading the relations info
80 boolean hasByID
( [in] string sID
)
81 raises
( ::com
::sun
::star
::io
::IOException
);
83 // -----------------------------------------------------------------------
84 /** retrieves the value of "Target" tag from the entry with specified "ID"
88 If the entry has no "Target" tag an empty string is returned.
94 @throws ::com::sun::star::container::NoSuchElementException
95 in case there is no entry with specified tag
97 @throws ::com::sun::star::io::IOException
98 in case there is a problem reading the relations info
100 string getTargetByID
( [in] string sID
)
101 raises
( ::com
::sun
::star
::container
::NoSuchElementException
,
102 ::com
::sun
::star
::io
::IOException
);
104 // -----------------------------------------------------------------------
105 /** retrieves the value of "Type" tag from the entry with specified "ID"
109 If the entry has no "Type" tag an empty string is returned.
113 the value of "ID" tag
115 @throws ::com::sun::star::container::NoSuchElementException
116 in case there is no entry with specified tag
118 @throws ::com::sun::star::io::IOException
119 in case there is a problem reading the relations info
121 string getTypeByID
( [in] string sID
)
122 raises
( ::com
::sun
::star
::container
::NoSuchElementException
,
123 ::com
::sun
::star
::io
::IOException
);
125 // -----------------------------------------------------------------------
126 /** retrieves the sequence containing all the tags from the entry with
127 specified value of "ID" tag.
130 the value of "ID" tag
133 sequence, each element of the sequence represents tag,
134 <type scope="::com::sun::star::beans">StringPair</type>::First
135 represents the tag name and
136 <type scope="::com::sun::star::beans">StringPair</type>::Second
137 represents the tag value
139 @throws ::com::sun::star::container::NoSuchElementException
140 in case there is no entry with specified tag
142 @throws ::com::sun::star::io::IOException
143 in case there is a problem reading the relations info
145 sequence
< ::com
::sun
::star
::beans
::StringPair
>
146 getRelationshipByID
( [in] string sID
)
147 raises
( ::com
::sun
::star
::container
::NoSuchElementException
,
148 ::com
::sun
::star
::io
::IOException
);
150 // -----------------------------------------------------------------------
151 /** retrieves the sequence containing all the entries which "Type" tag
152 takes the specified value.
155 specified value of "Type" tag, the parameter can contain an empty
156 string, in this case all the entries that have empty "Type" tag or
157 no such tag at all are returned
160 sequence of entries, each entry is represented by sequence,
161 each element of the sequence represents tag,
162 <type scope="::com::sun::star::beans">StringPair</type>::First
163 represents the tag name and
164 <type scope="::com::sun::star::beans">StringPair</type>::Second
165 represents the tag value.
166 The sequence should contain the "ID" tag.
168 @throws ::com::sun::star::io::IOException
169 in case there is a problem reading the relations info
171 sequence
< sequence
< ::com
::sun
::star
::beans
::StringPair
> >
172 getRelationshipsByType
( [in] string sType
)
173 raises
( ::com
::sun
::star
::io
::IOException
);
175 // -----------------------------------------------------------------------
176 /** retrieves the sequence containing all the entries controlled by the
180 sequence of entries, each entry is represented by sequence,
181 each element of the sequence represents tag,
182 <type scope="::com::sun::star::beans">StringPair</type>::First
183 represents the tag name and
184 <type scope="::com::sun::star::beans">StringPair</type>::Second
185 represents the tag value
187 @throws ::com::sun::star::io::IOException
188 in case there is a problem reading the relations info
190 sequence
< sequence
< ::com
::sun
::star
::beans
::StringPair
> >
191 getAllRelationships
()
192 raises
( ::com
::sun
::star
::io
::IOException
);
194 // -----------------------------------------------------------------------
195 /** allows to insert an entry.
198 the value of "ID" tag
201 a sequence, each element of the sequence represents tag,
202 <type scope="::com::sun::star::beans">StringPair</type>::First
203 represents the tag name and
204 <type scope="::com::sun::star::beans">StringPair</type>::Second
205 represents the tag value.
206 May not contain "ID" tag, that is already specified in previous
210 specifies whether the replacement of existing entry is allowed
212 @throws ::com::sun::star::io::IOException
213 in case there is a problem reading/writing the relations info
215 @throws ::com::sun::star::container::ElementExistException
216 in case an element with the specified "ID" tag exists already, and
217 no replacement is allowed
219 void insertRelationshipByID
(
221 [in] sequence
< ::com
::sun
::star
::beans
::StringPair
> aEntry
,
222 [in] boolean bReplace
)
223 raises
( ::com
::sun
::star
::container
::ElementExistException
,
224 ::com
::sun
::star
::io
::IOException
);
226 // -----------------------------------------------------------------------
227 /** allows to remove an entry.
230 the value of "ID" tag
232 @throws ::com::sun::star::container::NoSuchElementException
233 in case there is no entry with specified tag
235 @throws ::com::sun::star::io::IOException
236 in case there is a problem reading/writing the relations info
238 void removeRelationshipByID
( [in] string sID
)
239 raises
( ::com
::sun
::star
::container
::NoSuchElementException
,
240 ::com
::sun
::star
::io
::IOException
);
242 // -----------------------------------------------------------------------
243 /** allows to insert a set of entries
246 sequence of entries, each entry is represented by sequence,
247 each element of the sequence represents tag,
248 <type scope="::com::sun::star::beans">StringPair</type>::First
249 represents the tag name and
250 <type scope="::com::sun::star::beans">StringPair</type>::Second
251 represents the tag value.
252 Each entry must contain "ID" tag.
255 specifies whether the replacement of existing entry is allowed
257 @throws ::com::sun::star::container::ElementExistException
258 in case an element with the provided "ID" tag exists already, and
259 no replacement is allowed
261 @throws ::com::sun::star::io::IOException
262 in case there is a problem reading/writing the relations info
264 void insertRelationships
(
265 [in] sequence
< sequence
< ::com
::sun
::star
::beans
::StringPair
> > aEntries
,
266 [in] boolean bReplace
)
267 raises
( ::com
::sun
::star
::container
::ElementExistException
,
268 ::com
::sun
::star
::io
::IOException
);
270 // -----------------------------------------------------------------------
271 /** allows to clear the set of entries.
273 @throws ::com::sun::star::io::IOException
274 in case there is a problem reading/writing the relations info
276 void clearRelationships
()
277 raises
( ::com
::sun
::star
::io
::IOException
);
281 //============================================================================