KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > za > org > coefficient > interfaces > Module


1 /*
2  * Coefficient - facilitates project based collaboration
3  * Copyright (C) 2003, Dylan Etkin, CSIR icomtek
4  * PO Box 395
5  * Pretoria 0001, RSA
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 (at your option) any later version.
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */

19
20 package za.org.coefficient.interfaces;
21
22 import za.org.coefficient.authentication.Role;
23
24 /**
25  * This interface defines methods that must be implemented by a module of the
26  * system. A module will have methods invoked with a single parameter,
27  * za.org.coefficient.core.CoefficientContext .
28  */

29 public interface Module {
30     //~ Methods ================================================================
31

32     public void setCoefficientContext(CoefficientContext ctx)
33         throws java.rmi.RemoteException JavaDoc;
34
35     public CoefficientContext getCoefficientContext()
36         throws java.rmi.RemoteException JavaDoc;
37
38     /**
39      * This method is used to determine which method should be invoked when
40      * the module is requested without an operation.
41      *
42      * @return name of the method that should be invoked
43      */

44     public String JavaDoc getMainMethod() throws java.rmi.RemoteException JavaDoc;
45
46     /**
47         * This method is used to find the description of the module
48         *
49         * @return the description of the module
50         */

51     public String JavaDoc getModuleDescription() throws java.rmi.RemoteException JavaDoc;
52
53     /**
54      * This method is used to find the display name of the module
55      *
56      * @return the display name of the module
57      */

58     public String JavaDoc getModuleDisplayName() throws java.rmi.RemoteException JavaDoc;
59
60     /**
61      * This method is used to find the system name of the module that is used
62      * to resolve the session bean
63      *
64      * @return the system name of the module
65      */

66     public String JavaDoc getModuleName() throws java.rmi.RemoteException JavaDoc;
67
68     /**
69      * This method is used to determine if a named method can be executed
70      * for a specified system role.
71      *
72      * @return null if we can execute the method an error message if not
73      */

74     public String JavaDoc canExecuteForRole(CoefficientContext ctx, String JavaDoc methodName,
75         Role usersHighestRole) throws java.rmi.RemoteException JavaDoc;
76
77     /**
78      * This method is used to show help on the your module. You can get the
79      * op name by calling CoefficientContext.getLastNonHelpOp()
80      */

81     public CoefficientContext showHelp(CoefficientContext ctx)
82         throws java.rmi.RemoteException JavaDoc;
83
84     /**
85      * This method is used determine if we implement BaseProjectModule
86      */

87     public boolean isProjectRequired() throws java.rmi.RemoteException JavaDoc;
88 }
89
Popular Tags