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 MessageBuildercreateMessageBuilder()MessageQuerycreateMessageQuery()ReactionQuerycreateReactionQuery()voiddeleteMessage(String messageId, String userId)MessagefindById(String messageId)MessagefindByIdWithMessageAudits(String messageId)voidmarkMessageAsRead(String messageId, String userId)StringreactToMessage(String messageId, String userId, String reaction)voidreferenceMessage(String messageId, String referenceId, String referenceType)Reference the message with the givenmessageIdwith thereferenceIdandreferenceType.voidremoveReactionToMessage(String reactionId)voidupdateMessageActionInstanceId(String actionInstanceId, String messageId, String userId)MessageupdateMessageContent(String messageId, String mainContent)MessageupdateMessageMedia(String messageId, String mediaContentId)Change the media content id of the media message with the givenmediaContentId.MessageupdateMessageMedia(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:
createMessageBuilderin interfaceMessageService
-
createMessageQuery
public MessageQuery createMessageQuery()
- Specified by:
createMessageQueryin interfaceMessageService
-
findById
public Message findById(String messageId)
- Specified by:
findByIdin interfaceMessageService
-
findByIdWithMessageAudits
public Message findByIdWithMessageAudits(String messageId)
- Specified by:
findByIdWithMessageAuditsin interfaceMessageService
-
markMessageAsRead
public void markMessageAsRead(String messageId, String userId)
- Specified by:
markMessageAsReadin interfaceMessageService
-
updateMessageContent
public Message updateMessageContent(String messageId, String mainContent)
- Specified by:
updateMessageContentin interfaceMessageService
-
updateMessageMedia
public Message updateMessageMedia(String messageId, ContentItem contentItem, InputStream contentStream)
Description copied from interface:MessageServiceChange the media content of the media message with the given content item and input stream.- Specified by:
updateMessageMediain 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:MessageServiceChange the media content id of the media message with the givenmediaContentId.- Specified by:
updateMessageMediain 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:
updateMessageActionInstanceIdin interfaceMessageService
-
deleteMessage
public void deleteMessage(String messageId, String userId)
- Specified by:
deleteMessagein interfaceMessageService
-
referenceMessage
public void referenceMessage(String messageId, String referenceId, String referenceType)
Description copied from interface:MessageServiceReference the message with the givenmessageIdwith thereferenceIdandreferenceType. It is not possible to reference an already referenced message.- Specified by:
referenceMessagein 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:
createReactionQueryin interfaceMessageService
-
reactToMessage
public String reactToMessage(String messageId, String userId, String reaction)
- Specified by:
reactToMessagein interfaceMessageService
-
removeReactionToMessage
public void removeReactionToMessage(String reactionId)
- Specified by:
removeReactionToMessagein interfaceMessageService
-
-