update dev300-m58
[ooovba.git] / udkapi / com / sun / star / security / XAccessControlContext.idl
blob8452ef689d1f6db84582b2865f34d8a16fd899f1
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XAccessControlContext.idl,v $
10 * $Revision: 1.16 $
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_security_XAccessControlContext_idl__
31 #define __com_sun_star_security_XAccessControlContext_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include <com/sun/star/uno/XInterface.idl>
35 #endif
36 #ifndef __com_sun_star_security_AccessControlException_idl__
37 #include <com/sun/star/security/AccessControlException.idl>
38 #endif
41 //=============================================================================
43 module com { module sun { module star { module security {
45 //=============================================================================
47 /** An XAccessControlContext is used to make system resource access decisions
48 based on the context it encapsulates.
49 <p>
50 More specifically, it encapsulates a context and has methods to check
51 permissions equivalent to XAccessController interface,
52 with one difference:
53 The XAccessControlContext makes access decisions
54 based on the context it encapsulates, rather than
55 that of the current execution thread.
56 </p>
58 @since OOo 1.1.2
60 published interface XAccessControlContext : com::sun::star::uno::XInterface
62 /** Determines whether the access request indicated by the specified
63 permission should be allowed or denied, based on this context.
64 The semantics are equivalent to the security permission classes of
65 the Java platform.
66 <p>
67 You can also pass a sequence of permissions (sequence< any >) to check
68 a set of permissions, e.g. for performance reasons.
69 This method quietly returns if the access request is permitted,
70 or throws a suitable AccessControlException otherwise.
71 </p>
73 @param perm
74 permission to be checked
76 @throws AccessControlException
77 thrown if access is denied
79 @see ::com::sun::star::security::AccessControlException
80 @see ::com::sun::star::security::AllPermission
81 @see ::com::sun::star::security::RuntimePermission
82 @see ::com::sun::star::io::FilePermission
83 @see ::com::sun::star::connection::SocketPermission
85 void checkPermission(
86 [in] any perm )
87 raises (AccessControlException);
90 //=============================================================================
92 }; }; }; };
94 #endif