UserService, org.springframework.security.core.userdetails.UserDetailsServicepublic class UserServiceImpl extends Object implements UserService
UserService| Constructor | Description |
|---|---|
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
|
| Modifier and Type | Method | Description |
|---|---|---|
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,
PermissionType[] permissionTypes) |
Finds all users assigned to a project having all of the given 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[] permissions) |
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) |
|
List<User> |
getUsersWithAnyProjectPermission(Integer projectId,
PermissionType[] 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,
PermissionType[] permissions,
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.
|
List<User> |
getUsersWithPermissionLocal(Integer projectId,
int permissionType) |
|
List<User> |
getUsersWithPermissionLocal(Integer projectId,
PermissionType permissionType) |
This method will call local EJBs to find users with a specific permission.
|
List<User> |
getUsersWithProjectPermission(Integer projectId,
int permissionType) |
|
List<User> |
getUsersWithProjectPermission(Integer projectId,
int[] permissionTypes,
boolean requireAll,
boolean activeOnly) |
|
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.
|
List<User> |
getUsersWithProjectPermission(Integer projectId,
PermissionType permission) |
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,
PermissionType[] 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,
PermissionType permissionType,
boolean activeOnly) |
|
org.springframework.security.core.userdetails.UserDetails |
loadUserByUsername(String username) |
|
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) |
public UserServiceImpl(ConfigurationService configurationService, ProjectService projectService, UserDAO userDAO, PermissionDAO permissionDAO, UserPreferencesDAO userPreferencesDAO)
public UserServiceImpl(ConfigurationService configurationService, ProjectService projectService, UserDAO userDAO, ProjectDAO projectDAO, ReportDAO reportDAO, PermissionDAO permissionDAO, UserPreferencesDAO userPreferencesDAO)
public User getUser(Integer userId)
getUser in interface UserServicepublic User getUserByLogin(String login) throws NoSuchEntityException
getUserByLogin in interface UserServiceNoSuchEntityExceptionpublic org.springframework.security.core.userdetails.UserDetails loadUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException
loadUserByUsername in interface org.springframework.security.core.userdetails.UserDetailsServiceorg.springframework.security.core.userdetails.UsernameNotFoundExceptionpublic 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 UserServicepublic User createUser(User user) throws UserException
createUser in interface UserServiceUserExceptionpublic User updateUser(User user) throws UserException
updateUser in interface UserServiceUserExceptionpublic String generateUserPassword(User user) throws PasswordException
generateUserPassword in interface UserServicePasswordExceptionpublic UserPreferences updateUserPreferences(UserPreferences userPrefs) throws UserException
updateUserPreferences in interface UserServiceUserExceptionpublic void clearOwnedProjects(User user)
clearOwnedProjects in interface UserServicepublic List<User> findUsersForProjectByPermissionTypeList(Integer projectID, PermissionType[] permissionTypes)
UserServicefindUsersForProjectByPermissionTypeList in interface UserServiceprojectID - the project IDpermissionTypes - array of permission typespublic List<User> getUsersWithPermissionLocal(Integer projectId, PermissionType permissionType)
UserServicegetUsersWithPermissionLocal in interface UserServiceprojectId - id of the project on which the returned users have permissionspermissionType - the type of permission to search forpublic List<User> getUsersWithPermissionLocal(Integer projectId, int permissionType)
getUsersWithPermissionLocal in interface UserServicepublic List<Permission> getUserPermissionsLocal(User user)
UserServicegetUserPermissionsLocal in interface UserServiceuser - the user to find the permissions forpublic List<Permission> getPermissionsByUserId(Integer userId)
UserServicegetPermissionsByUserId in interface UserServiceuserId - the userId, not the login, to find the permissions ofpublic boolean updateAuthenticator(Integer userId, List<Permission> permissions)
UserServiceupdateAuthenticator 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 userpublic boolean addUserPermissions(Integer userId, List<Permission> newPermissions)
UserServiceaddUserPermissions 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.UserUtilitiespublic boolean setUserPermissions(Integer userId, List<Permission> newPermissions)
UserServicesetUserPermissions in interface UserServiceuserId - - id of update-usernewPermissions - - set of new permissions for this userUserUtilitiespublic boolean removeUserPermissions(Integer userId, List<Permission> newPermissions)
UserServiceremoveUserPermissions 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)
UserServicegetUsersMapOfProjectIdsAndSetOfPermissionTypes in interface UserServiceuser - a User representing the user that the permissions should be obtained forreqSource - the source of the requestUserUtilities.hasPermission(java.util.Map<java.lang.Integer, java.util.Set<org.itracker.model.PermissionType>>, int)public List<User> getUsersWithProjectPermission(Integer projectId, PermissionType permission)
UserServicegetUsersWithProjectPermission in interface UserServiceprojectId - the project to find the permission forpermission - the permission to check forpublic List<User> getUsersWithProjectPermission(Integer projectId, int permissionType)
getUsersWithProjectPermission in interface UserServicepublic List<User> getUsersWithProjectPermission(Integer projectId, int permissionType, boolean activeOnly)
UserServicegetUsersWithProjectPermission in interface UserServiceprojectId - the project to find the permission forpermissionType - the permission to check foractiveOnly - only include users who are currently activepublic List<User> getUsersWithProjectPermission(Integer projectId, PermissionType permissionType, boolean activeOnly)
getUsersWithProjectPermission in interface UserServicepublic List<User> getUsersWithAnyProjectPermission(Integer projectId, int[] permissions)
UserServicegetUsersWithAnyProjectPermission in interface UserServiceprojectId - the project to find the permission forpermissions - the permissions that are checked againstpublic List<User> getUsersWithAnyProjectPermission(Integer projectId, PermissionType[] permissions, boolean activeOnly)
UserServicegetUsersWithAnyProjectPermission in interface UserServiceprojectId - the project to find the permission forpermissions - the permissions that are checked againstactiveOnly - only include users who are currently activepublic List<User> getUsersWithAnyProjectPermission(Integer projectId, PermissionType[] permissionTypes)
UserServicegetUsersWithAnyProjectPermission in interface UserServiceprojectId - the project to find the permission forpermissionTypes - the permissions that are checked againstpublic List<User> getUsersWithAnyProjectPermission(Integer projectId, int[] permissionTypes, boolean activeOnly)
getUsersWithAnyProjectPermission in interface UserServicepublic List<User> getUsersWithProjectPermission(Integer projectId, int[] permissionTypes, boolean requireAll, boolean activeOnly)
getUsersWithProjectPermission in interface UserServicepublic List<User> getUsersWithProjectPermission(Integer projectId, PermissionType[] permissionTypes, boolean requireAll, boolean activeOnly)
UserServicegetUsersWithProjectPermission 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 activepublic List<User> getPossibleOwners(Issue issue, Integer projectId, Integer userId)
getPossibleOwners in interface UserServicepublic User checkLogin(String login, Object authentication, int authType, int reqSource) throws AuthenticatorException
UserServicecheckLogin 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 occurspublic boolean allowRegistration(User user, Object authentication, int authType, int reqSource) throws AuthenticatorException
UserServiceallowRegistration 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 occurspublic boolean allowProfileCreation(User user, Object authentication, int authType, int reqSource) throws AuthenticatorException
UserServiceallowProfileCreation 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 occurspublic boolean allowProfileUpdates(User user, Object authentication, int authType, int reqSource) throws AuthenticatorException
UserServiceallowProfileUpdates 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 occurspublic boolean allowPasswordUpdates(User user, Object authentication, int authType, int reqSource) throws AuthenticatorException
UserServiceallowPasswordUpdates 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 occurspublic boolean allowPermissionUpdates(User user, Object authentication, int authType, int reqSource) throws AuthenticatorException
UserServiceallowPermissionUpdates 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 occurspublic boolean allowPreferenceUpdates(User user, Object authentication, int authType, int reqSource) throws AuthenticatorException
UserServiceallowPreferenceUpdates 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 occursCopyright © 2002–2022 itracker. All rights reserved.