1 18 19 package cowsultants.itracker.ejb.client.interfaces; 20 21 import java.util.HashMap ; 22 import javax.ejb.EJBLocalObject ; 23 24 import cowsultants.itracker.ejb.client.exceptions.*; 25 import cowsultants.itracker.ejb.client.models.*; 26 27 public interface UserHandler extends EJBLocalObject { 28 public static final String JNDI_NAME = "ejb/UserHandler"; 29 30 public UserModel getUser(Integer userId); 31 public UserModel getUserByLogin(String login); 32 public String getUserPasswordByLogin(String login); 33 public UserModel[] getAllUsers(); 34 public int getNumberUsers(); 35 public UserModel[] getActiveUsers(); 36 public UserModel[] getSuperUsers(); 37 public UserPreferencesModel getUserPreferencesByUserId(Integer userId); 38 39 public UserModel[] getPossibleOwners(IssueModel issue, Integer projectId, Integer userId); 40 41 public UserModel createUser(UserModel model) throws UserException; 42 public UserModel updateUser(UserModel model) throws UserException; 43 public String generateUserPassword(UserModel model) throws PasswordException; 44 public boolean deleteUser(UserModel model); 45 46 public UserPreferencesModel updateUserPreferences(UserPreferencesModel model) throws UserException; 47 48 public boolean setUserStatus(Integer userId, int status); 49 public boolean clearOwnedProjects(Integer userId); 50 51 59 public UserModel[] getUsersWithPermissionLocal(PermissionModel permission); 60 68 public PermissionModel[] getUserPermissionsLocal(UserModel user); 69 70 79 public boolean addUserPermissions(Integer userId, PermissionModel[] newPermissions); 80 91 public boolean setUserPermissions(Integer userId, PermissionModel[] newPermissions); 92 93 98 public PermissionModel[] getPermissionsByUserId(Integer userId); 99 111 public HashMap getUserPermissions(UserModel model, int reqSource); 112 121 public UserModel[] getUsersWithProjectPermission(Integer projectId, int permission); 122 132 public UserModel[] getUsersWithProjectPermission(Integer projectId, int permission, boolean activeOnly); 133 143 public UserModel[] getUsersWithProjectPermission(Integer projectId, int[] permissions, boolean requireAll, boolean activeOnly); 144 153 public UserModel[] getUsersWithAnyProjectPermission(Integer projectId, int[] permissions); 154 164 public UserModel[] getUsersWithAnyProjectPermission(Integer projectId, int[] permissions, boolean activeOnly); 165 166 175 public UserModel checkLogin(String login, Object authentication, int authType, int reqSource) throws AuthenticatorException; 176 177 186 public boolean allowRegistration(UserModel user, Object authentication, int authType, int reqSource) throws AuthenticatorException; 187 188 200 public boolean allowProfileCreation(UserModel user, Object authentication, int authType, int reqSource) throws AuthenticatorException; 201 202 212 public boolean allowProfileUpdates(UserModel user, Object authentication, int authType, int reqSource) throws AuthenticatorException; 213 214 223 public boolean allowPasswordUpdates(UserModel user, Object authentication, int authType, int reqSource) throws AuthenticatorException; 224 225 235 public boolean allowPermissionUpdates(UserModel user, Object authentication, int authType, int reqSource) throws AuthenticatorException; 236 237 247 public boolean allowPreferenceUpdates(UserModel user, Object authentication, int authType, int reqSource) throws AuthenticatorException; 248 249 public void sendNotification(String login, String email, String baseURL); 250 } | Popular Tags |