From 452c9e8e536991ba5a0681a8d1b9c4b13951c1a0 Mon Sep 17 00:00:00 2001 From: Costantino Perciante Date: Mon, 4 Apr 2016 16:40:42 +0000 Subject: [PATCH] Removed getUnreadMessagesNotificationsByUser since we have both unread messages with the other unread notifications git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/social-networking-library@126752 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../server/DBCassandraAstyanaxImpl.java | 20 ------------------- .../portal/databook/server/DatabookStore.java | 8 -------- 2 files changed, 28 deletions(-) diff --git a/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java b/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java index a8cbb16..f0daa71 100644 --- a/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java +++ b/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java @@ -1107,27 +1107,7 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore { } return true; } - /** - * {@inheritDoc} - */ - @Override - public List getUnreadNotificationMessagesByUser(String userid) throws NotificationTypeNotFoundException, ColumnNameNotFoundException, NotificationIDNotFoundException { - ArrayList toReturn = new ArrayList(); - ArrayList notificationsIDs = getUnreadUserNotificationsIds(userid); - //need them in reverse order - for (int i = notificationsIDs.size()-1; i >= 0; i--) { - try{ - Notification not = readNotification(notificationsIDs.get(i)); - if(not.getType().equals(NotificationType.MESSAGE)) - toReturn.add(not); - }catch(Exception e){ - _log.error("Unable to read notification message with key " + notificationsIDs.get(i)); - } - } - - return toReturn; - } /** * {@inheritDoc} */ diff --git a/src/main/java/org/gcube/portal/databook/server/DatabookStore.java b/src/main/java/org/gcube/portal/databook/server/DatabookStore.java index 485a4e9..482b50b 100644 --- a/src/main/java/org/gcube/portal/databook/server/DatabookStore.java +++ b/src/main/java/org/gcube/portal/databook/server/DatabookStore.java @@ -236,14 +236,6 @@ public interface DatabookStore { * @throws ColumnNameNotFoundException */ List getUnreadNotificationsByUser(String userid) throws NotificationTypeNotFoundException, ColumnNameNotFoundException, NotificationIDNotFoundException; - /** - * return the not yet read notification messages - * @param userid user identifier - * @return a List of not yet read notifications for this user - * @throws NotificationTypeNotFoundException - * @throws ColumnNameNotFoundException - */ - List getUnreadNotificationMessagesByUser(String userid) throws NotificationTypeNotFoundException, ColumnNameNotFoundException, NotificationIDNotFoundException; /** *