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?
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 () {
}
*/
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>
* @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);
}