Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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

java.lang.Object
  extended by net.java.sip.communicator.impl.googlecontacts.GoogleContactsConnectionImpl
All Implemented Interfaces:
GoogleContactsConnection

public class GoogleContactsConnectionImpl
extends Object
implements GoogleContactsConnection

Google Contacts credentials to connect to the service.

Author:
Sebastien Vincent

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.java.sip.communicator.service.googlecontacts.GoogleContactsConnection
GoogleContactsConnection.ConnectionStatus
 
Constructor Summary
GoogleContactsConnectionImpl(String login, String password)
          Constructor.
 
Method Summary
 GoogleContactsConnection.ConnectionStatus connect()
          Initialize connection.
 com.google.gdata.client.contacts.ContactsService getGoogleService()
          Returns the Google service.
 String getLogin()
          Get login.
 String getPassword()
          get password.
 String getPrefix()
          Returns the google contacts phone number prefix.
 boolean isEnabled()
          Returns if the connection is enabled.
 void setEnabled(boolean enabled)
          Set the connection to be enabled or not.
 void setLogin(String login)
          Set login.
 void setPassword(String password)
          Set password.
 void setPrefix(String prefix)
          Sets the google contacts prefix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GoogleContactsConnectionImpl

public GoogleContactsConnectionImpl(String login,
                                    String password)
Constructor.

Parameters:
login - the login to connect to the service
password - the password to connect to the service
Method Detail

getGoogleService

public com.google.gdata.client.contacts.ContactsService getGoogleService()
Returns the Google service.

Returns:
the Google service

getLogin

public String getLogin()
Get login.

Specified by:
getLogin in interface GoogleContactsConnection
Returns:
login to connect to the service

getPassword

public String getPassword()
get password.

Specified by:
getPassword in interface GoogleContactsConnection
Returns:
password to connect to the service

setLogin

public void setLogin(String login)
Set login.

Specified by:
setLogin in interface GoogleContactsConnection
Parameters:
login - login to connect to the service

setPassword

public void setPassword(String password)
Set password.

Specified by:
setPassword in interface GoogleContactsConnection
Parameters:
password - password to connect to the service

connect

public GoogleContactsConnection.ConnectionStatus connect()
Initialize connection.

Specified by:
connect in interface GoogleContactsConnection
Returns:
connection status

isEnabled

public boolean isEnabled()
Returns if the connection is enabled.

Returns:
true if connection is enabled, false otherwise

setEnabled

public void setEnabled(boolean enabled)
Set the connection to be enabled or not.

Parameters:
enabled - value to set

setPrefix

public void setPrefix(String prefix)
Sets the google contacts prefix.

Parameters:
prefix - the phone number prefix to set

getPrefix

public String getPrefix()
Returns the google contacts phone number prefix.

Specified by:
getPrefix in interface GoogleContactsConnection
Returns:
the google contacts phone number prefix

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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