]> git.mxchange.org Git - addressbook-war.git/commitdiff
sorted members
authorRoland Haeder <roland@mxchange.org>
Mon, 15 Feb 2016 19:26:58 +0000 (20:26 +0100)
committerRoland Haeder <roland@mxchange.org>
Mon, 15 Feb 2016 19:27:52 +0000 (20:27 +0100)
src/java/org/mxchange/addressbook/beans/shares/SharesWebSessionBean.java
src/java/org/mxchange/addressbook/beans/shares/SharesWebSessionController.java

index 433a744656bd0468d9bffd0e16a2e8ee5ab1002f..e6329bf466f28545ae56775ed409b9f0b055f2df 100644 (file)
@@ -154,6 +154,21 @@ public class SharesWebSessionBean implements SharesWebSessionController {
                this.sharedAddressbooks.add(event.getShareableAddressbook());
        }
 
+       @Override
+       public void afterLoginEvent (final @Observes UserLoggedInEvent event) {
+               // Is the user logged in?
+               if (null == event) {
+                       // Is null
+                       throw new NullPointerException("event is null"); //NOI18N
+               } else if (event.getUser() == null) {
+                       // user is null
+                       throw new NullPointerException("event.user is null"); //NOI18N
+               }
+
+               // Init share list
+               this.sharedAddressbooks = this.shareBean.allSharedAddressbooks(event.getUser());
+       }
+
        @Override
        public List<ShareableAddressbook> allShares () {
                // Is the user logged in?
@@ -185,21 +200,6 @@ public class SharesWebSessionBean implements SharesWebSessionController {
                this.shareeUserId = shareeUserId;
        }
 
-       @Override
-       public void afterLoginEvent (final @Observes UserLoggedInEvent event) {
-               // Is the user logged in?
-               if (null == event) {
-                       // Is null
-                       throw new NullPointerException("event is null"); //NOI18N
-               } else if (event.getUser() == null) {
-                       // user is null
-                       throw new NullPointerException("event.user is null"); //NOI18N
-               }
-
-               // Init share list
-               this.sharedAddressbooks = this.shareBean.allSharedAddressbooks(event.getUser());
-       }
-
        @PostConstruct
        public void init () {
        }
index 0e9eacdb4e9a1447881be6b2b0e78e79254e1cbd..d2a96f5c6f2b7c0d988bb77097a65953a27c478b 100644 (file)
@@ -45,6 +45,14 @@ public interface SharesWebSessionController extends Serializable {
         */
        void afterAdressbookShareStarted (final AddressbookSharingEvent event);
 
+       /**
+        * This method is called when a user has successfully logged in his/her
+        * account.
+        * <p>
+        * @param event
+        */
+       void afterLoginEvent (final UserLoggedInEvent event);
+
        /**
         * Returns a list of all address books the user is sharing with others.
         * <p>
@@ -110,12 +118,4 @@ public interface SharesWebSessionController extends Serializable {
         * @return Redirect target
         */
        String startSharing (final User user, final Addressbook addressbook);
-
-       /**
-        * This method is called when a user has successfully logged in his/her
-        * account.
-        * <p>
-        * @param event
-        */
-       void afterLoginEvent (final UserLoggedInEvent event);
 }