Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.googlecontacts
Class GoogleContactsActivator

java.lang.Object
  extended by net.java.sip.communicator.impl.googlecontacts.GoogleContactsActivator
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class GoogleContactsActivator
extends Object
implements org.osgi.framework.BundleActivator

Activates the Google Contacts Service

Author:
Sebastien Vincent

Constructor Summary
GoogleContactsActivator()
           
 
Method Summary
static void disableContactSource(GoogleContactsConnection cnx)
          Disable contact source service with specified GoogleContactsConnection.
static void disableContactSource(String login)
          Disable contact source service with specified GoogleContactsConnection.
static GoogleContactsSourceService enableContactSource(GoogleContactsConnection cnx, boolean googleTalk)
          Enable contact source service with specified GoogleContactsConnection.
static GoogleContactsSourceService enableContactSource(String login, String password, boolean googleTalk)
          Enable contact source service with specified GoogleContactsConnection.
static ConfigurationService getConfigService()
          Returns a reference to a ConfigurationService implementation currently registered in the bundle context or null if no such implementation was found.
static CredentialsStorageService getCredentialsService()
          Returns a reference to a CredentialsStorageConfigurationService implementation currently registered in the bundle context or null if no such implementation was found.
static GoogleContactsServiceImpl getGoogleContactsService()
          Returns a reference to a GoogleContactsService implementation currently registered in the bundle context or null if no such implementation was found.
static PhoneNumberI18nService getPhoneNumberI18nService()
          Gets the PhoneNumberI18nService to be used by the functionality of the addrbook plug-in.
static ResourceManagementService getResourceManagementService()
          Returns a reference to a ResourceManagementService implementation currently registered in the bundle context or null if no such implementation was found.
 void start(org.osgi.framework.BundleContext bundleContext)
          Starts the Google Contacts service
 void stop(org.osgi.framework.BundleContext bundleContext)
          Stops the Google Contacts service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GoogleContactsActivator

public GoogleContactsActivator()
Method Detail

getPhoneNumberI18nService

public static PhoneNumberI18nService getPhoneNumberI18nService()
Gets the PhoneNumberI18nService to be used by the functionality of the addrbook plug-in.

Returns:
the PhoneNumberI18nService to be used by the functionality of the addrbook plug-in

getConfigService

public static ConfigurationService getConfigService()
Returns a reference to a ConfigurationService implementation currently registered in the bundle context or null if no such implementation was found.

Returns:
a currently valid implementation of the ConfigurationService.

getGoogleContactsService

public static GoogleContactsServiceImpl getGoogleContactsService()
Returns a reference to a GoogleContactsService implementation currently registered in the bundle context or null if no such implementation was found.

Returns:
a currently valid implementation of the GoogleContactsService

getCredentialsService

public static CredentialsStorageService getCredentialsService()
Returns a reference to a CredentialsStorageConfigurationService implementation currently registered in the bundle context or null if no such implementation was found.

Returns:
a currently valid implementation of the CredentialsStorageService.

getResourceManagementService

public static ResourceManagementService getResourceManagementService()
Returns a reference to a ResourceManagementService implementation currently registered in the bundle context or null if no such implementation was found.

Returns:
a currently valid implementation of the ResourceManagementService.

start

public void start(org.osgi.framework.BundleContext bundleContext)
           throws Exception
Starts the Google Contacts service

Specified by:
start in interface org.osgi.framework.BundleActivator
Parameters:
bundleContext - BundleContext
Throws:
Exception - if something goes wrong when starting service

stop

public void stop(org.osgi.framework.BundleContext bundleContext)
          throws Exception
Stops the Google Contacts service.

Specified by:
stop in interface org.osgi.framework.BundleActivator
Parameters:
bundleContext - BundleContext
Throws:
Exception - if something goes wrong when stopping service

enableContactSource

public static GoogleContactsSourceService enableContactSource(String login,
                                                              String password,
                                                              boolean googleTalk)
Enable contact source service with specified GoogleContactsConnection.

Parameters:
login - login
password - password
googleTalk - if the provider service is GoogleTalk
Returns:
a GoogleContactsSourceService instance

enableContactSource

public static GoogleContactsSourceService enableContactSource(GoogleContactsConnection cnx,
                                                              boolean googleTalk)
Enable contact source service with specified GoogleContactsConnection.

Parameters:
cnx - GoogleContactsConnection
googleTalk - if the contact source has been created as GoogleTalk account or via external Google Contacts
Returns:
a GoogleContactsSourceService instance

disableContactSource

public static void disableContactSource(String login)
Disable contact source service with specified GoogleContactsConnection.

Parameters:
login - login

disableContactSource

public static void disableContactSource(GoogleContactsConnection cnx)
Disable contact source service with specified GoogleContactsConnection.

Parameters:
cnx - GoogleContactsConnection.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.