Massimiliano Assante 2012-12-07 15:29:09 +00:00
parent c67ddb5a2d
commit 8edbeecc0f
2 changed files with 67 additions and 10 deletions

View File

@ -4,8 +4,11 @@ import org.gcube.application.framework.core.session.ASLSession;
import org.gcube.common.core.utils.logging.GCUBEClientLog;
import org.gcube.portal.databook.server.DBCassandraAstyanaxImpl;
import org.gcube.portal.databook.server.DatabookStore;
import org.gcube.portal.databook.shared.Comment;
import org.gcube.portal.databook.shared.Feed;
import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceFolder;
import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem;
import org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage;
/**
*
* @author Massimiliano Assante, ISTI-CNR
@ -53,4 +56,25 @@ public class AslNotificationManager implements NotificationManager {
return true;
}
@Override
public boolean notifyMessageReceived(String userIdToNotify, WorkspaceMessage message) {
return true;
}
@Override
public boolean notifyOwnCommentReply(String userIdToNotify, Comment comment) {
return true;
}
@Override
public boolean notifyCommentReply(String userIdToNotify, Comment comment) {
return true;
}
@Override
public boolean notifyLikedFeed(String userIdToNotify, Feed likedFeed) {
return true;
}
}

View File

@ -1,7 +1,10 @@
package org.gcube.applicationsupportlayer.social;
import org.gcube.portal.databook.shared.Comment;
import org.gcube.portal.databook.shared.Feed;
import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceFolder;
import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem;
import org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage;
/**
*
* @author Massimiliano Assante, ISTI-CNR
@ -14,7 +17,7 @@ public interface NotificationManager {
*
* @param userIdToNotify the user you want to notify
* @param sharedFolder the shared {@link WorkspaceFolder}
* @return true id the notification is correctly delivered, false otherwise
* @return true if the notification is correctly delivered, false otherwise
*/
boolean notifyFolderSharing(String userIdToNotify, WorkspaceFolder sharedFolder);
/**
@ -23,7 +26,7 @@ public interface NotificationManager {
* @param userIdToNotify the user you want to notify
* @param sharedFolder the shared {@link WorkspaceFolder}
* @param newAddedUserId the new user that was added
* @return true id the notification is correctly delivered, false otherwise
* @return true if the notification is correctly delivered, false otherwise
*/
boolean notifyFolderAddedUser(String userIdToNotify, WorkspaceFolder sharedFolder, String newAddedUserId);
/**
@ -32,29 +35,59 @@ public interface NotificationManager {
* @param userIdToNotify the user you want to notify
* @param sharedFolder the shared {@link WorkspaceFolder}
* @param removedUserId the new user that was removed
* @return true id the notification is correctly delivered, false otherwise
* @return true if the notification is correctly delivered, false otherwise
*/
boolean notifyFolderRemovedUser(String userIdToNotify, WorkspaceFolder sharedFolder, String removedUserId);
/**
* use to notify a user he got a workspace item new in some of his workspace shared folder
* @param userIdToNotify
* @param userIdToNotify the user you want to notify
* @param newItem the new shared {@link WorkspaceItem}
* @return true id the notification is correctly delivered, false otherwise
* @return true if the notification is correctly delivered, false otherwise
*/
boolean notifyAddedItem(String userIdToNotify, WorkspaceItem newItem);
/**
* use to notify a user he got a workspace item deleted from one of his workspace shared folder
* @param userIdToNotify
* @param userIdToNotify the user you want to notify
* @param removedItem the removed {@link WorkspaceItem}
* @return true id the notification is correctly delivered, false otherwise
* @return true if the notification is correctly delivered, false otherwise
*/
boolean notifyRemovedItem(String userIdToNotify, WorkspaceItem removedItem);
/**
* use to notify a user he got a workspace item updated from one of his workspace shared folder
* @param userIdToNotify
* @param newItem the new shared {@link WorkspaceItem}
* @return true id the notification is correctly delivered, false otherwise
* @param userIdToNotify the user you want to notify
* @param updatedItem the updated shared {@link WorkspaceItem}
* @return true if the notification is correctly delivered, false otherwise
*/
boolean notifyUpdatedItem(String userIdToNotify, WorkspaceItem updatedItem);
/**
*
* @param userIdToNotify the user you want to notify
* @param message the {@link WorkspaceMessage} sent
* @return true if the notification is correctly delivered, false otherwise
*/
boolean notifyMessageReceived(String userIdToNotify, WorkspaceMessage message);
/**
*
* @param userIdToNotify the user you want to notify
* @param comment the {@link Comment} instance to which someone replied to
* @return true if the notification is correctly delivered, false otherwise
*/
boolean notifyOwnCommentReply(String userIdToNotify, Comment comment);
/**
* use to notify a user that commented on a feed (Not his) that someone commented too
*
* @param userIdToNotify the user you want to notify
* @param comment the {@link Comment} instance to which someone replied to
* @return true if the notification is correctly delivered, false otherwise
*/
boolean notifyCommentReply(String userIdToNotify, Comment comment);
/**
* use to notify a user he got one of his feed liked
*
* @param userIdToNotify the user you want to notify
* @param likedFeed the {@link Feed} instance someone liked
* @return
*/
boolean notifyLikedFeed(String userIdToNotify, Feed likedFeed);
}