Interface RemoteLinkConversationService

All Superinterfaces:
GreenHopperCache
All Known Implementing Classes:
RemoteLinkConversationServiceImpl

public interface RemoteLinkConversationService extends GreenHopperCache
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
  • 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 the RemoteLinkConversationService.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 returned ServiceOutcome will not be valid.
      Parameters:
      token - the token of the previously created conversation
      Returns:
      the conversation