Interface IMessagesApi
-
public interface IMessagesApi
High-level methods for interacting with portal messages.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IUserPortalResponse<List<de.xima.fc.api.rest.pub.client.form_record.model.BaseFormRecordMessageResource>>
getChatMessages(IUserPortalInvocationContext ctx, UUID chatUuid)
Gets all messages for the current user and chat.IUserPortalResponse<de.xima.fc.api.rest.pub.client.form_record.model.FormRecordMessageResourcePage>
getMessages(IUserPortalInvocationContext ctx, PagingDataModel pagingDataModel, MessagesQueryModel queryModel)
Gets all messages for the current user.IUserPortalResponse<Integer>
getMessagesCount(IUserPortalInvocationContext ctx, MessagesQueryModel queryModel)
Gets the number of messages for the current user.IUserPortalResponse<de.xima.fc.api.rest.pub.client.form_record.model.DetailedFormRecordMessageResource>
sendMessage(IUserPortalInvocationContext ctx, String message, UUID chatUuid)
Sends a message to a chat.IUserPortalResponse<de.xima.fc.api.rest.pub.client.form_record.model.DetailedFormRecordMessageUploadRequestResource>
uploadAttachment(IUserPortalInvocationContext ctx, UUID messageUuid, UUID uploadRequestUuid, List<File> files)
Uploads an attachment to a message.
-
-
-
Method Detail
-
sendMessage
IUserPortalResponse<de.xima.fc.api.rest.pub.client.form_record.model.DetailedFormRecordMessageResource> sendMessage(IUserPortalInvocationContext ctx, String message, UUID chatUuid)
Sends a message to a chat.- Parameters:
ctx
- Invocation context for communicating with the user portal REST API.message
- The message to send.- Returns:
null
if the message was sent successfully, an error message otherwise.
-
uploadAttachment
IUserPortalResponse<de.xima.fc.api.rest.pub.client.form_record.model.DetailedFormRecordMessageUploadRequestResource> uploadAttachment(IUserPortalInvocationContext ctx, UUID messageUuid, UUID uploadRequestUuid, List<File> files)
Uploads an attachment to a message.- Parameters:
ctx
- Invocation context for communicating with the user portal REST API.messageUuid
- The UUID of the message to upload the attachment to.uploadRequestUuid
- The UUID of the upload request.files
- The files to upload.- Returns:
- a 'success' response if the attachment was uploaded successfully, an error response describing the failure otherwise.
-
getMessages
IUserPortalResponse<de.xima.fc.api.rest.pub.client.form_record.model.FormRecordMessageResourcePage> getMessages(IUserPortalInvocationContext ctx, PagingDataModel pagingDataModel, MessagesQueryModel queryModel)
Gets all messages for the current user.- Parameters:
ctx
- Invocation context for communicating with the user portal REST API.pagingDataModel
- Paging data for the messages to retrieve.queryModel
- Query to filter messages by.- Returns:
- A list of all messages for the current user.
-
getChatMessages
IUserPortalResponse<List<de.xima.fc.api.rest.pub.client.form_record.model.BaseFormRecordMessageResource>> getChatMessages(IUserPortalInvocationContext ctx, UUID chatUuid)
Gets all messages for the current user and chat.- Parameters:
ctx
- Invocation context for communicating with the user portal REST API.chatUuid
- The UUID of the chat to retrieve messages for.- Returns:
- A list of all messages for the current user.
-
getMessagesCount
IUserPortalResponse<Integer> getMessagesCount(IUserPortalInvocationContext ctx, MessagesQueryModel queryModel)
Gets the number of messages for the current user.- Parameters:
ctx
- Invocation context for communicating with the user portal REST API.queryModel
- The query model for the messages to count.- Returns:
- The number of messages for the current user.
-
-