Package com.slack.api.bolt.context
Class Context
java.lang.Object
com.slack.api.bolt.context.Context
- Direct Known Subclasses:
ActionContext
,AttachmentActionContext
,BlockSuggestionContext
,DefaultContext
,DialogCancellationContext
,DialogSubmissionContext
,DialogSuggestionContext
,EventContext
,GlobalShortcutContext
,MessageShortcutContext
,OAuthCallbackContext
,SlashCommandContext
,ViewSubmissionContext
,WorkflowStepEditContext
,WorkflowStepExecuteContext
,WorkflowStepSaveContext
Represents a context behind a request from Slack API.
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
bot_id associated with this request.protected String
A bot token associated with this request.protected String
Bot user's user_id associated with this request.protected String
Organization ID for Enterprise Grid.protected boolean
Returns true if the token is issued by an enterprise install (= org-level installation)final org.slf4j.Logger
protected String
The user's ID associated with this request.protected String
The user token that is associated with the request user ID.protected Slack
protected String
Workspace ID. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionack()
ack
(com.google.gson.JsonElement json) ackWithJson
(Object obj) client()
getBotId()
bot_id associated with this request.A bot token associated with this request.Bot user's user_id associated with this request.Organization ID for Enterprise Grid.org.slf4j.Logger
The user's ID associated with this request.The user token that is associated with the request user ID.getSlack()
Workspace ID.boolean
Returns true if the token is issued by an enterprise install (= org-level installation)void
bot_id associated with this request.void
setBotToken
(String botToken) A bot token associated with this request.void
setBotUserId
(String botUserId) Bot user's user_id associated with this request.void
setEnterpriseId
(String enterpriseId) Organization ID for Enterprise Grid.void
setEnterpriseInstall
(boolean enterpriseInstall) Returns true if the token is issued by an enterprise install (= org-level installation)void
setRequestUserId
(String requestUserId) The user's ID associated with this request.void
setRequestUserToken
(String requestUserToken) The user token that is associated with the request user ID.void
void
Workspace ID.com.google.gson.JsonElement
toString()
-
Field Details
-
slack
-
logger
public final org.slf4j.Logger logger -
enterpriseId
Organization ID for Enterprise Grid. -
teamId
Workspace ID. -
enterpriseInstall
protected boolean enterpriseInstallReturns true if the token is issued by an enterprise install (= org-level installation) -
botToken
A bot token associated with this request. The format must be starting with `xoxb-`. -
botId
bot_id associated with this request. -
botUserId
Bot user's user_id associated with this request. -
requestUserId
The user's ID associated with this request. -
requestUserToken
The user token that is associated with the request user ID. -
additionalValues
-
-
Constructor Details
-
Context
public Context()
-
-
Method Details
-
client
-
asyncClient
-
say
public ChatPostMessageResponse say(BuilderConfigurator<ChatPostMessageRequest.ChatPostMessageRequestBuilder> request) throws IOException, SlackApiException - Throws:
IOException
SlackApiException
-
ack
-
ackWithJson
-
ack
-
toJson
-
toString
-
getSlack
-
getLogger
public org.slf4j.Logger getLogger() -
getEnterpriseId
Organization ID for Enterprise Grid. -
getTeamId
Workspace ID. -
isEnterpriseInstall
public boolean isEnterpriseInstall()Returns true if the token is issued by an enterprise install (= org-level installation) -
getBotToken
A bot token associated with this request. The format must be starting with `xoxb-`. -
getBotId
bot_id associated with this request. -
getBotUserId
Bot user's user_id associated with this request. -
getRequestUserId
The user's ID associated with this request. -
getRequestUserToken
The user token that is associated with the request user ID. -
getAdditionalValues
-
setSlack
-
setEnterpriseId
Organization ID for Enterprise Grid. -
setTeamId
Workspace ID. -
setEnterpriseInstall
public void setEnterpriseInstall(boolean enterpriseInstall) Returns true if the token is issued by an enterprise install (= org-level installation) -
setBotToken
A bot token associated with this request. The format must be starting with `xoxb-`. -
setBotId
bot_id associated with this request. -
setBotUserId
Bot user's user_id associated with this request. -
setRequestUserId
The user's ID associated with this request. -
setRequestUserToken
The user token that is associated with the request user ID.
-