partially added support method for shared calendar notification
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/social-networking-library@78989 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ffec64f5b7
commit
fcd81603ea
102160
.gwt/.gwt-log
102160
.gwt/.gwt-log
File diff suppressed because it is too large
Load Diff
123471
.gwt/.gwt-log_0
123471
.gwt/.gwt-log_0
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2
pom.xml
2
pom.xml
|
@ -10,7 +10,7 @@
|
|||
|
||||
<groupId>org.gcube.portal</groupId>
|
||||
<artifactId>social-networking-library</artifactId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<name>gCube Social Networking Library</name>
|
||||
<description>
|
||||
The gCube Social Networking Library is the 'bridge' between your gCube Applications and the social networking facilities.
|
||||
|
|
|
@ -69,7 +69,7 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
|
|||
public static final String USER_MESSAGES_NOTIFICATIONS = "USERMessagesNotifications"; // user messages notifications timeline
|
||||
public static final String USER_NOTIFICATIONS_PREFERENCES = "USERNotificationsPreferences"; // preferences for notifications
|
||||
|
||||
private static ColumnFamily<String, String> cf_Connections = new ColumnFamily<String, String>(
|
||||
private static ColumnFamily<String, String> cf_Connections = new ColumnFamily<String, String>(
|
||||
CONNECTIONS, // Column Family Name
|
||||
StringSerializer.get(), // Key Serializer
|
||||
StringSerializer.get()); // Column Serializer
|
||||
|
@ -974,6 +974,8 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
|
|||
}
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* by default Workspace and Calendar Notifications are set to Portal
|
||||
*/
|
||||
@Override
|
||||
public Map<NotificationType, NotificationChannelType[]> getUserNotificationPreferences(String userid) throws NotificationTypeNotFoundException, NotificationChannelTypeNotFoundException {
|
||||
|
@ -995,7 +997,7 @@ 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 workflow notifications (They start with WP_) it was the only quick way
|
||||
if (NotificationType.values()[i].toString().startsWith("WP_")) {
|
||||
if (NotificationType.values()[i].toString().startsWith("WP_") || NotificationType.values()[i].toString().startsWith("CALENDAR")) {
|
||||
NotificationChannelType[] wpTypes = { NotificationChannelType.PORTAL };
|
||||
toCreate.put(NotificationType.values()[i], wpTypes);
|
||||
}
|
||||
|
@ -1444,6 +1446,15 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
|
|||
else if (type.compareTo("LIKE") == 0) {
|
||||
return NotificationType.LIKE;
|
||||
}
|
||||
else if (type.compareTo("CALENDAR_ADDED_EVENT") == 0) {
|
||||
return NotificationType.CALENDAR_ADDED_EVENT;
|
||||
}
|
||||
else if (type.compareTo("CALENDAR_UPDATED_EVENT") == 0) {
|
||||
return NotificationType.CALENDAR_UPDATED_EVENT;
|
||||
}
|
||||
else if (type.compareTo("CALENDAR_DELETED_EVENT") == 0) {
|
||||
return NotificationType.CALENDAR_DELETED_EVENT;
|
||||
}
|
||||
else if (type.compareTo("MESSAGE") == 0) {
|
||||
return NotificationType.MESSAGE;
|
||||
}
|
||||
|
|
|
@ -62,6 +62,18 @@ public enum NotificationType {
|
|||
* use to notify a user he got a message
|
||||
*/
|
||||
MESSAGE,
|
||||
/**
|
||||
* use to notify a user that someone in his VRE created a new Event in the Calendar
|
||||
*/
|
||||
CALENDAR_ADDED_EVENT,
|
||||
/**
|
||||
* use to notify a user that someone in his VRE updated an Event in the Calendar
|
||||
*/
|
||||
CALENDAR_UPDATED_EVENT,
|
||||
/**
|
||||
* use to notify a user that someone in his VRE deleted an Event in the Calendar
|
||||
*/
|
||||
CALENDAR_DELETED_EVENT,
|
||||
/**
|
||||
* use to notify a user he got a connections request
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue