set Workspace notifications only to portal mode

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/social-networking-library@94044 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2014-04-02 09:39:19 +00:00
parent ac1c1f7bb8
commit 10490fee4f
3 changed files with 4441 additions and 7 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1046,11 +1046,11 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
for (int i = 0; i < NotificationType.values().length; i++) {
//TODO: Potential bug in NotificationType for workspace are refactored
//create a map with all notification enabled except for workspace notifications (They start with WP_) it was the only quick way
// if (NotificationType.values()[i].toString().startsWith("WP_") || NotificationType.values()[i].toString().startsWith("CALENDAR")) {
// NotificationChannelType[] wpTypes = { NotificationChannelType.PORTAL };
// toCreate.put(NotificationType.values()[i], wpTypes);
// }
// else
if (NotificationType.values()[i].toString().startsWith("WP_")) {
NotificationChannelType[] wpTypes = { NotificationChannelType.PORTAL };
toCreate.put(NotificationType.values()[i], wpTypes);
}
else
toCreate.put(NotificationType.values()[i], NotificationChannelType.values());
}
setUserNotificationPreferences(userid, toCreate); //commit the map

View File

@ -26,7 +26,7 @@ import org.junit.BeforeClass;
import org.junit.Test;
public class DatabookCassandraTest {
private static DatabookStore store;
private static DBCassandraAstyanaxImpl store;
@BeforeClass
public static void setup() throws Exception {
@ -282,8 +282,9 @@ public class DatabookCassandraTest {
// assertNotNull(recentFeeds);
// for (Feed recFeed :recentFeeds)
// System.out.println(recFeed);
try {
//store.enableDeletedPosts();
System.out.println("/gcube/devsec/devVRE TIMELINE: ");
int from = 1;
for (int i = 0; i < 5; i++) {