Class RemoteLinkConversationServiceImpl
java.lang.Object
com.atlassian.greenhopper.service.api.remote.RemoteLinkConversationServiceImpl
- All Implemented Interfaces:
GreenHopperCache,RemoteLinkConversationService
@Service
public class RemoteLinkConversationServiceImpl
extends Object
implements RemoteLinkConversationService, GreenHopperCache
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.greenhopper.service.api.remote.RemoteLinkConversationService
RemoteLinkConversationService.CreationConversation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked when all caches in the plugin need to be cleared.getConversation(String token) Returns the conversation associated with the given token.voidinit()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.PENDINGstate and returns the conversation token.
-
Constructor Details
-
RemoteLinkConversationServiceImpl
public RemoteLinkConversationServiceImpl()
-
-
Method Details
-
init
@PostConstruct public void init() -
startConversation
public ServiceOutcome<RemoteLinkConversationService.CreationConversation> startConversation(com.atlassian.jira.user.ApplicationUser user) Description copied from interface:RemoteLinkConversationServiceStarts a new conversation for the logged in user, passes it in theRemoteLinkConversationService.CreationConversation.Status.PENDINGstate and returns the conversation token. The conversation is stored for a duration defined by the implementation.- Specified by:
startConversationin interfaceRemoteLinkConversationService- Parameters:
user- the user to start the conversation for- Returns:
- the token
-
redeemConversation
public ServiceOutcome<RemoteLinkConversationService.CreationConversation> redeemConversation(String token) Description copied from interface:RemoteLinkConversationServiceReddeems 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.- Specified by:
redeemConversationin interfaceRemoteLinkConversationService- Parameters:
token- the token of the previously created conversation- Returns:
- the conversation
-
getConversation
public ServiceOutcome<RemoteLinkConversationService.CreationConversation> getConversation(String token) Description copied from interface:RemoteLinkConversationServiceReturns the conversation associated with the given token. If the token does not match any existing conversation the returnedServiceOutcomewill not be valid.- Specified by:
getConversationin interfaceRemoteLinkConversationService- Parameters:
token- the token of the previously created conversation- Returns:
- the conversation
-
flushCache
public void flushCache()Description copied from interface:GreenHopperCacheInvoked when all caches in the plugin need to be cleared.- Specified by:
flushCachein interfaceGreenHopperCache
-