Class MessageParser
java.lang.Object
com.symphony.bdk.core.service.message.util.MessageParser
Helper class for extracting entities inside an incoming
V4Message
such as:
Mentions, Hashtags, Cashtags, Emojis.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCashtags
(V4Message message) Parse data inside the message and returns a list containing the text of the cashtags foundParse data inside the message and returns a map containing the list of emojis found.getHashtags
(V4Message message) Parse data inside the message and returns a list containing the text of the hashtags foundgetMentions
(V4Message message) Parse data inside the message and returns a list containing the user ids corresponding to the users mentioned
-
Constructor Details
-
MessageParser
public MessageParser()
-
-
Method Details
-
getMentions
Parse data inside the message and returns a list containing the user ids corresponding to the users mentioned- Parameters:
message
- incoming V4 message to be parsed- Returns:
- list of users ids that has been mentioned inside the message
- Throws:
MessageParserException
-
getHashtags
Parse data inside the message and returns a list containing the text of the hashtags found- Parameters:
message
- incoming V4 message to be parsed- Returns:
- list of hashtags contained in the message
- Throws:
MessageParserException
-
getCashtags
Parse data inside the message and returns a list containing the text of the cashtags found- Parameters:
message
- incoming V4 message to be parsed- Returns:
- list of cashtags contained in the message
- Throws:
MessageParserException
-
getEmojis
Parse data inside the message and returns a map containing the list of emojis found. Key of the map are the annotation used to identify the emoji and the values are the their unicode.- Parameters:
message
- incoming V4 message to be parsed- Returns:
- map of emojis contained in the message
- Throws:
MessageParserException
-