|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.itracker.services.implementations.UserServiceImpl
public class UserServiceImpl
Implements the UserService interface. See that interface for method descriptions.
UserService| Constructor Summary | |
|---|---|
UserServiceImpl(ConfigurationService configurationService,
ProjectService projectService,
UserDAO userDAO,
PermissionDAO permissionDAO,
UserPreferencesDAO userPreferencesDAO)
|
|
UserServiceImpl(ConfigurationService configurationService,
ProjectService projectService,
UserDAO userDAO,
ProjectDAO projectDAO,
ReportDAO reportDAO,
PermissionDAO permissionDAO,
UserPreferencesDAO userPreferencesDAO)
Deprecated. use constructor without projectDA= und reportDAO instead |
|
| Method Summary | |
|---|---|
boolean |
addUserPermissions(Integer userId,
List<Permission> newPermissions)
Resets all of the permissions for a user in the database. |
boolean |
allowPasswordUpdates(User user,
Object authentication,
int authType,
int reqSource)
This method checks to see if the given user's password can be updated locally. |
boolean |
allowPermissionUpdates(User user,
Object authentication,
int authType,
int reqSource)
This method checks to see if the given user's permission information can be updated locally. |
boolean |
allowPreferenceUpdates(User user,
Object authentication,
int authType,
int reqSource)
This method checks to see if the given user's preference information can be updated locally. |
boolean |
allowProfileCreation(User user,
Object authentication,
int authType,
int reqSource)
This method checks to see if a new user profile can be created within ITracker |
boolean |
allowProfileUpdates(User user,
Object authentication,
int authType,
int reqSource)
This method checks to see if the given user's core user profile information can be updated locally. |
boolean |
allowRegistration(User user,
Object authentication,
int authType,
int reqSource)
This method checks to see if the given user is allowed to self register. |
User |
checkLogin(String login,
Object authentication,
int authType,
int reqSource)
This method checks the login of a user, and returns the user if authentication was successful. |
void |
clearOwnedProjects(User user)
|
User |
createUser(User user)
|
List<User> |
findUsersForProjectByPermissionTypeList(Integer projectID,
Integer[] permissionTypes)
|
String |
generateUserPassword(User user)
|
List<User> |
getActiveUsers()
|
List<User> |
getAllUsers()
|
int |
getNumberUsers()
|
List<Permission> |
getPermissionsByUserId(Integer userId)
Returns an array of Permission objects for the requested userId. |
List<User> |
getPossibleOwners(Issue issue,
Integer projectId,
Integer userId)
|
List<User> |
getSuperUsers()
|
User |
getUser(Integer userId)
|
User |
getUserByLogin(String login)
|
String |
getUserPasswordByLogin(String login)
|
List<Permission> |
getUserPermissionsLocal(User user)
This method will call local EJBs to find all permissions for a user. |
Map<Integer,Set<PermissionType>> |
getUsersMapOfProjectIdsAndSetOfPermissionTypes(User user,
int reqSource)
Deprecated. |
List<User> |
getUsersWithAnyProjectPermission(Integer projectId,
int[] permissionTypes)
This method will return a list of users with any of the supplied permission, either explicitly, or by their role as a super user. |
List<User> |
getUsersWithAnyProjectPermission(Integer projectId,
int[] permissionTypes,
boolean activeOnly)
This method will return a list of users with any of the supplied permission, either explicitly, or by their role as a super user. |
Collection<User> |
getUsersWithAnyProjectPermission(Integer projectId,
Integer[] permissionTypes)
This method will return a list of users with any of the supplied permission, either explicitly, or by their role as a super user. |
List<User> |
getUsersWithPermissionLocal(Integer projectId,
int permissionType)
This method will call local EJBs to find users with a specific permission. |
List<User> |
getUsersWithProjectPermission(Integer projectId,
int permissionType)
This method will return a list of users with a specific permission, either explicitly, or by their role as a super user. |
List<User> |
getUsersWithProjectPermission(Integer projectId,
int[] permissionTypes,
boolean requireAll,
boolean activeOnly)
This method will return a list of users with the supplied permission, either explicitly, or by their role as a super user. |
List<User> |
getUsersWithProjectPermission(Integer projectId,
int permissionType,
boolean activeOnly)
This method will return a list of users with a specific permission, either explicitly, or by their role as a super user. |
boolean |
removeUserPermissions(Integer userId,
List<Permission> newPermissions)
Resets all of the permissions for a user in the database. |
boolean |
setUserPermissions(Integer userId,
List<Permission> newPermissions)
Resets all of the permissions for a user in the database. |
boolean |
updateAuthenticator(Integer userId,
List<Permission> permissions)
Adds an additional set of permissions to a user in the database. |
User |
updateUser(User user)
|
UserPreferences |
updateUserPreferences(UserPreferences userPrefs)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UserServiceImpl(ConfigurationService configurationService,
ProjectService projectService,
UserDAO userDAO,
PermissionDAO permissionDAO,
UserPreferencesDAO userPreferencesDAO)
configurationService - projectService - userDAO - permissionDAO - userPreferencesDAO -
public UserServiceImpl(ConfigurationService configurationService,
ProjectService projectService,
UserDAO userDAO,
ProjectDAO projectDAO,
ReportDAO reportDAO,
PermissionDAO permissionDAO,
UserPreferencesDAO userPreferencesDAO)
configurationService - projectService - userDAO - projectDAO - reportDAO - permissionDAO - userPreferencesDAO - | Method Detail |
|---|
public User getUser(Integer userId)
getUser in interface UserService
public User getUserByLogin(String login)
throws NoSuchEntityException
getUserByLogin in interface UserServiceNoSuchEntityExceptionpublic String getUserPasswordByLogin(String login)
getUserPasswordByLogin in interface UserServicepublic List<User> getAllUsers()
getAllUsers in interface UserServicepublic int getNumberUsers()
getNumberUsers in interface UserServicepublic List<User> getActiveUsers()
getActiveUsers in interface UserServicepublic List<User> getSuperUsers()
getSuperUsers in interface UserService
public User createUser(User user)
throws UserException
createUser in interface UserServiceUserException
public User updateUser(User user)
throws UserException
updateUser in interface UserServiceUserException
public String generateUserPassword(User user)
throws PasswordException
generateUserPassword in interface UserServicePasswordException
public UserPreferences updateUserPreferences(UserPreferences userPrefs)
throws UserException
updateUserPreferences in interface UserServiceUserExceptionpublic void clearOwnedProjects(User user)
clearOwnedProjects in interface UserService
public List<User> findUsersForProjectByPermissionTypeList(Integer projectID,
Integer[] permissionTypes)
findUsersForProjectByPermissionTypeList in interface UserService
public List<User> getUsersWithPermissionLocal(Integer projectId,
int permissionType)
UserService
getUsersWithPermissionLocal in interface UserServiceprojectId - id of the project on which the returned users have permissionspermissionType - the type of permission to search for
public List<Permission> getUserPermissionsLocal(User user)
UserService
getUserPermissionsLocal in interface UserServiceuser - the user to find the permissions for
public List<Permission> getPermissionsByUserId(Integer userId)
UserService
getPermissionsByUserId in interface UserServiceuserId - the userId, not the login, to find the permissions of
public boolean updateAuthenticator(Integer userId,
List<Permission> permissions)
UserService
updateAuthenticator in interface UserServiceuserId - the userId, not login, of the user to add the permissions topermissions - an array of PermissionModels that represent the new permissions to add to the user
public boolean addUserPermissions(Integer userId,
List<Permission> newPermissions)
UserService
addUserPermissions in interface UserServiceuserId - the userId, not login, of the user to add the permissions tonewPermissions - a HashMap containing keys and Permission values as described in the method description.
UserUtilities
public boolean setUserPermissions(Integer userId,
List<Permission> newPermissions)
UserService
setUserPermissions in interface UserServiceuserId - - id of update-usernewPermissions - - set of new permissions for this user
UserUtilities
public boolean removeUserPermissions(Integer userId,
List<Permission> newPermissions)
UserService
removeUserPermissions in interface UserServiceuserId - the userId, not login, of the user to add the permissions tonewPermissions - a HashMap containing keys and Permission values as described in the method description.
UserUtilities
@Deprecated
public Map<Integer,Set<PermissionType>> getUsersMapOfProjectIdsAndSetOfPermissionTypes(User user,
int reqSource)
UserService
getUsersMapOfProjectIdsAndSetOfPermissionTypes in interface UserServicereqSource - the source of the request
UserUtilities.hasPermission(java.util.Map>, int)
public List<User> getUsersWithProjectPermission(Integer projectId,
int permissionType)
UserService
getUsersWithProjectPermission in interface UserServiceprojectId - the project to find the permission forpermissionType - the permission to check for
public List<User> getUsersWithProjectPermission(Integer projectId,
int permissionType,
boolean activeOnly)
UserService
getUsersWithProjectPermission in interface UserServiceprojectId - the project to find the permission forpermissionType - the permission to check foractiveOnly - only include users who are currently active
public List<User> getUsersWithAnyProjectPermission(Integer projectId,
int[] permissionTypes)
UserService
getUsersWithAnyProjectPermission in interface UserServiceprojectId - the project to find the permission forpermissionTypes - the permissions that are checked against
public Collection<User> getUsersWithAnyProjectPermission(Integer projectId,
Integer[] permissionTypes)
UserService
getUsersWithAnyProjectPermission in interface UserServiceprojectId - the project to find the permission for
public List<User> getUsersWithAnyProjectPermission(Integer projectId,
int[] permissionTypes,
boolean activeOnly)
UserService
getUsersWithAnyProjectPermission in interface UserServiceprojectId - the project to find the permission forpermissionTypes - the permissions that are checked againstactiveOnly - only include users who are currently active
public List<User> getUsersWithProjectPermission(Integer projectId,
int[] permissionTypes,
boolean requireAll,
boolean activeOnly)
UserService
getUsersWithProjectPermission in interface UserServiceprojectId - the project to find the permission forpermissionTypes - the permissions that are checked againstrequireAll - true if all the permissions in the array are required, false if only one is requiredactiveOnly - only include users who are currently active
public List<User> getPossibleOwners(Issue issue,
Integer projectId,
Integer userId)
getPossibleOwners in interface UserService
public User checkLogin(String login,
Object authentication,
int authType,
int reqSource)
throws AuthenticatorException
UserService
checkLogin in interface UserServicelogin - the login the user/client providedauthentication - the user's authentication information, if knownauthType - the type of authentication information being providedreqSource - the source from which the request was made (eg web, api)
AuthenticatorException - an exception if the login is unsuccessful, or an error occurs
public boolean allowRegistration(User user,
Object authentication,
int authType,
int reqSource)
throws AuthenticatorException
UserService
allowRegistration in interface UserServiceuser - a User object that contains the data the user submittedauthentication - the user's authentication information, if knownauthType - the type of authentication information being providedreqSource - the source from which the request was made (eg web, api)
AuthenticatorException - an exception if an error occurs
public boolean allowProfileCreation(User user,
Object authentication,
int authType,
int reqSource)
throws AuthenticatorException
UserService
allowProfileCreation in interface UserServiceuser - a User object that contains the data for the new user. If null,
then the request is being made for an unknown future user. For example,
the system may request this with an null user if it needs to know if the system
should even present the option to create a new userauthentication - the user's authentication information, if knownauthType - the type of authentication information being providedreqSource - the source from which the request was made (eg web, api)
AuthenticatorException - an exception if an error occurs
public boolean allowProfileUpdates(User user,
Object authentication,
int authType,
int reqSource)
throws AuthenticatorException
UserService
allowProfileUpdates in interface UserServiceuser - a User object that contains the data the user submittedauthentication - the user's authentication information, if knownauthType - the type of authentication information being providedreqSource - the source from which the request was made (eg web, api)
AuthenticatorException - an exception if an error occurs
public boolean allowPasswordUpdates(User user,
Object authentication,
int authType,
int reqSource)
throws AuthenticatorException
UserService
allowPasswordUpdates in interface UserServiceuser - a User object that contains the data the user submittedauthentication - the user's authentication information, if knownauthType - the type of authentication information being providedreqSource - the source from which the request was made (eg web, api)
AuthenticatorException - an exception if an error occurs
public boolean allowPermissionUpdates(User user,
Object authentication,
int authType,
int reqSource)
throws AuthenticatorException
UserService
allowPermissionUpdates in interface UserServiceuser - a User object that contains the data the user submittedauthentication - the user's authentication information, if knownauthType - the type of authentication information being providedreqSource - the source from which the request was made (eg web, api)
AuthenticatorException - an exception if an error occurs
public boolean allowPreferenceUpdates(User user,
Object authentication,
int authType,
int reqSource)
throws AuthenticatorException
UserService
allowPreferenceUpdates in interface UserServiceuser - a User object that contains the data the user submittedauthentication - the user's authentication information, if knownauthType - the type of authentication information being providedreqSource - the source from which the request was made (eg web, api)
AuthenticatorException - an exception if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||