Class PasswordChangeRecord
java.lang.Object
uk.ac.manchester.spinnaker.alloc.model.PasswordChangeRecord
Describes basic information about a user that they'd use to change their
password.
- Author:
- Donal Fellows
-
Constructor Summary
ConstructorsConstructorDescriptionMake an instance.PasswordChangeRecord(int userId, String username) Make an instance. -
Method Summary
Modifier and TypeMethodDescriptionfinal intfinal String@AssertTrue(message="second copy of new password must be same as first") boolean@AssertFalse(message="old and new passwords must be different") booleanvoidsetNewPassword(String newPassword) voidsetNewPassword2(String newPassword2) voidsetOldPassword(String password) voidsetUserId(int userId) voidsetUsername(String username)
-
Constructor Details
-
PasswordChangeRecord
public PasswordChangeRecord()Make an instance. -
PasswordChangeRecord
Make an instance.- Parameters:
userId- The user ID.username- The user name.
-
-
Method Details
-
getUserId
public final int getUserId()- Returns:
- the user id
-
setUserId
public void setUserId(int userId) - Parameters:
userId- the user id
-
getUsername
- Returns:
- the username
-
setUsername
- Parameters:
username- the username
-
getOldPassword
-
setOldPassword
- Parameters:
password- the old password
-
getNewPassword
-
setNewPassword
- Parameters:
newPassword- the first copy of the new password
-
getNewPassword2
-
setNewPassword2
- Parameters:
newPassword2- the second copy of the new password
-
isNewPasswordSameAsOld
@AssertFalse(message="old and new passwords must be different") public @AssertFalse(message="old and new passwords must be different") boolean isNewPasswordSameAsOld()- Returns:
- whether the password is being changed at all
-
isNewPasswordMatched
@AssertTrue(message="second copy of new password must be same as first") public @AssertTrue(message="second copy of new password must be same as first") boolean isNewPasswordMatched()- Returns:
- whether the two copies of the new password are the same
-