KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > organization > OrganizationService


1 /**
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved.
3  * Please look at license.txt in info directory for more license detail.
4  **/

5 package org.exoplatform.services.organization;
6
7 import java.util.* ;
8 import org.exoplatform.commons.utils.PageList;
9 /**
10  * Created by The eXo Platform SARL
11  * Author : Mestrallet Benjamin
12  * benjmestrallet@users.sourceforge.net
13  * Author : Tuan Nguyen
14  * tuan08@users.sourceforge.net
15  * Date: Aug 22, 2003
16  * Time: 4:46:04 PM
17  */

18 public interface OrganizationService {
19     public void addListener(OrganizationServiceListener listener) ;
20   public void removeListener(OrganizationServiceListener listener) ;
21   
22   public User createUserInstance() ;
23   public void createUser(User user) throws Exception JavaDoc ;
24   public void saveUser(User user) throws Exception JavaDoc ;
25   public User removeUser(String JavaDoc userName) throws Exception JavaDoc ;
26   public User findUserByName(String JavaDoc userName) throws Exception JavaDoc ;
27   public PageList findUsersByGroup(String JavaDoc groupId) throws Exception JavaDoc ;
28   public PageList getUserPageList(int pageSize) throws Exception JavaDoc ;
29   public PageList findUsers(Query query) throws Exception JavaDoc ;
30
31   public UserProfile createUserProfileInstance() ;
32   public void saveUserProfile(UserProfile profile) throws Exception JavaDoc ;
33   public UserProfile removeUserProfile(String JavaDoc userName) throws Exception JavaDoc ;
34   public UserProfile findUserProfileByName(String JavaDoc userName) throws Exception JavaDoc ;
35   public Collection findUserProfiles() throws Exception JavaDoc ;
36
37   public Group createGroupInstance();
38   public void createGroup(Group group) throws Exception JavaDoc ;
39   public void addChild(Group parent, Group child) throws Exception JavaDoc;
40   public void saveGroup(Group group) throws Exception JavaDoc ;
41   public Group removeGroup(Group group) throws Exception JavaDoc ;
42   public Collection findGroupByMembership(String JavaDoc userName, String JavaDoc membershipType) throws Exception JavaDoc ;
43   public Group findGroupById(String JavaDoc groupId) throws Exception JavaDoc ;
44   public Collection findGroups(Group parent) throws Exception JavaDoc ;
45   public Collection findGroupsOfUser(String JavaDoc user) throws Exception JavaDoc ;
46
47   public Membership createMembershipInstance();
48   public void createMembership(Membership m) throws Exception JavaDoc;
49   public void linkMembership(String JavaDoc userName, Group group, Membership m) throws Exception JavaDoc ;
50   public void saveMembership(Membership m) throws Exception JavaDoc ;
51   public Membership removeMembership(String JavaDoc id) throws Exception JavaDoc ;
52   public Membership findMembership(String JavaDoc id) throws Exception JavaDoc ;
53   public Membership findMembershipByUserGroupAndType(String JavaDoc userName, String JavaDoc groupId, String JavaDoc type) throws Exception JavaDoc ;
54   public Collection findMembershipsByUserAndGroup(String JavaDoc userName, String JavaDoc groupId) throws Exception JavaDoc ;
55   public Collection findMembershipsByUser(String JavaDoc userName) throws Exception JavaDoc ;
56   public Collection findMembershipsByGroup(Group group) throws Exception JavaDoc ;
57
58   public MembershipType createMembershipTypeInstance();
59   public MembershipType createMembershipType(MembershipType mt) throws Exception JavaDoc ;
60   public MembershipType saveMembershipType(MembershipType mt) throws Exception JavaDoc ;
61   public MembershipType removeMembershipType(String JavaDoc name) throws Exception JavaDoc ;
62   public MembershipType findMembershipType(String JavaDoc name) throws Exception JavaDoc ;
63   public Collection findMembershipTypes() throws Exception JavaDoc ;
64
65   public void addUserEventListener(UserEventListener listener) ;
66   public void addUserProfileEventListener(UserProfileEventListener listener) ;
67   public void addGroupEventListener(GroupEventListener listener) ;
68   public void addMembershipEventListener(MembershipEventListener listener) ;
69   
70   public boolean authenticate(String JavaDoc username, String JavaDoc password) throws Exception JavaDoc ;
71 }
Popular Tags