MessagesServiceImpl (gCube Messages Portlet 0.4.0-3.1.0 API)
Date: 2014-05-11

org.gcube.portlets.user.messages.server

## Class MessagesServiceImpl

- java.lang.Object
- - javax.servlet.GenericServlet
  - - javax.servlet.http.HttpServlet
    - - com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
      - - com.google.gwt.user.server.rpc.RemoteServiceServlet
        - - org.gcube.portlets.user.messages.server.MessagesServiceImpl

- All Implemented Interfaces:
    com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, MessagesService

      public class MessagesServiceImpl
      extends com.google.gwt.user.server.rpc.RemoteServiceServlet
      implements MessagesService

  The server side implementation of the RPC service.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static org.apache.log4j.Logger` | `_log`
    `static String` | `TEST_SCOPE`
    `static String` | `TEST_USER`
    `static String` | `TEST_USER_FULLNAME`
    `static String` | `USERNAME_ATTRIBUTE`
    `static boolean` | `withinPortal`

    - ### Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet

      `perThreadRequest, perThreadResponse`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MessagesServiceImpl()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `deleteMessage(String messageIdentifier, String messageType)`
    `List<MessageModel>` | `getAllMessagesReceived()`
    `List<MessageModel>` | `getAllMessagesSent()`
    `protected GWTMessagesBuilder` | `getGWTWorkspaceBuilder()`
    `MessageModel` | `getMessageById(String messageIdentifier, String messageType)`
    `List<MessageModel>` | `getNewMessagesReceived()`
    `String` | `getURLFromApplicationProfile(String identifier)`
    `protected org.gcube.common.homelibrary.home.workspace.Workspace` | `getWorkspace()`
    `void` | `init()` connect to cassandra at startup
    `boolean` | `isSessionExpired()`
    `boolean` | `markMessage(String messageIdentifier, String messageType, boolean boolMark, String markType)`
    `boolean` | `saveAttach(String attachId)`
    `String` | `saveAttachment(String messageIdentifier, String attachmentId, String messageType)`
    `boolean` | `saveAttachments(String messageIdentifier, String messageType)`
    `List<MessageModel>` | `searchInReceivedMessagesByText(String text)`
    `List<MessageModel>` | `searchInSentMessagesByText(String text)`
    `boolean` | `sendToById(List<String> listContactsId, List<String> listAttachmentsId, String subject, String text)`
    `boolean` | `sentToByMessageModel(MessageModel message)`
    `boolean` | `setAllUserMessageNotificationsRead()` this set all the notifications for this user read

    - ### 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

      `destroy, 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`

- - ### Field Detail

    - #### TEST_SCOPE

          public static final String TEST_SCOPE

      See Also:
        Constant Field Values

    - #### TEST_USER

          public static final String TEST_USER

      See Also:
        Constant Field Values

    - #### TEST_USER_FULLNAME

          public static final String TEST_USER_FULLNAME

      See Also:
        Constant Field Values

    - #### USERNAME_ATTRIBUTE

          public static final String USERNAME_ATTRIBUTE

      See Also:
        Constant Field Values

    - #### withinPortal

          public static boolean withinPortal

    - #### _log

          public static org.apache.log4j.Logger _log

  - ### Constructor Detail

    - #### MessagesServiceImpl

          public MessagesServiceImpl()

  - ### Method Detail

    - #### init

          public void init()

      connect to cassandra at startup
      Overrides:
        `init` in class `javax.servlet.GenericServlet`

    - #### getGWTWorkspaceBuilder

          protected GWTMessagesBuilder getGWTWorkspaceBuilder()

    - #### sentToByMessageModel

          public boolean sentToByMessageModel(MessageModel message)
                                       throws Exception

      Specified by:
        `sentToByMessageModel` in interface `MessagesService`
      Throws:
        `Exception`

    - #### setAllUserMessageNotificationsRead

          public boolean setAllUserMessageNotificationsRead()

      this set all the notifications for this user read
      Specified by:
        `setAllUserMessageNotificationsRead` in interface `MessagesService`

    - #### getWorkspace

          protected org.gcube.common.homelibrary.home.workspace.Workspace getWorkspace()
                                                                                throws Exception

      Throws:
        `Exception`

    - #### sendToById

          public boolean sendToById(List<String> listContactsId,
                           List<String> listAttachmentsId,
                           String subject,
                           String text)
                             throws Exception

      Specified by:
        `sendToById` in interface `MessagesService`
      Throws:
        `Exception`

    - #### getAllMessagesReceived

          public List<MessageModel> getAllMessagesReceived()
                                                    throws Exception

      Specified by:
        `getAllMessagesReceived` in interface `MessagesService`
      Throws:
        `Exception`

    - #### getNewMessagesReceived

          public List<MessageModel> getNewMessagesReceived()
                                                    throws Exception

      Specified by:
        `getNewMessagesReceived` in interface `MessagesService`
      Throws:
        `Exception`

    - #### getAllMessagesSent

          public List<MessageModel> getAllMessagesSent()
                                                throws Exception

      Specified by:
        `getAllMessagesSent` in interface `MessagesService`
      Throws:
        `Exception`

    - #### searchInSentMessagesByText

          public List<MessageModel> searchInSentMessagesByText(String text)
                                                        throws Exception

      Specified by:
        `searchInSentMessagesByText` in interface `MessagesService`
      Throws:
        `Exception`

    - #### searchInReceivedMessagesByText

          public List<MessageModel> searchInReceivedMessagesByText(String text)
                                                            throws Exception

      Specified by:
        `searchInReceivedMessagesByText` in interface `MessagesService`
      Throws:
        `Exception`

    - #### getMessageById

          public MessageModel getMessageById(String messageIdentifier,
                                    String messageType)
                                      throws Exception

      Specified by:
        `getMessageById` in interface `MessagesService`
      Throws:
        `Exception`

    - #### saveAttachments

          public boolean saveAttachments(String messageIdentifier,
                                String messageType)
                                  throws Exception

      Specified by:
        `saveAttachments` in interface `MessagesService`
      Throws:
        `Exception`

    - #### saveAttachment

          public String saveAttachment(String messageIdentifier,
                              String attachmentId,
                              String messageType)
                                throws Exception

      Specified by:
        `saveAttachment` in interface `MessagesService`
      Throws:
        `Exception`

    - #### saveAttach

          public boolean saveAttach(String attachId)
                             throws Exception

      Specified by:
        `saveAttach` in interface `MessagesService`
      Throws:
        `Exception`

    - #### markMessage

          public boolean markMessage(String messageIdentifier,
                            String messageType,
                            boolean boolMark,
                            String markType)
                              throws Exception

      Specified by:
        `markMessage` in interface `MessagesService`
      Throws:
        `Exception`

    - #### deleteMessage

          public boolean deleteMessage(String messageIdentifier,
                              String messageType)
                                throws Exception

      Specified by:
        `deleteMessage` in interface `MessagesService`
      Throws:
        `Exception`

    - #### getURLFromApplicationProfile

          public String getURLFromApplicationProfile(String identifier)
                                              throws Exception

      Specified by:
        `getURLFromApplicationProfile` in interface `MessagesService`
      Throws:
        `Exception`

    - #### isSessionExpired

          public boolean isSessionExpired()
                                   throws Exception

      Specified by:
        `isSessionExpired` in interface `MessagesService`
      Returns:
      Throws:
        `Exception`

Copyright © 2014. All Rights Reserved.