public class MicrosoftTeamsFunctions extends BaseFunctions
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
APPROVE_STRING |
protected static java.lang.String |
FLEXDEPLOY_LOGO |
protected java.lang.String |
REJECT_STRING |
mExecute, mFLOG, mScriptRef
Constructor and Description |
---|
MicrosoftTeamsFunctions(boolean isExecute,
LogFunctions pFLOG) |
Modifier and Type | Method and Description |
---|---|
void |
cleanup() |
void |
createCalendarEvent(java.lang.String pTeamsMessagingAccountCode,
JSONObject pCalendarEvent,
java.lang.String pUser)
Creates a calendar Event Requires a Teams Messaging Integration Account.
|
java.lang.String |
getGroovyKey() |
void |
sendTeamsMessage(java.lang.String pTeamsMessagingAccountCode,
java.lang.String pTeamName,
java.lang.String pChannelName,
java.lang.String pMessageText,
java.lang.String pIconURL)
Deprecated.
|
void |
sendTeamsMessage(java.lang.String pTeamsMessagingAccountCode,
TeamChannelMessageRequestPojo pTeamsMessageRequest,
java.lang.String pTeamName,
java.lang.String pChannelName)
Deprecated.
|
void |
sendTeamsWebhookMessage(java.lang.String pWebhookUrl,
java.lang.String pJson)
Sends a Microsoft Teams message to a team channel.
|
void |
sendTeamsWebhookMessage(java.lang.String pWebhookUrl,
java.lang.String pMessageTitle,
java.lang.String pMessageText,
java.lang.String pIconURL)
Sends a Microsoft Teams message to an Incoming Webhook associated to a team channel.
|
void |
sendUserTeamsMessage(java.lang.String pTeamsMessagingAccountCode,
java.lang.String pChatName,
java.lang.String pMessageText)
Deprecated.
|
void |
sendUserTeamsMessage(java.lang.String pTeamsMessagingAccountCode,
UserMessageRequestPojo pUserMessageRequest,
java.lang.String pChatName)
Deprecated.
|
decryptIntegrationInstance, doSimpleGet, findIntegrationInstanceByCode, getLogFunctions, getServerBaseUrl, setScriptRef
protected static final java.lang.String FLEXDEPLOY_LOGO
protected final java.lang.String APPROVE_STRING
protected final java.lang.String REJECT_STRING
public MicrosoftTeamsFunctions(boolean isExecute, LogFunctions pFLOG)
@Deprecated public void sendTeamsMessage(java.lang.String pTeamsMessagingAccountCode, java.lang.String pTeamName, java.lang.String pChannelName, java.lang.String pMessageText, java.lang.String pIconURL) throws FlexCheckedException, FlexNotFoundException
pTeamsMessagingAccountCode
- The messaging account code for the Teams account.pTeamName
- Name of the team that will receive the message.pChannelName
- Name of the channel that the message will be sent to.pMessageText
- The text for the message content. Can be plain text or html.pIconURL
- The URL for the icon of the sender of the message.FlexNotFoundException
- When no Teams Account found for given codeFlexCheckedException
- All other exceptions@Deprecated public void sendTeamsMessage(java.lang.String pTeamsMessagingAccountCode, TeamChannelMessageRequestPojo pTeamsMessageRequest, java.lang.String pTeamName, java.lang.String pChannelName) throws FlexCheckedException, FlexNotFoundException
pTeamsMessagingAccountCode
- The messaging account code for the Teams account.pTeamsMessageRequest
- TeamChannelMessageRequestPojo containing required
information.pTeamName
- Name of the team that will receive the message.pChannelName
- Name of the channel that the message will be sent to.FlexNotFoundException
- When no Teams Account found for given codeFlexCheckedException
- All other exceptions@Deprecated public void sendUserTeamsMessage(java.lang.String pTeamsMessagingAccountCode, java.lang.String pChatName, java.lang.String pMessageText) throws FlexCheckedException, FlexNotFoundException
pTeamsMessagingAccountCode
- The Messaging account code for the Teams account.pChatName
- Name of the chat that the message will be sent to.pMessageText
- The text for the message content. Can be plain text or html.FlexNotFoundException
- When no Teams Account found for given codeFlexCheckedException
- All other exceptions@Deprecated public void sendUserTeamsMessage(java.lang.String pTeamsMessagingAccountCode, UserMessageRequestPojo pUserMessageRequest, java.lang.String pChatName) throws FlexCheckedException, FlexNotFoundException
pTeamsMessagingAccountCode
- The Messaging account code for the Teams accountpUserMessageRequest
- The UserMessageRequestPojo containing all the required
information.pChatName
- Name of the chat that the message will be sent to.FlexNotFoundException
- When no Teams Account found for given codeFlexCheckedException
- All other exceptionspublic java.lang.String getGroovyKey()
getGroovyKey
in class BaseFunctions
public void cleanup()
cleanup
in class BaseFunctions
public void sendTeamsWebhookMessage(java.lang.String pWebhookUrl, java.lang.String pMessageTitle, java.lang.String pMessageText, java.lang.String pIconURL) throws FlexCheckedException
pWebhookUrl
- - The URL to send the message topMessageTitle
- - Optional Title of the messagepMessageText
- The text for the message content. Can be plain text or html.pIconURL
- The URL for the icon of the sender of the message.FlexCheckedException
- All exceptionspublic void sendTeamsWebhookMessage(java.lang.String pWebhookUrl, java.lang.String pJson) throws FlexCheckedException
pWebhookUrl
- pJson
- FlexNotFoundException
- When no Teams Account found for given codeFlexCheckedException
- All other exceptionspublic void createCalendarEvent(java.lang.String pTeamsMessagingAccountCode, JSONObject pCalendarEvent, java.lang.String pUser) throws FlexCheckedException
pTeamsMessagingAccountCode
- - The messaging account code for the Teams account.pCalendarEvent
- - JSON based on off of the website https://learn.microsoft.com/en-us/graph/api/user-post-events?view=graph-rest-1.0&tabs=httppUser
- - Optional user's calendar to create the event on. If null, the event is created for the Teams Messaging Integration Account user.FlexCheckedException