com.atlassian.mywork.host.service
Class ClientServiceImpl

java.lang.Object
  extended by com.atlassian.mywork.host.service.ClientServiceImpl
All Implemented Interfaces:
ClientService, com.atlassian.sal.api.lifecycle.LifecycleAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean

public class ClientServiceImpl
extends java.lang.Object
implements ClientService, com.atlassian.sal.api.lifecycle.LifecycleAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean


Field Summary
protected static java.lang.String APP_ID_KEY
           
protected static java.lang.String CATEGORY_KEY
           
protected static java.lang.String CATEGORY_VALUE
           
protected static java.util.List<java.lang.String> GLOBAL_ID_KEYS
           
 
Constructor Summary
ClientServiceImpl(com.atlassian.applinks.api.ApplicationLinkService applicationLinkService, com.atlassian.applinks.spi.auth.AuthenticationConfigurationManager authenticationConfigurationManager, LocalNotificationService notificationService, LocalTaskService taskService, UserApplicationLinkDao userApplicationLinkDao, LocalRegistrationService registrationService, AppLinkHelper appLinkHelper, com.atlassian.applinks.host.spi.InternalHostApplication internalHostApplication, com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate, com.atlassian.plugin.PluginAccessor pluginAccessor)
           
 
Method Summary
 void afterPropertiesSet()
           
 void applicationLinkChangedEvent(com.atlassian.applinks.api.event.ApplicationLinkEvent event)
           
 void clientPong(java.lang.String username, java.lang.String appId)
          Informs local instance that notifications and tasks can be created for a user from the remote instance.
 void destroy()
           
static java.lang.String generateGlobalId(java.lang.String appId)
           
 void onStart()
           
 void updatePotentialClient(java.lang.String appId)
          Updates remote client registration.
 void verifyAuth(BeforeCountNewNotificationsEvent beforeCountNewNotificationsEvent)
           
 void verifyAuth(java.lang.String username)
          Informs remote servers that we are interested in tasks and notifications for the given user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APP_ID_KEY

protected static final java.lang.String APP_ID_KEY
See Also:
Constant Field Values

CATEGORY_KEY

protected static final java.lang.String CATEGORY_KEY
See Also:
Constant Field Values

CATEGORY_VALUE

protected static final java.lang.String CATEGORY_VALUE
See Also:
Constant Field Values

GLOBAL_ID_KEYS

protected static final java.util.List<java.lang.String> GLOBAL_ID_KEYS
Constructor Detail

ClientServiceImpl

public ClientServiceImpl(com.atlassian.applinks.api.ApplicationLinkService applicationLinkService,
                         com.atlassian.applinks.spi.auth.AuthenticationConfigurationManager authenticationConfigurationManager,
                         LocalNotificationService notificationService,
                         LocalTaskService taskService,
                         UserApplicationLinkDao userApplicationLinkDao,
                         LocalRegistrationService registrationService,
                         AppLinkHelper appLinkHelper,
                         com.atlassian.applinks.host.spi.InternalHostApplication internalHostApplication,
                         com.atlassian.event.api.EventPublisher eventPublisher,
                         com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate,
                         com.atlassian.plugin.PluginAccessor pluginAccessor)
Method Detail

verifyAuth

@EventListener
public void verifyAuth(BeforeCountNewNotificationsEvent beforeCountNewNotificationsEvent)

verifyAuth

public void verifyAuth(java.lang.String username)
Description copied from interface: ClientService
Informs remote servers that we are interested in tasks and notifications for the given user.

Specified by:
verifyAuth in interface ClientService
Parameters:
username - user that is interested in tasks and notifications

clientPong

public void clientPong(java.lang.String username,
                       java.lang.String appId)
Description copied from interface: ClientService
Informs local instance that notifications and tasks can be created for a user from the remote instance.

Specified by:
clientPong in interface ClientService
Parameters:
username - username of the authorised user
appId - application id of the remote instance

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception

onStart

public void onStart()
Specified by:
onStart in interface com.atlassian.sal.api.lifecycle.LifecycleAware

destroy

public void destroy()
             throws java.lang.Exception
Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
Throws:
java.lang.Exception

applicationLinkChangedEvent

@EventListener
public void applicationLinkChangedEvent(com.atlassian.applinks.api.event.ApplicationLinkEvent event)

updatePotentialClient

public void updatePotentialClient(java.lang.String appId)
Description copied from interface: ClientService
Updates remote client registration.

Specified by:
updatePotentialClient in interface ClientService
Parameters:
appId - application id of the remote client

generateGlobalId

public static java.lang.String generateGlobalId(java.lang.String appId)


Copyright © 2012 Atlassian. All Rights Reserved.