KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > common > ejbs > stateful > containermanaged > security > ItfSecurityRolesTester


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: ItfSecurityRolesTester.java 864 2006-07-13 11:31:08Z pinheirg $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.security;
27
28 /**
29  * Test the differents roles types and also the methods related with security
30  * in the EJBContext.
31  * @author Gisele Pinheiro Souza
32  * @author Eduardo Studzinski Estima de Castro
33  */

34 public interface ItfSecurityRolesTester {
35
36     /**
37      * Verifies if the caller is propagated among the beans.
38      */

39     void testGetCallerPrincipalSameCaller();
40
41     /**
42      * Verifies if the annotation RunAs is setting the role only for the callee
43      * and not for the caller.
44      */

45     void testGetCallerPrincipalDifferentCaller();
46
47     /**
48      * Verifies if the method is caller in role returns false for the incorrect
49      * role.
50      */

51     void testIsCallerInRoleIncorrect();
52
53     /**
54      * Verifies if the method is caller in role returns true for the correct
55      * role.
56      */

57     void testIsCallerInRoleCorrect();
58
59     /**
60      * Verifies if the method that is not implemented throws the correct
61      * exception.
62      */

63     @SuppressWarnings JavaDoc("deprecation")
64     void testGetCallerIdentity();
65
66     /**
67      * Verifies if the method that is not implemented throws the correct
68      * exception.
69      */

70     @SuppressWarnings JavaDoc("deprecation")
71     void testIsCallerInRoleDeprecated();
72
73     /**
74      * Verifies if the permitAll police works.
75      */

76     void testPermitAll();
77
78     /**
79      * Verifies if the denyAll police works.
80      */

81     void testDenyAll();
82
83     /**
84      * Verifies if the allowedRoles police for two roles(the role specified in
85      * the RunAs and other role) works.
86      */

87     void testAllowedRolesWithTwoRoles();
88
89     /**
90      * Verifies if the allowedRoles police for one role(the role specified in
91      * the RunAs) works.
92      */

93     void testAllowedRolesWithOneRole();
94
95 }
96
Popular Tags