Class Messages


  • @Path("2/messages")
    public class Messages
    extends Object
    Messages services REST interface
    Author:
    Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
    • Constructor Detail

      • Messages

        public Messages()
    • Method Detail

      • writeMessage

        @POST
        @Path("write-message/")
        @Consumes("application/json")
        @Produces("application/json")
        public javax.ws.rs.core.Response writeMessage​(@NotNull(message="Message to send is missing")
                                                      org.gcube.social_networking.socialnetworking.model.beans.MessageInputBean input,
                                                      @Context
                                                      javax.servlet.http.HttpServletRequest httpServletRequest)
                                               throws javax.validation.ValidationException,
                                                      org.gcube.vomanagement.usermanagement.exception.UserManagementSystemException,
                                                      org.gcube.vomanagement.usermanagement.exception.UserRetrievalFault
        Write a message to another user. The sender is the token's owner by default
        Parameters:
        input - The message to write"
        httpServletRequest -
        Returns:
        see response example
        Throws:
        javax.validation.ValidationException
        org.gcube.vomanagement.usermanagement.exception.UserManagementSystemException
        org.gcube.vomanagement.usermanagement.exception.UserRetrievalFault
      • getSentMessages

        @GET
        @Path("get-sent-messages")
        @Produces("application/json")
        public javax.ws.rs.core.Response getSentMessages()
      • getReceivedMessages

        @GET
        @Path("get-received-messages")
        @Produces("application/json")
        public javax.ws.rs.core.Response getReceivedMessages()
      • setMessageRead

        @POST
        @Path("set-message-read/")
        @Produces("application/json")
        public javax.ws.rs.core.Response setMessageRead​(@NotNull(message="input is missing") @FormParam("messageId")
                                                        String messageId,
                                                        @FormParam("read")
                                                        Boolean read)
                                                 throws javax.validation.ValidationException
        Set message read or unread
        Parameters:
        messageId - the message identifier
        read - true to set read, false to set unread
        Returns:
        the result of the operation
        Throws:
        javax.validation.ValidationException