From: Roland Haeder Date: Wed, 14 Oct 2015 12:14:34 +0000 (+0200) Subject: added method allPublicUsers(). This can be called from public pages, too. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1438b097e6741d09569509ce0202ea2960a1c5fe;p=addressbook-war.git added method allPublicUsers(). This can be called from public pages, too. Signed-off-by:Roland Häder --- diff --git a/src/java/org/mxchange/addressbook/beans/user/UserWebBean.java b/src/java/org/mxchange/addressbook/beans/user/UserWebBean.java index 650d6540..64846978 100644 --- a/src/java/org/mxchange/addressbook/beans/user/UserWebBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/UserWebBean.java @@ -17,6 +17,7 @@ package org.mxchange.addressbook.beans.user; import java.text.MessageFormat; +import java.util.Collections; import java.util.Date; import java.util.GregorianCalendar; import java.util.List; @@ -241,6 +242,12 @@ public class UserWebBean implements UserWebController { this.emailAddressList.add(user.getUserContact().getContactEmailAddress()); } + @Override + public List allPublicUsers () { + // Return it + return Collections.unmodifiableList(this.publicUserList); + } + @Override public void clearData () { // Clear all data diff --git a/src/java/org/mxchange/addressbook/beans/user/UserWebController.java b/src/java/org/mxchange/addressbook/beans/user/UserWebController.java index 91f6ec10..e1e153c4 100644 --- a/src/java/org/mxchange/addressbook/beans/user/UserWebController.java +++ b/src/java/org/mxchange/addressbook/beans/user/UserWebController.java @@ -18,6 +18,7 @@ package org.mxchange.addressbook.beans.user; import java.io.Serializable; import java.util.Date; +import java.util.List; import org.mxchange.jcontacts.contact.gender.Gender; import org.mxchange.jcountry.data.Country; import org.mxchange.jphone.phonenumbers.smsprovider.SmsProvider; @@ -39,6 +40,13 @@ public interface UserWebController extends Serializable { */ public void addUserNameEmailAddress (final User user); + /** + * All public user profiles + *

+ * @return A list of all public user profiles + */ + public List allPublicUsers (); + /** * Clears all data in this bean */