Class DefaultUserService
- java.lang.Object
-
- org.apache.archiva.redback.rest.services.DefaultUserService
-
- All Implemented Interfaces:
UserService
@Service("userService#rest") @Deprecated public class DefaultUserService extends Object implements UserService
Deprecated.This version is deprected. Use the V2 version:DefaultUserService
-
-
Constructor Summary
Constructors Constructor Description DefaultUserService(UserManager userManager, SecuritySystem securitySystem, HttpAuthenticator httpAuthenticator)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Boolean
createAdminUser(User adminUser)
Deprecated.will create admin user only if not exists !! if exists will return falseUser
createGuestUser()
Deprecated.Boolean
createUser(User user)
Deprecated.Boolean
deleteUser(String username)
Deprecated.Collection<Operation>
getCurrentUserOperations()
Deprecated.Collection<Permission>
getCurrentUserPermissions()
Deprecated.User
getGuestUser()
Deprecated.User
getUser(String username)
Deprecated.Collection<Operation>
getUserOperations(String userName)
Deprecated.Collection<Permission>
getUserPermissions(String userName)
Deprecated.List<User>
getUsers()
Deprecated.Boolean
isAdminUserExists()
Deprecated.Boolean
lockUser(String username)
Deprecated.Boolean
passwordChangeNotRequired(String username)
Deprecated.Boolean
passwordChangeRequired(String username)
Deprecated.Boolean
ping()
Deprecated.RegistrationKey
registerUser(UserRegistrationRequest userRegistrationRequest)
Deprecated.if redback is not configured for email validation is required, -1 is returned as keyint
removeFromCache(String userName)
Deprecated.Boolean
resetPassword(ResetPasswordRequest resetPasswordRequest)
Deprecated.Boolean
unlockUser(String username)
Deprecated.Boolean
updateMe(User user)
Deprecated.update only the current user and this fields: fullname, email, password.Boolean
updateUser(User user)
Deprecated.void
validateCredentialsLoose(User user)
Deprecated.void
validateCredentialsStrict(User user)
Deprecated.Boolean
validateUserFromKey(String key)
Deprecated.validate the key and the user with forcing a password change for next login.
-
-
-
Constructor Detail
-
DefaultUserService
@Inject public DefaultUserService(@Named("userManager#default") UserManager userManager, SecuritySystem securitySystem, @Named("httpAuthenticator#basic") HttpAuthenticator httpAuthenticator)
Deprecated.
-
-
Method Detail
-
createUser
public Boolean createUser(User user) throws RedbackServiceException
Deprecated.- Specified by:
createUser
in interfaceUserService
- Throws:
RedbackServiceException
-
deleteUser
public Boolean deleteUser(String username) throws RedbackServiceException
Deprecated.- Specified by:
deleteUser
in interfaceUserService
- Throws:
RedbackServiceException
-
getUser
public User getUser(String username) throws RedbackServiceException
Deprecated.- Specified by:
getUser
in interfaceUserService
- Throws:
RedbackServiceException
-
getUsers
public List<User> getUsers() throws RedbackServiceException
Deprecated.- Specified by:
getUsers
in interfaceUserService
- Throws:
RedbackServiceException
-
updateMe
public Boolean updateMe(User user) throws RedbackServiceException
Deprecated.Description copied from interface:UserService
update only the current user and this fields: fullname, email, password. the service verify the curent logged user with the one passed in the method- Specified by:
updateMe
in interfaceUserService
- Throws:
RedbackServiceException
-
updateUser
public Boolean updateUser(User user) throws RedbackServiceException
Deprecated.- Specified by:
updateUser
in interfaceUserService
- Throws:
RedbackServiceException
-
removeFromCache
public int removeFromCache(String userName) throws RedbackServiceException
Deprecated.- Specified by:
removeFromCache
in interfaceUserService
- Throws:
RedbackServiceException
-
getGuestUser
public User getGuestUser() throws RedbackServiceException
Deprecated.- Specified by:
getGuestUser
in interfaceUserService
- Throws:
RedbackServiceException
-
createGuestUser
public User createGuestUser() throws RedbackServiceException
Deprecated.- Specified by:
createGuestUser
in interfaceUserService
- Throws:
RedbackServiceException
-
ping
public Boolean ping() throws RedbackServiceException
Deprecated.- Specified by:
ping
in interfaceUserService
- Throws:
RedbackServiceException
-
createAdminUser
public Boolean createAdminUser(User adminUser) throws RedbackServiceException
Deprecated.Description copied from interface:UserService
will create admin user only if not exists !! if exists will return false- Specified by:
createAdminUser
in interfaceUserService
- Throws:
RedbackServiceException
-
isAdminUserExists
public Boolean isAdminUserExists() throws RedbackServiceException
Deprecated.- Specified by:
isAdminUserExists
in interfaceUserService
- Throws:
RedbackServiceException
-
resetPassword
public Boolean resetPassword(ResetPasswordRequest resetPasswordRequest) throws RedbackServiceException
Deprecated.- Specified by:
resetPassword
in interfaceUserService
- Parameters:
resetPasswordRequest
- contains username for send a password reset email- Throws:
RedbackServiceException
-
registerUser
public RegistrationKey registerUser(UserRegistrationRequest userRegistrationRequest) throws RedbackServiceException
Deprecated.Description copied from interface:UserService
if redback is not configured for email validation is required, -1 is returned as key- Specified by:
registerUser
in interfaceUserService
- Throws:
RedbackServiceException
-
validateUserFromKey
public Boolean validateUserFromKey(String key) throws RedbackServiceException
Deprecated.Description copied from interface:UserService
validate the key and the user with forcing a password change for next login. http session is created.- Specified by:
validateUserFromKey
in interfaceUserService
- Parameters:
key
- authentication key- Throws:
RedbackServiceException
-
getCurrentUserPermissions
public Collection<Permission> getCurrentUserPermissions() throws RedbackServiceException
Deprecated.- Specified by:
getCurrentUserPermissions
in interfaceUserService
- Returns:
- the current logged user permissions, if no logged user guest permissions are returned
- Throws:
RedbackServiceException
-
getCurrentUserOperations
public Collection<Operation> getCurrentUserOperations() throws RedbackServiceException
Deprecated.- Specified by:
getCurrentUserOperations
in interfaceUserService
- Returns:
- the current logged user operations, if no logged user guest operations are returned
- Throws:
RedbackServiceException
-
getUserOperations
public Collection<Operation> getUserOperations(String userName) throws RedbackServiceException
Deprecated.- Specified by:
getUserOperations
in interfaceUserService
- Throws:
RedbackServiceException
-
getUserPermissions
public Collection<Permission> getUserPermissions(String userName) throws RedbackServiceException
Deprecated.- Specified by:
getUserPermissions
in interfaceUserService
- Throws:
RedbackServiceException
-
validateCredentialsLoose
public void validateCredentialsLoose(User user) throws RedbackServiceException
Deprecated.- Throws:
RedbackServiceException
-
validateCredentialsStrict
public void validateCredentialsStrict(User user) throws RedbackServiceException
Deprecated.- Throws:
RedbackServiceException
-
unlockUser
public Boolean unlockUser(String username) throws RedbackServiceException
Deprecated.- Specified by:
unlockUser
in interfaceUserService
- Throws:
RedbackServiceException
-
lockUser
public Boolean lockUser(String username) throws RedbackServiceException
Deprecated.- Specified by:
lockUser
in interfaceUserService
- Throws:
RedbackServiceException
-
passwordChangeRequired
public Boolean passwordChangeRequired(String username) throws RedbackServiceException
Deprecated.- Specified by:
passwordChangeRequired
in interfaceUserService
- Throws:
RedbackServiceException
-
passwordChangeNotRequired
public Boolean passwordChangeNotRequired(String username) throws RedbackServiceException
Deprecated.- Specified by:
passwordChangeNotRequired
in interfaceUserService
- Throws:
RedbackServiceException
-
-