KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sync4j > server > admin > ejb > AdminRemote


1 /**
2  * Copyright (C) 2003-2005 Funambol
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18 package sync4j.server.admin.ejb;
19
20 import java.rmi.RemoteException JavaDoc;
21 import javax.ejb.*;
22
23 import sync4j.framework.config.LoggingConfiguration;
24 import sync4j.framework.engine.source.SyncSource;
25 import sync4j.framework.security.Sync4jPrincipal;
26 import sync4j.framework.server.Sync4jUser;
27 import sync4j.framework.server.Sync4jDevice;
28 import sync4j.framework.server.store.Clause;
29 import sync4j.framework.server.Sync4jModule;
30 import sync4j.framework.server.error.ServerException;
31
32 import sync4j.server.admin.AdminException;
33
34 import sync4j.server.config.Configuration;
35
36 /**
37  * @author Luigia Fassina @ Funambol
38  *
39  * @version $Id: AdminRemote.java,v 1.6 2005/06/07 08:59:34 luigiafassina Exp $
40  *
41  */

42 public interface AdminRemote extends javax.ejb.EJBObject JavaDoc
43 {
44     /**
45      * CONFIGURATION
46      */

47     public Configuration getConfig() throws RemoteException JavaDoc;
48
49     /**
50      * USER
51      */

52     public String JavaDoc[] getRoles()
53     throws RemoteException JavaDoc, ServerException, AdminException;
54
55     public Sync4jUser[] getUsers(Clause clause)
56     throws RemoteException JavaDoc, ServerException, AdminException;
57
58     public void addUser(Sync4jUser u)
59     throws RemoteException JavaDoc, ServerException, AdminException;
60
61     public void setUser(Sync4jUser u)
62     throws RemoteException JavaDoc, ServerException, AdminException;
63
64     public void deleteUser(String JavaDoc userName)
65     throws RemoteException JavaDoc, ServerException, AdminException;
66
67     public int countUsers(Clause clause)
68     throws RemoteException JavaDoc, ServerException, AdminException;
69
70     /**
71      * DEVICE
72      */

73     public Sync4jDevice[] getDevices(Clause clause)
74     throws RemoteException JavaDoc, ServerException, AdminException;
75
76     public String JavaDoc addDevice(Sync4jDevice d)
77     throws RemoteException JavaDoc, ServerException, AdminException;
78
79     public void setDevice(Sync4jDevice d)
80     throws RemoteException JavaDoc, ServerException, AdminException;
81
82     public void deleteDevice(String JavaDoc deviceId)
83     throws RemoteException JavaDoc, ServerException, AdminException;
84
85     public int countDevices(Clause clause)
86     throws RemoteException JavaDoc, ServerException, AdminException;
87
88
89     /**
90      * PRINCIPAL
91      */

92     public Sync4jPrincipal[] getPrincipals(Clause clause)
93     throws RemoteException JavaDoc, ServerException, AdminException;
94
95     public String JavaDoc addPrincipal(Sync4jPrincipal p)
96     throws RemoteException JavaDoc, ServerException, AdminException;
97
98     public void deletePrincipal(String JavaDoc principalId)
99     throws RemoteException JavaDoc, ServerException, AdminException;
100
101     public int countPrincipals(Clause clause)
102     throws RemoteException JavaDoc, ServerException, AdminException;
103     
104     /**
105      * MODULE
106      */

107     public Sync4jModule[] getModulesName()
108     throws RemoteException JavaDoc, ServerException, AdminException;
109
110     public Sync4jModule getModule(String JavaDoc moduleId)
111     throws RemoteException JavaDoc, ServerException, AdminException;
112
113     /**
114      * SOURCE
115      */

116     public void addSource(String JavaDoc moduleId, String JavaDoc connectorId, String JavaDoc sourceTypeId, SyncSource source)
117     throws RemoteException JavaDoc, ServerException, AdminException;
118
119     public void setSource(String JavaDoc moduleId, String JavaDoc connectorId, String JavaDoc sourceTypeId, SyncSource source)
120     throws RemoteException JavaDoc, ServerException, AdminException;
121
122     public void deleteSource(String JavaDoc sourceUri)
123     throws RemoteException JavaDoc, ServerException, AdminException;
124
125     /**
126      * SETTINGS
127      */

128
129     /**
130      * NOTE: do not use this method as it will be replaced by
131      * getServerConfiguration() in Sync4j 2.5
132      */

133     public LoggingConfiguration getLoggingConfiguration()
134     throws RemoteException JavaDoc, ServerException, AdminException;
135     
136     /**
137      * SERVER BEANS
138      */

139     
140     /**
141      * Returns the server bean with the given name. If the bean does not exist,
142      * am AdminException is thrown.
143      *
144      * @param bean the server bean
145      *
146      * @throws ServerException, AdminException
147      */

148     public Object JavaDoc getServerBean(String JavaDoc bean)
149     throws RemoteException JavaDoc, ServerException, AdminException;
150     
151     /**
152      * Sets the server bean with the given name.
153      *
154      * @param bean the server bean
155      * @param obj the bean instance
156      *
157      * @throws ServerException, AdminException
158      */

159     public void setServerBean(String JavaDoc bean, Object JavaDoc obj)
160     throws RemoteException JavaDoc, ServerException, AdminException;
161
162
163 }
164
Popular Tags