- java.lang.Object
-
- services.UserService
-
- All Implemented Interfaces:
IUserService
public class UserService extends java.lang.Object implements IUserService
TheUserService
class implements theIUserService
interface and provides functionality related to user management, such as changing passwords.
-
-
Constructor Summary
Constructors Constructor Description UserService()
Constructs an instance of theUserService
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
changePassword(java.lang.String oldPassword, java.lang.String newPassword)
Changes the password of a user if the provided old password matches the current password.
-
-
-
Constructor Detail
-
UserService
public UserService()
Constructs an instance of theUserService
class.
-
-
Method Detail
-
changePassword
public boolean changePassword(java.lang.String oldPassword, java.lang.String newPassword)
Description copied from interface:IUserService
Changes the password of a user if the provided old password matches the current password.- Specified by:
changePassword
in interfaceIUserService
- Parameters:
oldPassword
- the current password of the usernewPassword
- the new password the user wants to set- Returns:
- true if the password was changed successfully, false otherwise
-
-