if (!this.loginController.isUserLoggedIn()) {
// Not logged-in
throw new IllegalStateException("User is not logged-in"); //NOI18N
- } else if (!this.isRequiredPersonalDataSet()) {
+ } else if (!this.isRequiredChangePersonalDataSet()) {
// Not all required fields are set
throw new FaceletException("Not all required fields are set."); //NOI18N
} else if (!this.loginController.ifCurrentPasswordMatches()) {
(this.getUserPasswordRepeat() != null));
}
+ @Override
+ public boolean isRequiredChangePersonalDataSet () {
+ return ((this.getUserProfileMode() != null) &&
+ (this.getGender() != null) &&
+ (this.getFirstName() != null) &&
+ (this.getFamilyName() != null) &&
+ (this.getStreet() != null) &&
+ (this.getHouseNumber() != null) &&
+ (this.getZipCode() != null) &&
+ (this.getCity() != null));
+ }
+
@Override
public boolean isSameEmailAddressEntered () {
return (Objects.equals(this.getEmailAddress(), this.getEmailAddressRepeat()));
*/
boolean isRequiredPersonalDataSet ();
+ /**
+ * Checks whether all required personal data is set for changing them
+ * <p>
+ * @return Whether the required personal data is set
+ */
+ boolean isRequiredChangePersonalDataSet ();
+
/**
* Checks whether same email addresses have been entered
* <p>