]> git.mxchange.org Git - jjobs-war.git/commitdiff
introduced isRequiredChangePersonalDataSet()
authorRoland Haeder <roland@mxchange.org>
Sat, 5 Mar 2016 15:42:33 +0000 (16:42 +0100)
committerRoland Haeder <roland@mxchange.org>
Sat, 5 Mar 2016 15:42:33 +0000 (16:42 +0100)
src/java/org/mxchange/jjobs/beans/user/UserWebSessionBean.java
src/java/org/mxchange/jjobs/beans/user/UserWebSessionController.java

index bee8b1df805ed69670a316194b0bd00f4390c5dc..e9990f63683e2a4f0169867661fd56371879b477 100644 (file)
@@ -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()));
index d95530113c31eb9f15ca8a07408a6bcbf64ab497..9d8c2866285d134f3767f3e68551eaac386e6eff 100644 (file)
@@ -442,6 +442,13 @@ public interface UserWebSessionController extends Serializable {
         */
        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>