Class MessageServiceImpl
- java.lang.Object
-
- org.flowable.common.engine.impl.service.CommonServiceImpl<C>
-
- org.flowable.common.engine.impl.service.CommonEngineServiceImpl<EngageEngineConfiguration>
-
- com.flowable.engage.engine.impl.message.MessageServiceImpl
-
- All Implemented Interfaces:
MessageService
public class MessageServiceImpl extends CommonEngineServiceImpl<EngageEngineConfiguration> implements MessageService
- Author:
- Filip Hrisafov
-
-
Field Summary
-
Fields inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
commandExecutor
-
Fields inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
configuration
-
-
Constructor Summary
Constructors Constructor Description MessageServiceImpl(EngageEngineConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 givenmessageId
with thereferenceId
andreferenceType
.void
removeReactionToMessage(String reactionId)
void
updateMessageActionInstanceId(String actionInstanceId, String messageId, String userId)
Message
updateMessageContent(String messageId, String mainContent)
Message
updateMessageMedia(String messageId, String mediaContentId)
Change the media content id of the media message with the givenmediaContentId
.Message
updateMessageMedia(String messageId, ContentItem contentItem, InputStream contentStream)
Change the media content of the media message with the given content item and input stream.-
Methods inherited from class org.flowable.common.engine.impl.service.CommonEngineServiceImpl
getCommandExecutor, setCommandExecutor
-
Methods inherited from class org.flowable.common.engine.impl.service.CommonServiceImpl
getConfiguration
-
-
-
-
Constructor Detail
-
MessageServiceImpl
public MessageServiceImpl(EngageEngineConfiguration configuration)
-
-
Method Detail
-
createMessageBuilder
public MessageBuilder createMessageBuilder()
- Specified by:
createMessageBuilder
in interfaceMessageService
-
createMessageQuery
public MessageQuery createMessageQuery()
- Specified by:
createMessageQuery
in interfaceMessageService
-
findById
public Message findById(String messageId)
- Specified by:
findById
in interfaceMessageService
-
findByIdWithMessageAudits
public Message findByIdWithMessageAudits(String messageId)
- Specified by:
findByIdWithMessageAudits
in interfaceMessageService
-
markMessageAsRead
public void markMessageAsRead(String messageId, String userId)
- Specified by:
markMessageAsRead
in interfaceMessageService
-
updateMessageContent
public Message updateMessageContent(String messageId, String mainContent)
- Specified by:
updateMessageContent
in interfaceMessageService
-
updateMessageMedia
public Message updateMessageMedia(String messageId, ContentItem contentItem, InputStream contentStream)
Description copied from interface:MessageService
Change the media content of the media message with the given content item and input stream.- Specified by:
updateMessageMedia
in interfaceMessageService
- Parameters:
messageId
- the id of the media message being updatedcontentItem
- the new content item for the mediacontentStream
- the new input stream for the media- Returns:
- the updated message
-
updateMessageMedia
public Message updateMessageMedia(String messageId, String mediaContentId)
Description copied from interface:MessageService
Change the media content id of the media message with the givenmediaContentId
.- Specified by:
updateMessageMedia
in interfaceMessageService
- Parameters:
messageId
- the id of the media message being updatedmediaContentId
- the new id of the media content- Returns:
- the updated message
-
updateMessageActionInstanceId
public void updateMessageActionInstanceId(String actionInstanceId, String messageId, String userId)
- Specified by:
updateMessageActionInstanceId
in interfaceMessageService
-
deleteMessage
public void deleteMessage(String messageId, String userId)
- Specified by:
deleteMessage
in interfaceMessageService
-
referenceMessage
public void referenceMessage(String messageId, String referenceId, String referenceType)
Description copied from interface:MessageService
Reference the message with the givenmessageId
with thereferenceId
andreferenceType
. It is not possible to reference an already referenced message.- Specified by:
referenceMessage
in interfaceMessageService
- Parameters:
messageId
- the id of the message that needs to be referencedreferenceId
- the id of the referencereferenceType
- the type of the reference
-
createReactionQuery
public ReactionQuery createReactionQuery()
- Specified by:
createReactionQuery
in interfaceMessageService
-
reactToMessage
public String reactToMessage(String messageId, String userId, String reaction)
- Specified by:
reactToMessage
in interfaceMessageService
-
removeReactionToMessage
public void removeReactionToMessage(String reactionId)
- Specified by:
removeReactionToMessage
in interfaceMessageService
-
-