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: XLibraryContainerPassword.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_script_XLibraryContainerPassword_idl__
31 #define __com_sun_star_script_XLibraryContainerPassword_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include
<com
/sun
/star
/uno
/XInterface.idl
>
37 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
38 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
41 #ifndef __com_sun_star_container_NoSuchElementException_idl__
42 #include
<com
/sun
/star
/container
/NoSuchElementException.idl
>
46 //=============================================================================
48 module com
{ module sun
{ module star
{ module script
{
50 //=============================================================================
53 Extension of XLibraryContainer to provide password functionality.
54 This interface should be implemented together with XLibraryContainer2
57 published
interface XLibraryContainerPassword
: com
::sun
::star
::uno
::XInterface
60 Returns true if the accessed library item is protected
63 If a library with the this name doesn't exist a
64 com::sun::star::container::NoSuchElementException is thrown.
66 boolean isLibraryPasswordProtected
( [in] string Name
)
67 raises
( com
::sun
::star
::container
::NoSuchElementException
);
70 Returns true if the accessed library item is protected by a
71 password (see isLibraryPasswordProtected) and the password
72 was already verified with verifyLibraryPassword or if an
73 initial password was set with changeLibraryPassword.
75 If a library with the this name doesn't exist a
76 com::sun::star::container::NoSuchElementException is thrown.
78 If the library exists but isn't password protected a
79 com::sun::star::lang::IllegalArgumentException is thrown.
81 boolean isLibraryPasswordVerified
( [in] string Name
)
82 raises
( com
::sun
::star
::lang
::IllegalArgumentException
,
83 com
::sun
::star
::container
::NoSuchElementException
);
86 Verifies the library's password. If the correct password
87 was passed, the method returns true and further calls to
88 isLibraryPasswordVerified will also return true.
90 If a library with the this name doesn't exist a
91 com::sun::star::container::NoSuchElementException is thrown.
93 If the library exists but isn't password protected a
94 com::sun::star::lang::IllegalArgumentException is thrown.
96 If the library password is already verified a
97 com::sun::star::lang::IllegalArgumentException is thrown.
99 boolean verifyLibraryPassword
( [in] string Name
, [in] string Password
)
100 raises
( com
::sun
::star
::lang
::IllegalArgumentException
,
101 com
::sun
::star
::container
::NoSuchElementException
);
104 Changes the library's password.
106 If the library wasn't password protected before:
107 The OldPassword parameter has to be an empty string.
108 Afterwards calls to isLibraryPasswordProtected and
109 isLibraryPasswordVerified for this library will
112 If the library already was password protected:
113 The OldPassword parameter has to be set to the
114 previous defined password. If then the NewPassword
115 parameter is an empty string the library password
116 protection will be disabled afterwards (afterwards
117 calls to isLibraryPasswordProtected for this library
118 will return false). If the NewPassword parameter is
119 not an empty string it will accepted as the new
120 password for the library.
122 If a library with the this name doesn't exist but isn't
123 com::sun::star::container::NoSuchElementException is thrown.
125 If the library exists and is password protected and a
126 wrong OldPassword is passed to the method a
127 com::sun::star::lang::IllegalArgumentException is thrown.
129 If the library exists and isn't password protected and
130 the OldPassword isn't an empty string or the library is
132 com::sun::star::lang::IllegalArgumentException is thrown.
134 void changeLibraryPassword
( [in] string Name
,
135 [in] string OldPassword
, [in] string NewPassword
)
136 raises
( com
::sun
::star
::lang
::IllegalArgumentException
,
137 com
::sun
::star
::container
::NoSuchElementException
);
141 //=============================================================================