From 1438b097e6741d09569509ce0202ea2960a1c5fe Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Wed, 14 Oct 2015 14:14:34 +0200 Subject: [PATCH] =?utf8?q?added=20method=20allPublicUsers().=20This=20can?= =?utf8?q?=20be=20called=20from=20public=20pages,=20too.=20Signed-off-by:R?= =?utf8?q?oland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../org/mxchange/addressbook/beans/user/UserWebBean.java | 7 +++++++ .../addressbook/beans/user/UserWebController.java | 8 ++++++++ 2 files changed, 15 insertions(+) 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 */ -- 2.39.5