Module sc2002_fypms
Package services

Class UserService

  • All Implemented Interfaces:
    IUserService

    public class UserService
    extends java.lang.Object
    implements IUserService
    The UserService class implements the IUserService interface and provides functionality related to user management, such as changing passwords.
    • Constructor Summary

      Constructors 
      Constructor Description
      UserService()
      Constructs an instance of the UserService 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UserService

        public UserService()
        Constructs an instance of the UserService 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 interface IUserService
        Parameters:
        oldPassword - the current password of the user
        newPassword - the new password the user wants to set
        Returns:
        true if the password was changed successfully, false otherwise