Interface RemoteLinkConversationService
- All Superinterfaces:
GreenHopperCache
- All Known Implementing Classes:
RemoteLinkConversationServiceImpl
Manages conversation during the remote link creation process.
A conversation associates a token, a user and a status.
The user send a page creation to Confluence request with a JIRA Agile entity to link and a token that identifies the
conversation created thanks to
startConversation(User)
. Then Confluences calls our link creation REST endpoints
with the token so that we can redeem the stored conversation and create the link on behalf of the user who has
initiated the page creation request.- Since:
- 6.4
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Represents the "conversation" after a creation request. -
Method Summary
Modifier and TypeMethodDescriptiongetConversation
(String token) Returns the conversation associated with the given token.redeemConversation
(String token) Reddeems the conversation associated with the given token.startConversation
(com.atlassian.jira.user.ApplicationUser user) Starts a new conversation for the logged in user, passes it in theRemoteLinkConversationService.CreationConversation.Status.PENDING
state and returns the conversation token.Methods inherited from interface com.atlassian.greenhopper.manager.GreenHopperCache
flushCache
-
Method Details
-
startConversation
ServiceOutcome<RemoteLinkConversationService.CreationConversation> startConversation(com.atlassian.jira.user.ApplicationUser user) Starts a new conversation for the logged in user, passes it in theRemoteLinkConversationService.CreationConversation.Status.PENDING
state and returns the conversation token. The conversation is stored for a duration defined by the implementation.- Parameters:
user
- the user to start the conversation for- Returns:
- the token
-
redeemConversation
Reddeems the conversation associated with the given token. After calling this method, the conversation is still available in the cache but not redeemable so that we can list the conversations to detect the redeemed ones.- Parameters:
token
- the token of the previously created conversation- Returns:
- the conversation
-
getConversation
Returns the conversation associated with the given token. If the token does not match any existing conversation the returnedServiceOutcome
will not be valid.- Parameters:
token
- the token of the previously created conversation- Returns:
- the conversation
-