public class MessageServiceImpl extends org.flowable.common.engine.impl.service.CommonEngineServiceImpl<EngageEngineConfiguration> implements MessageService
Constructor and Description |
---|
MessageServiceImpl(EngageEngineConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
MessageBuilder |
createMessageBuilder() |
MessageQuery |
createMessageQuery() |
ReactionQuery |
createReactionQuery() |
void |
deleteMessage(String messageId,
String userId) |
Message |
findById(String messageId) |
Message |
findByIdWithMessageAudits(String messageId) |
void |
markMessageAsRead(String messageId,
String userId) |
String |
reactToMessage(String messageId,
String userId,
String reaction) |
void |
referenceMessage(String messageId,
String referenceId,
String referenceType)
Reference the message with the given
messageId with the referenceId and referenceType . |
void |
removeReactionToMessage(String reactionId) |
void |
updateMessageActionInstanceId(String actionInstanceId,
String messageId,
String userId) |
Message |
updateMessageContent(String messageId,
String mainContent) |
Message |
updateMessageMedia(String messageId,
org.flowable.content.api.ContentItem contentItem,
InputStream contentStream)
Change the media content of the media message with the given content item and input stream.
|
Message |
updateMessageMedia(String messageId,
String mediaContentId)
Change the media content id of the media message with the given
mediaContentId . |
getCommandExecutor, setCommandExecutor
public MessageServiceImpl(EngageEngineConfiguration configuration)
public MessageBuilder createMessageBuilder()
createMessageBuilder
in interface MessageService
public MessageQuery createMessageQuery()
createMessageQuery
in interface MessageService
public Message findById(String messageId)
findById
in interface MessageService
public Message findByIdWithMessageAudits(String messageId)
findByIdWithMessageAudits
in interface MessageService
public void markMessageAsRead(String messageId, String userId)
markMessageAsRead
in interface MessageService
public Message updateMessageContent(String messageId, String mainContent)
updateMessageContent
in interface MessageService
public Message updateMessageMedia(String messageId, org.flowable.content.api.ContentItem contentItem, InputStream contentStream)
MessageService
updateMessageMedia
in interface MessageService
messageId
- the id of the media message being updatedcontentItem
- the new content item for the mediacontentStream
- the new input stream for the mediapublic Message updateMessageMedia(String messageId, String mediaContentId)
MessageService
mediaContentId
.updateMessageMedia
in interface MessageService
messageId
- the id of the media message being updatedmediaContentId
- the new id of the media contentpublic void updateMessageActionInstanceId(String actionInstanceId, String messageId, String userId)
updateMessageActionInstanceId
in interface MessageService
public void deleteMessage(String messageId, String userId)
deleteMessage
in interface MessageService
public void referenceMessage(String messageId, String referenceId, String referenceType)
MessageService
messageId
with the referenceId
and referenceType
.
It is not possible to reference an already referenced message.referenceMessage
in interface MessageService
messageId
- the id of the message that needs to be referencedreferenceId
- the id of the referencereferenceType
- the type of the referencepublic ReactionQuery createReactionQuery()
createReactionQuery
in interface MessageService
public String reactToMessage(String messageId, String userId, String reaction)
reactToMessage
in interface MessageService
public void removeReactionToMessage(String reactionId)
removeReactionToMessage
in interface MessageService
Copyright © 2019. All rights reserved.