From edd253bccdaf7493698014f746e56e7b52e5619c Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Fri, 19 Apr 2013 12:28:14 +0000 Subject: [PATCH] ready for testing git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/share-updates@73672 82a268e6-3cf1-43bd-a215-b396298e98cf --- .settings/org.eclipse.wst.common.component | 3 -- .../server/ShareUpdateServiceImpl.java | 28 +++++++++---------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index a7f437d..fe006d9 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -5,9 +5,6 @@ - - uses - diff --git a/src/main/java/org/gcube/portlets/user/shareupdates/server/ShareUpdateServiceImpl.java b/src/main/java/org/gcube/portlets/user/shareupdates/server/ShareUpdateServiceImpl.java index 6af0d44..fe1b742 100644 --- a/src/main/java/org/gcube/portlets/user/shareupdates/server/ShareUpdateServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/shareupdates/server/ShareUpdateServiceImpl.java @@ -192,7 +192,7 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar ArrayList mentionedUserIds = getSelectedUserIds(extractPeopleTags(postText)); if (mentionedUserIds != null && mentionedUserIds.size() > 0) { NotificationsManager nm = new ApplicationNotificationsManager(session); - Thread thread = new Thread(new MentionNotificationsThread(toShare.getKey(), postText, nm, mentionedUserIds)); + Thread thread = new Thread(new MentionNotificationsThread(toShare.getKey(), escapedFeedText, nm, mentionedUserIds)); thread.start(); } @@ -237,7 +237,7 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar i = 0; for (String tagged : taggedPeople) { String username = (i < usernames.size()) ? usernames.get(i) : ""; - String taggedHTML = ""+tagged+" "; + String taggedHTML = ""+tagged+" "; escapedFeedText = escapedFeedText.replace("_usr_place_holder_["+i+"]", taggedHTML); i++; } @@ -327,6 +327,8 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar } public UserSettings getUserSettings() { + if (getUserSettingsFromSession() != null) + return getUserSettingsFromSession(); try { ASLSession session = getASLSession(); String username = session.getUsername(); @@ -746,18 +748,16 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar } } else { //test users - portalUsers.add(new PickingUser("11111", "massimiliano.assante", "Massimiliano Assante", "image")); - portalUsers.add(new PickingUser("11111", "massimiliano.assante", "Massimiliano Pazzante", "image")); - portalUsers.add(new PickingUser("11111", "massimiliano.assante", "Massimiliano Ruzzante", "image")); - portalUsers.add(new PickingUser("11111", "massimiliano.assante", "Massimiliano Cantante", "image")); - portalUsers.add(new PickingUser("11111", "massimiliano.assante", "Massimiliano Ballerino", "image")); - portalUsers.add(new PickingUser("11111", "massimiliano.assante", "Massimiliano Violante", "image")); - portalUsers.add(new PickingUser("11111", "giogio.giorgi", "Giorgio Giorgietti", "image")); - portalUsers.add(new PickingUser("2222", "pino.pinetti", "Pino Dall'ara", "image")); - portalUsers.add(new PickingUser("11333111", "rino.gattuso", "Rino Gattuso", "image")); - portalUsers.add(new PickingUser("114444111", "alex.delpiero", "Alessandro Del Piero", "image")); - portalUsers.add(new PickingUser("3462", "sandro.nesta", "Alessandro Nesta", "image")); - portalUsers.add(new PickingUser("11464321", "samsung.mobile", "Samsung Mobile", "image")); + portalUsers.add(new PickingUser("12111", "massimiliano.assante", "Test User #1", "")); + portalUsers.add(new PickingUser("14111", "massimiliano.assante", "Test Second User #2", "")); + portalUsers.add(new PickingUser("11511", "massimiliano.assante", "Test Third User", "")); + portalUsers.add(new PickingUser("11611", "massimiliano.assante", "Test Fourth User", "")); + portalUsers.add(new PickingUser("11711", "massimiliano.assante", "Test Fifth User", "")); + portalUsers.add(new PickingUser("11811", "massimiliano.assante", "Test Sixth User", "")); + portalUsers.add(new PickingUser("15811", "massimiliano.assante", "Ninth Testing User", "")); + portalUsers.add(new PickingUser("15811", "massimiliano.assante", "Eighth Testing User", "")); + portalUsers.add(new PickingUser("11211", "giogio.giorgi", "Seventh Test User", "")); + portalUsers.add(new PickingUser("2222", "pino.pinetti", "Tenth Testing User", "")); } } catch (Exception e) { _log.error("Error in server get all contacts ", e);