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 SummaryConstructorsConstructorDescriptionMake an instance.PasswordChangeRecord(int userId, String username) Make an instance.
- 
Method SummaryModifier and TypeMethodDescription@NotBlank(message="new password must be supplied") String@NotBlank(message="second copy of new password must be supplied") String@NotBlank(message="old password must be supplied") Stringfinal intfinal String@jakarta.validation.constraints.AssertTrue(message="second copy of new password must be same as first") boolean@jakarta.validation.constraints.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- 
PasswordChangeRecordpublic PasswordChangeRecord()Make an instance.
- 
PasswordChangeRecordMake an instance.- Parameters:
- userId- The user ID.
- username- The user name.
 
 
- 
- 
Method Details- 
getUserIdpublic final int getUserId()- Returns:
- the user id
 
- 
setUserIdpublic void setUserId(int userId) - Parameters:
- userId- the user id
 
- 
getUsername- Returns:
- the username
 
- 
setUsername- Parameters:
- username- the username
 
- 
getOldPassword@NotBlank(message="old password must be supplied") public @NotBlank(message="old password must be supplied") String getOldPassword()- Returns:
- the old password
 
- 
setOldPassword- Parameters:
- password- the old password
 
- 
getNewPassword@NotBlank(message="new password must be supplied") public @NotBlank(message="new password must be supplied") String getNewPassword()- Returns:
- the first copy of the new password
 
- 
setNewPassword- Parameters:
- newPassword- the first copy of the new password
 
- 
getNewPassword2@NotBlank(message="second copy of new password must be supplied") public @NotBlank(message="second copy of new password must be supplied") String getNewPassword2()- Returns:
- the second copy of the new password
 
- 
setNewPassword2- Parameters:
- newPassword2- the second copy of the new password
 
- 
isNewPasswordSameAsOld@AssertFalse(message="old and new passwords must be different") public @jakarta.validation.constraints.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 @jakarta.validation.constraints.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
 
 
-