set for workspace notification emails to off by default
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/social-networking-library@76854 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
f4ffa05f81
commit
7c05ce61bc
3267
.gwt/.gwt-log
3267
.gwt/.gwt-log
File diff suppressed because it is too large
Load Diff
|
@ -965,7 +965,14 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
|
|||
HashMap<NotificationType, NotificationChannelType[]> toCreate = new HashMap<NotificationType, NotificationChannelType[]>();
|
||||
|
||||
for (int i = 0; i < NotificationType.values().length; i++) {
|
||||
toCreate.put(NotificationType.values()[i], NotificationChannelType.values()); //create a map with all notification enabled
|
||||
//TODO: Potential bug in NotificationType for workspace are refactored
|
||||
//create a map with all notification enabled except for workflow notifications (They start with WP_) it was the only quick way
|
||||
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
|
||||
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
package org.gcube.portal.databook.shared;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author Massimiliano Assante ISTI-CNR
|
||||
*
|
||||
* @version 1.0 January 2012
|
||||
* TODO: Buggy if NotificationType for WP_* are refactored see DBCassandraAstyanaxImpl#getUserNotificationPreferences(String userid)
|
||||
* introduced due to urgent matters
|
||||
*/
|
||||
public enum NotificationType {
|
||||
|
||||
/**
|
||||
* use to notify a user he got a workspace folder shared
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue