Package org.bgerp.plugin.msg.max
Class ExpressionObject
java.lang.Object
org.bgerp.plugin.msg.max.ExpressionObject
- All Implemented Interfaces:
ExpressionObject
MAX JEXL API for sending messages to chats.
Same API structure as telegram ExpressionObject.
Usage in doExpression:
max.sendMessage(chatId, "Hello") max.sendMessage(process, "Status changed") max.sendMessage(userIds, "Hello") max.sendMessageForProcess(process, "Hello")
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleansendMessage(String chatId, String text) Send a plain text message to a chat.booleansendMessage(String chatId, String text, String parseMode) Send a message to a chat with a specific format.booleansendMessage(Collection<Integer> userIds, String text) Send a plain text message to users.booleansendMessage(Collection<Integer> userIds, String text, String parseMode) Send a message with a specific format to users.booleansendMessage(Process process, String text) Send a plain text message to process executors.booleansendMessage(Process process, String text, String parseMode) Send a message with a specific format to process executors.booleansendMessageForProcess(Process process, String text) Send a plain text message to a process by process chatId.void
-
Constructor Details
-
ExpressionObject
public ExpressionObject()
-
-
Method Details
-
toContext
- Specified by:
toContextin interfaceExpressionObject
-
sendMessage
Send a plain text message to a chat.- Parameters:
chatId- the chat IDtext- the message- Returns:
- true if sent successfully
-
sendMessage
Send a message to a chat with a specific format.- Parameters:
chatId- the chat IDtext- the messageparseMode- the format:null- plain text,MarkdownV2,HTML- Returns:
- true if sent successfully
-
sendMessage
Send a plain text message to users.- Parameters:
userIds- the user IDstext- the message
-
sendMessage
Send a message with a specific format to users.- Parameters:
userIds- the user IDstext- the messageparseMode- the format
-
sendMessage
Send a plain text message to process executors.- Parameters:
process- the processtext- the message- Returns:
- true if all messages sent successfully
-
sendMessage
Send a message with a specific format to process executors.- Parameters:
process- the processtext- the messageparseMode- the format- Returns:
- true if all messages sent successfully
-
sendMessageForProcess
Send a plain text message to a process by process chatId.- Parameters:
process- the processtext- the message- Returns:
- true if sent successfully
-