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
This commit is contained in:
parent
fdda510279
commit
452c9e8e53
|
@ -1107,27 +1107,7 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<Notification> getUnreadNotificationMessagesByUser(String userid) throws NotificationTypeNotFoundException, ColumnNameNotFoundException, NotificationIDNotFoundException {
|
|
||||||
ArrayList<Notification> toReturn = new ArrayList<Notification>();
|
|
||||||
ArrayList<String> 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}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -236,14 +236,6 @@ public interface DatabookStore {
|
||||||
* @throws ColumnNameNotFoundException
|
* @throws ColumnNameNotFoundException
|
||||||
*/
|
*/
|
||||||
List<Notification> getUnreadNotificationsByUser(String userid) throws NotificationTypeNotFoundException, ColumnNameNotFoundException, NotificationIDNotFoundException;
|
List<Notification> getUnreadNotificationsByUser(String userid) throws NotificationTypeNotFoundException, ColumnNameNotFoundException, NotificationIDNotFoundException;
|
||||||
/**
|
|
||||||
* return the not yet read notification messages
|
|
||||||
* @param userid user identifier
|
|
||||||
* @return a <class>List</class> of not yet read notifications for this user
|
|
||||||
* @throws NotificationTypeNotFoundException
|
|
||||||
* @throws ColumnNameNotFoundException
|
|
||||||
*/
|
|
||||||
List<Notification> getUnreadNotificationMessagesByUser(String userid) throws NotificationTypeNotFoundException, ColumnNameNotFoundException, NotificationIDNotFoundException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue