org.gcube.portlets.user.notifications.server
Class NotificationsServiceImpl

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
              extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
                  extended by org.gcube.portlets.user.notifications.server.NotificationsServiceImpl
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, NotificationsService

public class NotificationsServiceImpl
extends com.google.gwt.user.server.rpc.RemoteServiceServlet
implements NotificationsService

The server side implementation of the RPC service.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
perThreadRequest, perThreadResponse
 
Constructor Summary
NotificationsServiceImpl()
           
 
Method Summary
 void destroy()
           
 org.gcube.portal.databook.shared.UserInfo getUserInfo()
           
 LinkedHashMap<String,ArrayList<NotificationPreference>> getUserNotificationPreferences()
           
 HashMap<Date,ArrayList<org.gcube.portal.databook.shared.Notification>> getUserNotifications()
          returns the notifications separated per days
 void init()
          connect to cassandra at startup
 boolean setAllUserNotificationsRead()
          this sets all the notifications for this user read
 boolean setUserNotificationPreferences(Map<org.gcube.portal.databook.shared.NotificationType,org.gcube.portal.databook.shared.NotificationChannelType[]> enabledChannels)
           
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
checkPermutationStrongName, doGetSerializationPolicy, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponse
 
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotificationsServiceImpl

public NotificationsServiceImpl()
Method Detail

init

public void init()
connect to cassandra at startup

Overrides:
init in class javax.servlet.GenericServlet

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet

getUserInfo

public org.gcube.portal.databook.shared.UserInfo getUserInfo()
Specified by:
getUserInfo in interface NotificationsService

getUserNotifications

public HashMap<Date,ArrayList<org.gcube.portal.databook.shared.Notification>> getUserNotifications()
returns the notifications separated per days

Specified by:
getUserNotifications in interface NotificationsService

setAllUserNotificationsRead

public boolean setAllUserNotificationsRead()
this sets all the notifications for this user read

Specified by:
setAllUserNotificationsRead in interface NotificationsService

getUserNotificationPreferences

public LinkedHashMap<String,ArrayList<NotificationPreference>> getUserNotificationPreferences()
Specified by:
getUserNotificationPreferences in interface NotificationsService

setUserNotificationPreferences

public boolean setUserNotificationPreferences(Map<org.gcube.portal.databook.shared.NotificationType,org.gcube.portal.databook.shared.NotificationChannelType[]> enabledChannels)
Specified by:
setUserNotificationPreferences in interface NotificationsService


Copyright © 2014. All Rights Reserved.