2013-01-04 19:22:23 +01:00
|
|
|
package org.gcube.portlets.user.notifications.client;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.HashMap;
|
2013-06-05 18:45:10 +02:00
|
|
|
import java.util.LinkedHashMap;
|
2013-06-04 18:21:54 +02:00
|
|
|
import java.util.Map;
|
2013-01-04 19:22:23 +01:00
|
|
|
|
|
|
|
import org.gcube.portal.databook.shared.Notification;
|
2013-01-31 20:23:36 +01:00
|
|
|
import org.gcube.portal.databook.shared.NotificationChannelType;
|
2013-06-04 18:21:54 +02:00
|
|
|
import org.gcube.portal.databook.shared.NotificationType;
|
2013-01-31 20:23:36 +01:00
|
|
|
import org.gcube.portal.databook.shared.UserInfo;
|
2013-06-05 18:45:10 +02:00
|
|
|
import org.gcube.portlets.user.notifications.shared.NotificationPreference;
|
2013-01-04 19:22:23 +01:00
|
|
|
|
|
|
|
import com.google.gwt.user.client.rpc.RemoteService;
|
|
|
|
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The client side stub for the RPC service.
|
|
|
|
*/
|
|
|
|
@RemoteServiceRelativePath("notificationsServlet")
|
|
|
|
public interface NotificationsService extends RemoteService {
|
|
|
|
UserInfo getUserInfo();
|
|
|
|
HashMap<Date, ArrayList<Notification>> getUserNotifications();
|
2013-01-08 18:24:40 +01:00
|
|
|
|
2014-04-02 18:02:48 +02:00
|
|
|
HashMap<Date, ArrayList<Notification>> getUserNotificationsByRange(int from, int quantity);
|
|
|
|
|
2013-01-08 18:24:40 +01:00
|
|
|
boolean setAllUserNotificationsRead();
|
2013-01-31 20:23:36 +01:00
|
|
|
|
2013-06-05 18:45:10 +02:00
|
|
|
LinkedHashMap<String, ArrayList<NotificationPreference>> getUserNotificationPreferences();
|
2013-02-01 00:29:10 +01:00
|
|
|
|
2013-06-04 18:21:54 +02:00
|
|
|
boolean setUserNotificationPreferences(Map<NotificationType, NotificationChannelType[]> enabledChannels);
|
2013-01-04 19:22:23 +01:00
|
|
|
}
|