1 25 26 package org.nemesis.forum; 27 28 import java.util.Iterator ; 29 30 import org.nemesis.forum.exception.GroupAlreadyExistsException; 31 import org.nemesis.forum.exception.GroupNotFoundException; 32 import org.nemesis.forum.exception.UnauthorizedException; 33 import org.nemesis.forum.exception.UserAlreadyExistsException; 34 import org.nemesis.forum.exception.UserNotFoundException; 35 36 39 public interface ProfileManager { 40 41 52 public User createUser(String username, String password, String email) 53 throws UserAlreadyExistsException; 54 55 64 public Group createGroup(String name) throws UnauthorizedException, 65 GroupAlreadyExistsException; 66 67 74 public User getUser(int userID) throws UserNotFoundException; 75 76 81 public User getUser(String username) throws UserNotFoundException; 82 83 86 public User getAnonymousUser(); 87 88 96 public User getSpecialUser(); 97 98 103 public Group getGroup(int groupID) throws GroupNotFoundException; 104 105 110 public Group getGroup(String name) throws GroupNotFoundException; 111 112 118 public void deleteUser(User user) throws UnauthorizedException; 119 120 126 public void deleteGroup(Group group) throws UnauthorizedException; 127 128 131 public int getUserCount(); 132 133 136 public int getGroupCount(); 137 138 141 public Iterator users(); 142 143 155 public Iterator users(int startIndex, int numResults); 156 157 162 public Iterator groups(); 163 164 176 public Iterator groups(int startIndex, int numResults); 177 178 185 public int userMessageCount(User user, Forum forum); 186 187 191 public Iterator userMessages(User user, Forum forum); 192 } 193 | Popular Tags |