1 11 12 package org.jivesoftware.messenger.group; 13 14 import org.jivesoftware.messenger.user.User; 15 16 import java.util.Collection ; 17 18 33 public interface GroupProvider { 34 35 48 Group createGroup(String name) throws UnsupportedOperationException , 49 GroupAlreadyExistsException; 50 51 58 void deleteGroup(String name) throws UnsupportedOperationException ; 59 60 67 Group getGroup(String name) throws GroupNotFoundException; 68 69 79 void setName(String oldName, String newName) throws UnsupportedOperationException , 80 GroupAlreadyExistsException; 81 82 89 void setDescription(String name, String description) 90 throws GroupNotFoundException; 91 92 97 int getGroupCount(); 98 99 104 Collection <Group> getGroups(); 105 106 113 Collection <Group> getGroups(int startIndex, int numResults); 114 115 121 Collection <Group> getGroups(User user); 122 123 132 void addMember(String groupName, String username, boolean administrator) 133 throws UnsupportedOperationException ; 134 135 144 void updateMember(String groupName, String username, boolean administrator) 145 throws UnsupportedOperationException ; 146 147 155 void deleteMember(String groupName, String username) throws UnsupportedOperationException ; 156 157 163 public boolean isReadOnly(); 164 } | Popular Tags |