com.google.api.adwords.lib
Interface Credentials

All Known Implementing Classes:
AdWordsUser

public interface Credentials

Provides service objects for a single authorized user and AdWords account.

All Credentials objects are immutable and all methods are thread safe. The Service objects that they return are not in general thread safe. If you wish to use a Service object returned from one of these methods in multiple threads, you must externally synchronize access to all methods. In addition, the results of AdWordsService.getLastOperationCount() and AdWordsService.getLastTime() will not be reliable unless the calls are within the same synchronized block as the service method whose time/operation resource you wish to return.

The various factory methods can throw ServiceExceptions if the underlying Axis implementation encounters an error while attempting to locate the appropriate web service.


Method Summary
 java.lang.String getApplicationToken()
          Returns the developer token associated with these Credentials.
 java.lang.String getClientEmail()
          Returns the client email account associated with these Credentials.
 java.lang.String getDeveloperToken()
          Returns the developer token associated with these Credentials.
 java.lang.String getEmail()
          Returns the email account associated with these Credentials.
 java.lang.String getPassword()
          Returns the password associated with these Credentials.
 java.lang.Object getService(int service)
          Get the Service for these Credentials.
 java.lang.String getUseragent()
          Returns the useragent associated with these Credentials.
 java.lang.String toString()
          Returns a String describing these credentials.
 java.lang.String toString(boolean hidePassword, boolean hideDeveloperToken)
          Returns a String describing these credentials.
 

Method Detail

getService

java.lang.Object getService(int service)
                            throws javax.xml.rpc.ServiceException
Get the Service for these Credentials.

Throws:
javax.xml.rpc.ServiceException

getEmail

java.lang.String getEmail()
Returns the email account associated with these Credentials.


getClientEmail

java.lang.String getClientEmail()
Returns the client email account associated with these Credentials. This value will be null unless the Credentials are for an MCC account on behalf of a client.

Returns:
the email address of the client.

getPassword

java.lang.String getPassword()
Returns the password associated with these Credentials.


getUseragent

java.lang.String getUseragent()
Returns the useragent associated with these Credentials. The useragent is an arbitrary String that will be associated with operations performed through these Credentials as a bookkeeping convenience.


getDeveloperToken

java.lang.String getDeveloperToken()
Returns the developer token associated with these Credentials.


getApplicationToken

java.lang.String getApplicationToken()
Returns the developer token associated with these Credentials.


toString

java.lang.String toString()
Returns a String describing these credentials. The exact format is unspecified and subject to change. A reasonable description might be: "[Credentials clientEmail='myclient@client.com' email='user@company.com' useragent='Update keywords for Client.com campaigns']"

Overrides:
toString in class java.lang.Object
Returns:
a short description of these Credentials.

toString

java.lang.String toString(boolean hidePassword,
                          boolean hideDeveloperToken)
Returns a String describing these credentials. Parameters control whether password and developer token are hidden. The exact format is unspecified and subject to change. A reasonable description might be: "[Credentials clientEmail='myclient@client.com' email='user@company.com' password='passw0rd' useragent='Update keywords for Client.com campaigns']"

Parameters:
hidePassword - false iff the password may be visible in the description.
hideDeveloperToken - false iff the developer token may be visible in the description.
Returns:
a short description of these Credentials.


Copyright © 2005 Google Corp. All Rights Reserved.