KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > jtests > beans > secured > BaseS


1 /*
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@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: BaseS.java,v 1.6 2004/10/20 14:42:29 durieuxp Exp $
23  * --------------------------------------------------------------------------
24  */

25
26 // BaseS.java
27

28 package org.objectweb.jonas.jtests.beans.secured;
29
30 import java.util.Hashtable JavaDoc;
31 import java.rmi.RemoteException JavaDoc;
32 import javax.ejb.EJBObject JavaDoc;
33
34 /**
35  * This is the base interface, implemented by all beans
36  */

37 public interface BaseS extends EJBObject JavaDoc {
38     public String JavaDoc getPrincipalName() throws RemoteException JavaDoc;
39     public String JavaDoc getPrincipalNameOfAnotherBean() throws RemoteException JavaDoc;
40
41     public boolean isCallerInRole(String JavaDoc role) throws RemoteException JavaDoc;
42     public void simpleMethod() throws RemoteException JavaDoc;
43     public void complexMethod(Hashtable JavaDoc h, Object JavaDoc[] o) throws RemoteException JavaDoc;
44     public boolean callAnotherMethod() throws RemoteException JavaDoc;
45
46     public int getTimerCount() throws RemoteException JavaDoc;
47     public int setTimer(int duration, int period, int action) throws RemoteException JavaDoc;
48
49     // runAs methods
50

51     // Execute a method without runAs on the derived bean
52
public boolean callBeanNoRunAsWithRole1() throws RemoteException JavaDoc;
53
54     // Execute a method with being executed in a runas mode on a no-runAs derived bean
55
// It must fail as it will call a method with the bad role
56
public boolean callBeanNoRunAsWithRole2() throws RemoteException JavaDoc;
57
58
59     // Execute a method without being in runAs mode on a runAs derived bean
60
public boolean callBeanRunAsWithRole1() throws RemoteException JavaDoc;
61
62     // Execute a method without being in runAs mode on a runAs derived bean
63
public boolean callBeanRunAsWithRole2() throws RemoteException JavaDoc;
64
65     /**
66      * This method is in excluded list in DD
67      * @throws RemoteException if access failed
68      */

69     public void excludedMethod() throws RemoteException JavaDoc;
70
71 }
72
73
74
Popular Tags