From 9c643626be2b8e2a6c0ffb6d20c98eaf51ba782e Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 5 Mar 2016 16:42:33 +0100 Subject: [PATCH] introduced isRequiredChangePersonalDataSet() --- .../jjobs/beans/user/UserWebSessionBean.java | 14 +++++++++++++- .../jjobs/beans/user/UserWebSessionController.java | 7 +++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/java/org/mxchange/jjobs/beans/user/UserWebSessionBean.java b/src/java/org/mxchange/jjobs/beans/user/UserWebSessionBean.java index bee8b1df..e9990f63 100644 --- a/src/java/org/mxchange/jjobs/beans/user/UserWebSessionBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/UserWebSessionBean.java @@ -244,7 +244,7 @@ public class UserWebSessionBean implements UserWebSessionController { 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()) { @@ -744,6 +744,18 @@ public class UserWebSessionBean implements UserWebSessionController { (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())); diff --git a/src/java/org/mxchange/jjobs/beans/user/UserWebSessionController.java b/src/java/org/mxchange/jjobs/beans/user/UserWebSessionController.java index d9553011..9d8c2866 100644 --- a/src/java/org/mxchange/jjobs/beans/user/UserWebSessionController.java +++ b/src/java/org/mxchange/jjobs/beans/user/UserWebSessionController.java @@ -442,6 +442,13 @@ public interface UserWebSessionController extends Serializable { */ boolean isRequiredPersonalDataSet (); + /** + * Checks whether all required personal data is set for changing them + *

+ * @return Whether the required personal data is set + */ + boolean isRequiredChangePersonalDataSet (); + /** * Checks whether same email addresses have been entered *

-- 2.39.5