]> git.mxchange.org Git - jjobs-war.git/commitdiff
Fixed getter calls, the new ones are more descriptive.
authorRoland Haeder <roland@mxchange.org>
Mon, 18 Apr 2016 18:59:42 +0000 (20:59 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 18 Apr 2016 18:59:42 +0000 (20:59 +0200)
src/java/org/mxchange/jjobs/beans/addressbook/JobsAddressbookWebSessionBean.java
src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionBean.java

index 6fa921a46d47bb17c1a7ab210b901daec53e46ea..ea674fd9ad313cf6ea61db3129709cb97490200a 100644 (file)
@@ -202,10 +202,10 @@ public class JobsAddressbookWebSessionBean implements JobsAddressbookWebSessionC
                if (null == event) {
                        // Is null
                        throw new NullPointerException("event is null"); //NOI18N
-               } else if (event.getUser() == null) {
+               } else if (event.getLoggedInUser()== null) {
                        // user is null
                        throw new NullPointerException("event.user is null"); //NOI18N
-               } else if (!event.getUser().equals(this.loginController.getLoggedInUser())) {
+               } else if (!event.getLoggedInUser().equals(this.loginController.getLoggedInUser())) {
                        // Not matching
                        throw new IllegalStateException("event.user and loginController.loggedInUser don't match."); //NOI18N
                } else if (!this.loginController.isUserLoggedIn()) {
index 2b16ef71717274727a56a557bcf9adbcbb2f57fb..b04893e187d3a9dcd1aacbb2e513c5e7ab362897 100644 (file)
@@ -251,19 +251,19 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController {
                if (null == event) {
                        // Throw NPE
                        throw new NullPointerException("event is null"); //NOI18N
-               } else if (event.getUser() == null) {
+               } else if (event.getRegisteredUser()== null) {
                        // Throw NPE again
                        throw new NullPointerException("event.user is null"); //NOI18N
-               } else if (event.getUser().getUserId() == null) {
+               } else if (event.getRegisteredUser().getUserId() == null) {
                        // userId is null
                        throw new NullPointerException("event.user.userId is null"); //NOI18N
-               } else if (event.getUser().getUserId() < 1) {
+               } else if (event.getRegisteredUser().getUserId() < 1) {
                        // Not avalid id
-                       throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getUser(), event.getUser().getUserId())); //NOI18N
+                       throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getRegisteredUser(), event.getRegisteredUser().getUserId())); //NOI18N
                }
 
                // Get user instance
-               User registeredUser = event.getUser();
+               User registeredUser = event.getRegisteredUser();
 
                // Debug message
                System.out.println(MessageFormat.format("UserWebBean:afterRegistration: registeredUser={0}", registeredUser)); //NOI18N
@@ -299,22 +299,22 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController {
                if (null == event) {
                        // Throw NPE
                        throw new NullPointerException("event is null"); //NOI18N
-               } else if (event.getUser() == null) {
+               } else if (event.getLoggedInUser() == null) {
                        // Throw NPE again
                        throw new NullPointerException("event.user is null"); //NOI18N
-               } else if (event.getUser().getUserId() == null) {
+               } else if (event.getLoggedInUser().getUserId() == null) {
                        // userId is null
                        throw new NullPointerException("event.user.userId is null"); //NOI18N
-               } else if (event.getUser().getUserId() < 1) {
+               } else if (event.getLoggedInUser().getUserId() < 1) {
                        // Not avalid id
-                       throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getUser(), event.getUser().getUserId())); //NOI18N
+                       throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getLoggedInUser(), event.getLoggedInUser().getUserId())); //NOI18N
                }
 
                // Re-initialize list
                this.visibleUserList = this.userBean.allMemberPublicVisibleUsers();
 
                // Copy all data to this bean
-               this.copyUser(event.getUser());
+               this.copyUser(event.getLoggedInUser());
 
                // Trace message
                System.out.println(MessageFormat.format("UserWebBean:afterUserLogin: this.visibleUserList.size()={0} - EXIT!", this.visibleUserList.size())); //NOI18N
@@ -335,11 +335,11 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController {
                assert (this.isRequiredPersonalDataSet()) : "not all personal data is set"; //NOI18N
 
                // Create new user instance
-               User user = new LoginUser();
+               User localUser = new LoginUser();
 
                // Update all data ...
-               user.setUserName(this.getUserName());
-               user.setUserProfileMode(this.getUserProfileMode());
+               localUser.setUserName(this.getUserName());
+               localUser.setUserProfileMode(this.getUserProfileMode());
 
                // Generate phone number
                DialableLandLineNumber phone = new LandLineNumber(this.getPhoneCountry(), this.getPhoneAreaCode(), this.getPhoneNumber());
@@ -419,12 +419,13 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController {
                contact.setContactOwnContact(Boolean.TRUE);
 
                // Set contact in user
-               user.setUserContact(contact);
+               localUser.setUserContact(contact);
 
                // Trace message
                //this.getLogger().logTrace(MessageFormat.format("createUserInstance: user={0} - EXIT!", user));
+
                // Return it
-               return user;
+               return localUser;
        }
 
        @Override