1 5 package org.exoplatform.services.organization; 6 7 import java.util.* ; 8 import org.exoplatform.commons.utils.PageList; 9 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 ; 24 public void saveUser(User user) throws Exception ; 25 public User removeUser(String userName) throws Exception ; 26 public User findUserByName(String userName) throws Exception ; 27 public PageList findUsersByGroup(String groupId) throws Exception ; 28 public PageList getUserPageList(int pageSize) throws Exception ; 29 public PageList findUsers(Query query) throws Exception ; 30 31 public UserProfile createUserProfileInstance() ; 32 public void saveUserProfile(UserProfile profile) throws Exception ; 33 public UserProfile removeUserProfile(String userName) throws Exception ; 34 public UserProfile findUserProfileByName(String userName) throws Exception ; 35 public Collection findUserProfiles() throws Exception ; 36 37 public Group createGroupInstance(); 38 public void createGroup(Group group) throws Exception ; 39 public void addChild(Group parent, Group child) throws Exception ; 40 public void saveGroup(Group group) throws Exception ; 41 public Group removeGroup(Group group) throws Exception ; 42 public Collection findGroupByMembership(String userName, String membershipType) throws Exception ; 43 public Group findGroupById(String groupId) throws Exception ; 44 public Collection findGroups(Group parent) throws Exception ; 45 public Collection findGroupsOfUser(String user) throws Exception ; 46 47 public Membership createMembershipInstance(); 48 public void createMembership(Membership m) throws Exception ; 49 public void linkMembership(String userName, Group group, Membership m) throws Exception ; 50 public void saveMembership(Membership m) throws Exception ; 51 public Membership removeMembership(String id) throws Exception ; 52 public Membership findMembership(String id) throws Exception ; 53 public Membership findMembershipByUserGroupAndType(String userName, String groupId, String type) throws Exception ; 54 public Collection findMembershipsByUserAndGroup(String userName, String groupId) throws Exception ; 55 public Collection findMembershipsByUser(String userName) throws Exception ; 56 public Collection findMembershipsByGroup(Group group) throws Exception ; 57 58 public MembershipType createMembershipTypeInstance(); 59 public MembershipType createMembershipType(MembershipType mt) throws Exception ; 60 public MembershipType saveMembershipType(MembershipType mt) throws Exception ; 61 public MembershipType removeMembershipType(String name) throws Exception ; 62 public MembershipType findMembershipType(String name) throws Exception ; 63 public Collection findMembershipTypes() throws Exception ; 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 username, String password) throws Exception ; 71 } | Popular Tags |