KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > jcr > impl > mock > DummyOrganizationService


1 /*
2  * Created on Feb 3, 2005
3  */

4 package org.exoplatform.services.jcr.impl.mock;
5
6 import java.util.Collection JavaDoc;
7
8 import org.exoplatform.commons.utils.PageList;
9 import org.exoplatform.services.organization.Group;
10 import org.exoplatform.services.organization.GroupEventListener;
11 import org.exoplatform.services.organization.Membership;
12 import org.exoplatform.services.organization.MembershipEventListener;
13 import org.exoplatform.services.organization.MembershipType;
14 import org.exoplatform.services.organization.OrganizationService;
15 import org.exoplatform.services.organization.OrganizationServiceListener;
16 import org.exoplatform.services.organization.Query;
17 import org.exoplatform.services.organization.User;
18 import org.exoplatform.services.organization.UserEventListener;
19 import org.exoplatform.services.organization.UserProfile;
20 import org.exoplatform.services.organization.UserProfileEventListener;
21
22 /**
23  * @author benjaminmestrallet
24  */

25 public class DummyOrganizationService implements OrganizationService{
26
27
28   public void addListener(OrganizationServiceListener listener) {}
29
30
31   public void removeListener(OrganizationServiceListener listener) {
32   }
33
34   public User createUserInstance() {
35     return null;
36   }
37
38   public void createUser(User user) throws Exception JavaDoc {
39   }
40
41   public void saveUser(User user) throws Exception JavaDoc {
42   }
43
44   public User removeUser(String JavaDoc userName) throws Exception JavaDoc {
45     // TODO Auto-generated method stub
46
return null;
47   }
48
49   /* (non-Javadoc)
50    * @see org.exoplatform.services.organization.OrganizationService#findUserByName(java.lang.String)
51    */

52   public User findUserByName(String JavaDoc userName) throws Exception JavaDoc {
53     // TODO Auto-generated method stub
54
return null;
55   }
56
57   /* (non-Javadoc)
58    * @see org.exoplatform.services.organization.OrganizationService#findUsersByGroup(java.lang.String)
59    */

60   public PageList findUsersByGroup(String JavaDoc groupId) throws Exception JavaDoc {
61     // TODO Auto-generated method stub
62
return null;
63   }
64
65   /* (non-Javadoc)
66    * @see org.exoplatform.services.organization.OrganizationService#getUserPageList(int)
67    */

68   public PageList getUserPageList(int pageSize) throws Exception JavaDoc {
69     // TODO Auto-generated method stub
70
return null;
71   }
72
73   /* (non-Javadoc)
74    * @see org.exoplatform.services.organization.OrganizationService#findUsers(org.exoplatform.services.organization.Query)
75    */

76   public PageList findUsers(Query query) throws Exception JavaDoc {
77     // TODO Auto-generated method stub
78
return null;
79   }
80
81   /* (non-Javadoc)
82    * @see org.exoplatform.services.organization.OrganizationService#createUserProfileInstance()
83    */

84   public UserProfile createUserProfileInstance() {
85     // TODO Auto-generated method stub
86
return null;
87   }
88
89   /* (non-Javadoc)
90    * @see org.exoplatform.services.organization.OrganizationService#saveUserProfile(org.exoplatform.services.organization.UserProfile)
91    */

92   public void saveUserProfile(UserProfile profile) throws Exception JavaDoc {
93     // TODO Auto-generated method stub
94

95   }
96
97   /* (non-Javadoc)
98    * @see org.exoplatform.services.organization.OrganizationService#removeUserProfile(java.lang.String)
99    */

100   public UserProfile removeUserProfile(String JavaDoc userName) throws Exception JavaDoc {
101     // TODO Auto-generated method stub
102
return null;
103   }
104
105   /* (non-Javadoc)
106    * @see org.exoplatform.services.organization.OrganizationService#findUserProfileByName(java.lang.String)
107    */

108   public UserProfile findUserProfileByName(String JavaDoc userName) throws Exception JavaDoc {
109     // TODO Auto-generated method stub
110
return null;
111   }
112
113   /* (non-Javadoc)
114    * @see org.exoplatform.services.organization.OrganizationService#findUserProfiles()
115    */

116   public Collection JavaDoc findUserProfiles() throws Exception JavaDoc {
117     // TODO Auto-generated method stub
118
return null;
119   }
120
121   /* (non-Javadoc)
122    * @see org.exoplatform.services.organization.OrganizationService#createGroupInstance()
123    */

124   public Group createGroupInstance() {
125     // TODO Auto-generated method stub
126
return null;
127   }
128
129   /* (non-Javadoc)
130    * @see org.exoplatform.services.organization.OrganizationService#createGroup(org.exoplatform.services.organization.Group)
131    */

132   public void createGroup(Group group) throws Exception JavaDoc {
133     // TODO Auto-generated method stub
134

135   }
136
137   /* (non-Javadoc)
138    * @see org.exoplatform.services.organization.OrganizationService#addChild(org.exoplatform.services.organization.Group, org.exoplatform.services.organization.Group)
139    */

140   public void addChild(Group parent, Group child) throws Exception JavaDoc {
141     // TODO Auto-generated method stub
142

143   }
144
145   /* (non-Javadoc)
146    * @see org.exoplatform.services.organization.OrganizationService#saveGroup(org.exoplatform.services.organization.Group)
147    */

148   public void saveGroup(Group group) throws Exception JavaDoc {
149     // TODO Auto-generated method stub
150

151   }
152
153   /* (non-Javadoc)
154    * @see org.exoplatform.services.organization.OrganizationService#removeGroup(org.exoplatform.services.organization.Group)
155    */

156   public Group removeGroup(Group group) throws Exception JavaDoc {
157     // TODO Auto-generated method stub
158
return null;
159   }
160
161   /* (non-Javadoc)
162    * @see org.exoplatform.services.organization.OrganizationService#findGroupByMembership(java.lang.String, java.lang.String)
163    */

164   public Collection JavaDoc findGroupByMembership(String JavaDoc userName, String JavaDoc membershipType) throws Exception JavaDoc {
165     // TODO Auto-generated method stub
166
return null;
167   }
168
169   /* (non-Javadoc)
170    * @see org.exoplatform.services.organization.OrganizationService#findGroupById(java.lang.String)
171    */

172   public Group findGroupById(String JavaDoc groupId) throws Exception JavaDoc {
173     // TODO Auto-generated method stub
174
return null;
175   }
176
177   /* (non-Javadoc)
178    * @see org.exoplatform.services.organization.OrganizationService#findGroups(org.exoplatform.services.organization.Group)
179    */

180   public Collection JavaDoc findGroups(Group parent) throws Exception JavaDoc {
181     // TODO Auto-generated method stub
182
return null;
183   }
184
185   /* (non-Javadoc)
186    * @see org.exoplatform.services.organization.OrganizationService#findGroupsOfUser(java.lang.String)
187    */

188   public Collection JavaDoc findGroupsOfUser(String JavaDoc user) throws Exception JavaDoc {
189     // TODO Auto-generated method stub
190
return null;
191   }
192
193   /* (non-Javadoc)
194    * @see org.exoplatform.services.organization.OrganizationService#createMembershipInstance()
195    */

196   public Membership createMembershipInstance() {
197     // TODO Auto-generated method stub
198
return null;
199   }
200
201   /* (non-Javadoc)
202    * @see org.exoplatform.services.organization.OrganizationService#createMembership(org.exoplatform.services.organization.Membership)
203    */

204   public void createMembership(Membership m) throws Exception JavaDoc {
205     // TODO Auto-generated method stub
206

207   }
208
209   /* (non-Javadoc)
210    * @see org.exoplatform.services.organization.OrganizationService#linkMembership(java.lang.String, org.exoplatform.services.organization.Group, org.exoplatform.services.organization.Membership)
211    */

212   public void linkMembership(String JavaDoc userName, Group group, Membership m) throws Exception JavaDoc {
213     // TODO Auto-generated method stub
214

215   }
216
217   /* (non-Javadoc)
218    * @see org.exoplatform.services.organization.OrganizationService#saveMembership(org.exoplatform.services.organization.Membership)
219    */

220   public void saveMembership(Membership m) throws Exception JavaDoc {
221     // TODO Auto-generated method stub
222

223   }
224
225   /* (non-Javadoc)
226    * @see org.exoplatform.services.organization.OrganizationService#removeMembership(java.lang.String)
227    */

228   public Membership removeMembership(String JavaDoc id) throws Exception JavaDoc {
229     // TODO Auto-generated method stub
230
return null;
231   }
232
233   /* (non-Javadoc)
234    * @see org.exoplatform.services.organization.OrganizationService#findMembership(java.lang.String)
235    */

236   public Membership findMembership(String JavaDoc id) throws Exception JavaDoc {
237     // TODO Auto-generated method stub
238
return null;
239   }
240
241   /* (non-Javadoc)
242    * @see org.exoplatform.services.organization.OrganizationService#findMembershipByUserGroupAndType(java.lang.String, java.lang.String, java.lang.String)
243    */

244   public Membership findMembershipByUserGroupAndType(String JavaDoc userName, String JavaDoc groupId, String JavaDoc type) throws Exception JavaDoc {
245     // TODO Auto-generated method stub
246
return null;
247   }
248
249   /* (non-Javadoc)
250    * @see org.exoplatform.services.organization.OrganizationService#findMembershipsByUserAndGroup(java.lang.String, java.lang.String)
251    */

252   public Collection JavaDoc findMembershipsByUserAndGroup(String JavaDoc userName, String JavaDoc groupId) throws Exception JavaDoc {
253     // TODO Auto-generated method stub
254
return null;
255   }
256
257   /* (non-Javadoc)
258    * @see org.exoplatform.services.organization.OrganizationService#findMembershipsByUser(java.lang.String)
259    */

260   public Collection JavaDoc findMembershipsByUser(String JavaDoc userName) throws Exception JavaDoc {
261     // TODO Auto-generated method stub
262
return null;
263   }
264
265   /* (non-Javadoc)
266    * @see org.exoplatform.services.organization.OrganizationService#findMembershipsByGroup(org.exoplatform.services.organization.Group)
267    */

268   public Collection JavaDoc findMembershipsByGroup(Group group) throws Exception JavaDoc {
269     // TODO Auto-generated method stub
270
return null;
271   }
272
273   /* (non-Javadoc)
274    * @see org.exoplatform.services.organization.OrganizationService#createMembershipTypeInstance()
275    */

276   public MembershipType createMembershipTypeInstance() {
277     // TODO Auto-generated method stub
278
return null;
279   }
280
281   /* (non-Javadoc)
282    * @see org.exoplatform.services.organization.OrganizationService#createMembershipType(org.exoplatform.services.organization.MembershipType)
283    */

284   public MembershipType createMembershipType(MembershipType mt) throws Exception JavaDoc {
285     // TODO Auto-generated method stub
286
return null;
287   }
288
289   /* (non-Javadoc)
290    * @see org.exoplatform.services.organization.OrganizationService#saveMembershipType(org.exoplatform.services.organization.MembershipType)
291    */

292   public MembershipType saveMembershipType(MembershipType mt) throws Exception JavaDoc {
293     // TODO Auto-generated method stub
294
return null;
295   }
296
297   /* (non-Javadoc)
298    * @see org.exoplatform.services.organization.OrganizationService#removeMembershipType(java.lang.String)
299    */

300   public MembershipType removeMembershipType(String JavaDoc name) throws Exception JavaDoc {
301     // TODO Auto-generated method stub
302
return null;
303   }
304
305   /* (non-Javadoc)
306    * @see org.exoplatform.services.organization.OrganizationService#findMembershipType(java.lang.String)
307    */

308   public MembershipType findMembershipType(String JavaDoc name) throws Exception JavaDoc {
309     // TODO Auto-generated method stub
310
return null;
311   }
312
313   /* (non-Javadoc)
314    * @see org.exoplatform.services.organization.OrganizationService#findMembershipTypes()
315    */

316   public Collection JavaDoc findMembershipTypes() throws Exception JavaDoc {
317     // TODO Auto-generated method stub
318
return null;
319   }
320
321   /* (non-Javadoc)
322    * @see org.exoplatform.services.organization.OrganizationService#addUserEventListener(org.exoplatform.services.organization.UserEventListener)
323    */

324   public void addUserEventListener(UserEventListener listener) {
325     // TODO Auto-generated method stub
326

327   }
328
329   /* (non-Javadoc)
330    * @see org.exoplatform.services.organization.OrganizationService#addUserProfileEventListener(org.exoplatform.services.organization.UserProfileEventListener)
331    */

332   public void addUserProfileEventListener(UserProfileEventListener listener) {
333     // TODO Auto-generated method stub
334

335   }
336
337   /* (non-Javadoc)
338    * @see org.exoplatform.services.organization.OrganizationService#addGroupEventListener(org.exoplatform.services.organization.GroupEventListener)
339    */

340   public void addGroupEventListener(GroupEventListener listener) {
341     // TODO Auto-generated method stub
342

343   }
344
345   /* (non-Javadoc)
346    * @see org.exoplatform.services.organization.OrganizationService#addMembershipEventListener(org.exoplatform.services.organization.MembershipEventListener)
347    */

348   public void addMembershipEventListener(MembershipEventListener listener) {
349     // TODO Auto-generated method stub
350

351   }
352
353   /* (non-Javadoc)
354    * @see org.exoplatform.services.organization.OrganizationService#authenticate(java.lang.String, java.lang.String)
355    */

356   public boolean authenticate(String JavaDoc username, String JavaDoc password) throws Exception JavaDoc {
357     if("exo".equals(username) && "exo".equals(password))
358       return true;
359     return false;
360   }
361
362 }
363
Popular Tags