Class Messages
- java.lang.Object
-
- org.gcube.portal.social.networking.ws.methods.v2.Messages
-
@Path("2/messages") public class Messages extends ObjectMessages services REST interface- Author:
- Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
-
-
Constructor Summary
Constructors Constructor Description Messages()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponsegetReceivedMessages()javax.ws.rs.core.ResponsegetSentMessages()javax.ws.rs.core.ResponsesetMessageRead(String messageId, Boolean read)Set message read or unreadjavax.ws.rs.core.ResponsewriteMessage(org.gcube.social_networking.socialnetworking.model.beans.MessageInputBean input, javax.servlet.http.HttpServletRequest httpServletRequest)Write a message to another user.
-
-
-
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.UserRetrievalFaultWrite 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.ValidationExceptionorg.gcube.vomanagement.usermanagement.exception.UserManagementSystemExceptionorg.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.ValidationExceptionSet message read or unread- Parameters:
messageId- the message identifierread- true to set read, false to set unread- Returns:
- the result of the operation
- Throws:
javax.validation.ValidationException
-
-