@Override
public List<Addressbook> allAddressbooks () {
+ // Is the user logged in?
+ if (!this.loginController.isUserLoggedIn()) {
+ // Not logged in
+ throw new FaceletException("This method can only be called as logged-in user."); //NOI18N
+ }
+
return Collections.unmodifiableList(this.addressbookList);
}
@Override
public List<AddressbookEntry> allEntries (final Addressbook addressbook) {
+ // Is the user logged in?
+ if (!this.loginController.isUserLoggedIn()) {
+ // Not logged in
+ throw new FaceletException("This method can only be called as logged-in user."); //NOI18N
+ }
+
// Ask the bean
return this.addressbookBean.allEntries(addressbook);
}