- java.lang.Object
-
- services.UserService
-
- All Implemented Interfaces:
IUserService
public class UserService extends java.lang.Object implements IUserService
TheUserServiceclass implements theIUserServiceinterface and provides functionality related to user management, such as changing passwords.
-
-
Constructor Summary
Constructors Constructor Description UserService()Constructs an instance of theUserServiceclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanchangePassword(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 theUserServiceclass.
-
-
Method Detail
-
changePassword
public boolean changePassword(java.lang.String oldPassword, java.lang.String newPassword)Description copied from interface:IUserServiceChanges the password of a user if the provided old password matches the current password.- Specified by:
changePasswordin 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
-
-