1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_script_XLibraryContainer2_idl__
24#define __com_sun_star_script_XLibraryContainer2_idl__
25
26#ifndef __com_sun_star_script_XLibraryContainer_idl__
27#include <com/sun/star/script/XLibraryContainer.idl>
28#endif
29
30
31//=============================================================================
32
33 module com {  module sun {  module star {  module script {
34
35//=============================================================================
36
37/**
38	Extension of <type>XLibraryContainer</type> to provide additional information
39	about the libraries contained in a library container
40 */
41published interface XLibraryContainer2: com::sun::star::script::XLibraryContainer
42{
43	/**
44		returns true if the accessed library item is a link,
45		e.g., created by createLibraryLink, otherwise false.
46	 */
47	boolean isLibraryLink( [in] string Name )
48			raises( com::sun::star::container::NoSuchElementException );
49
50	/**
51		returns the location of the library link target.
52		Should return the same URL that was passed to
53		createLibraryLink in the StorageURL parameter.
54
55		If the accessed library item exists but isn't a
56		link, a IllegalArgumentException is thrown
57	 */
58	string getLibraryLinkURL( [in] string Name )
59			raises( com::sun::star::lang::IllegalArgumentException,
60					com::sun::star::container::NoSuchElementException );
61
62	/**
63		returns true if the accessed library item (library or library
64		link) is read only. A library can be read only because it was
65		set to read only using the methods provided by this interface
66		or because of other reasons depending on the implementation
67		(e.g., file system write protection)
68	 */
69	boolean isLibraryReadOnly( [in] string Name )
70			raises( com::sun::star::container::NoSuchElementException );
71
72	/**
73		Sets the accessed library item (library or library link) to
74		read only according to the flag bReadOnly (true means read only)
75	 */
76	void setLibraryReadOnly( [in] string Name, [in] boolean bReadOnly )
77			raises( com::sun::star::container::NoSuchElementException );
78
79	/** renames the library item with the specified name. If the accessed
80		library item is a link only the link is renamed, not the target library.
81		If a library with the new name exists already a
82		com::sun::star::container::ElementExistException is thrown.
83	 */
84	void renameLibrary( [in] string Name, [in] string NewName )
85			raises( com::sun::star::container::NoSuchElementException,
86					com::sun::star::container::ElementExistException );
87
88};
89
90//=============================================================================
91
92
93}; }; }; };
94
95#endif
96