notifications/src/main/java/org/gcube/portlets/user/notifications/client/NotificationsServiceAsync.java

33 lines
969 B
Java

package org.gcube.portlets.user.notifications.client;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import org.gcube.portal.databook.shared.Notification;
import org.gcube.portal.databook.shared.NotificationChannelType;
import org.gcube.portal.databook.shared.NotificationType;
import org.gcube.portal.databook.shared.UserInfo;
import com.google.gwt.user.client.rpc.AsyncCallback;
public interface NotificationsServiceAsync {
void getUserInfo(AsyncCallback<UserInfo> callback);
void getUserNotifications(
AsyncCallback<HashMap<Date, ArrayList<Notification>>> callback);
void setAllUserNotificationsRead(AsyncCallback<Boolean> callback);
void getUserNotificationPreferences(AsyncCallback<HashMap<NotificationType, NotificationChannelType[]>> callback);
void setUserNotificationPreferences(
Map<NotificationType, NotificationChannelType[]> enabledChannels,
AsyncCallback<Boolean> callback);
}