com.atlassian.greenhopper.service.api.remote
Class RemoteLinkConversationServiceImpl

java.lang.Object
  extended by com.atlassian.greenhopper.service.api.remote.RemoteLinkConversationServiceImpl
All Implemented Interfaces:
GreenHopperCache, RemoteLinkConversationService

@Service
public class RemoteLinkConversationServiceImpl
extends java.lang.Object
implements RemoteLinkConversationService, GreenHopperCache


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.greenhopper.service.api.remote.RemoteLinkConversationService
RemoteLinkConversationService.CreationConversation
 
Constructor Summary
RemoteLinkConversationServiceImpl()
           
 
Method Summary
 void flushCache()
          Invoked when all caches in the plugin need to be cleared.
 ServiceOutcome<RemoteLinkConversationService.CreationConversation> getConversation(java.lang.String token)
          Returns the conversation associated with the given token.
 void init()
           
 ServiceOutcome<RemoteLinkConversationService.CreationConversation> redeemConversation(java.lang.String token)
          Reddeems the conversation associated with the given token.
 ServiceOutcome<RemoteLinkConversationService.CreationConversation> startConversation(com.atlassian.crowd.embedded.api.User user)
          Starts a new conversation for the logged in user, passes it in the RemoteLinkConversationService.CreationConversation.Status.PENDING state and returns the conversation token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteLinkConversationServiceImpl

public RemoteLinkConversationServiceImpl()
Method Detail

init

@PostConstruct
public void init()

startConversation

public ServiceOutcome<RemoteLinkConversationService.CreationConversation> startConversation(com.atlassian.crowd.embedded.api.User user)
Description copied from interface: RemoteLinkConversationService
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.

Specified by:
startConversation in interface RemoteLinkConversationService
Parameters:
user - the user to start the conversation for
Returns:
the token

redeemConversation

public ServiceOutcome<RemoteLinkConversationService.CreationConversation> redeemConversation(java.lang.String token)
Description copied from interface: RemoteLinkConversationService
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.

Specified by:
redeemConversation in interface RemoteLinkConversationService
Parameters:
token - the token of the previously created conversation
Returns:
the conversation

getConversation

public ServiceOutcome<RemoteLinkConversationService.CreationConversation> getConversation(java.lang.String token)
Description copied from interface: RemoteLinkConversationService
Returns the conversation associated with the given token. If the token does not match any existing conversation the returned ServiceOutcome will not be valid.

Specified by:
getConversation in interface RemoteLinkConversationService
Parameters:
token - the token of the previously created conversation
Returns:
the conversation

flushCache

public void flushCache()
Description copied from interface: GreenHopperCache
Invoked when all caches in the plugin need to be cleared.

Specified by:
flushCache in interface GreenHopperCache


Copyright © 2007-2014 Atlassian. All Rights Reserved.