KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > api > bean > info > IMethodSecurityInfo


1 /**
2  * EasyBeans
3  * Copyright (C) 2006 Bull S.A.S.
4  * Contact: easybeans@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id: IMethodSecurityInfo.java 1121 2006-09-27 08:51:06Z benoitf $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.easybeans.api.bean.info;
27
28 import java.security.Permission JavaDoc;
29 import java.util.List JavaDoc;
30
31 /**
32  * Used to describe permission information for a given method.
33  * @author Florent Benoit
34  */

35 public interface IMethodSecurityInfo {
36
37     /**
38      * This method is excluded (no call allowed if true).
39      * @param excluded boolean true/false.
40      */

41     void setExcluded(boolean excluded);
42
43     /**
44      * @return true if the method is excluded.
45      */

46     boolean isExcluded();
47
48     /**
49      * This method is unchecked (if true, all calls are allowed to this method).
50      * @param unchecked boolean true/false.
51      */

52     void setUnchecked(boolean unchecked);
53
54     /**
55      * @return true if the method is unchecked.
56      */

57     boolean isUnchecked();
58
59     /**
60      * Add the given role to the list of roles allowed to call this method.
61      * @param roleName the name of the role.
62      */

63     void addRole(String JavaDoc roleName);
64
65     /**
66      * @return list of roles allowed to call this method.
67      */

68     List JavaDoc<String JavaDoc> getRoles();
69
70     /**
71      * Sets the permission.
72      * @param permission the permission to set.
73      */

74     void setPermission(Permission JavaDoc permission);
75
76     /**
77      * @return permissions for this method.
78      */

79     Permission JavaDoc getPermission();
80
81 }
82
Popular Tags