public class

DomainSettingsService

extends AppsPropertyService
java.lang.Object
   ↳ com.google.gdata.client.Service
     ↳ com.google.gdata.client.GoogleService
       ↳ com.google.gdata.client.appsforyourdomain.AppsForYourDomainService
         ↳ com.google.gdata.client.appsforyourdomain.AppsPropertyService
           ↳ com.google.gdata.client.appsforyourdomain.adminsettings.DomainSettingsService

Class Overview

Specialization of AppsPropertyService for managing general, account related and appearance settings of a domain.

Summary

[Expand]
Inherited Constants
From class com.google.gdata.client.appsforyourdomain.AppsForYourDomainService
Fields
protected String accountSettingsUrl
protected String appearanceUrl
protected String domainBaseUrl
protected String generalSettingsUrl Base URL for various feeds.
[Expand]
Inherited Fields
From class com.google.gdata.client.GoogleService
From class com.google.gdata.client.Service
Public Constructors
DomainSettingsService(String domain, String applicationName)
Parameterized constructor to setup a Service object which can be used to initialize the service without obtaining a token.
DomainSettingsService(String adminUser, String adminPassword, String domain, String applicationName)
Parameterized constructor for service authentication.
Public Methods
String getCountryCodeForDomain()
Retrieves the country code for the domain registered.
String getCustomerPIN()
Retrieves Customer PIN associated with the domain.
String getDefaultLanguage()
Retrieves the default language for the Google Apps domain
String getDomainCreationTime()
Gets the time domain was created.
String getDomainEdition()
Retrieves the domain edition.
String getDomainSecondaryEmailAddress()
Retrieves the secondary Email address registered with the domain
String getDomainVerificationStatus()
Retrieves the status of verification for the domain.
int getMaxUserCount()
Retrieves the maximum number of users that can be created in the domain
String getOrganizationName()
Retrieves the organization name associated with the domain
String getSupportPIN()
Retrieves the Support PIN for the domain.
GenericEntry setDefaultLanguage(String language)
Sets the default language for Google Apps domain.
GenericEntry setDomainLogo(String base64EncodedImage)
Updates the custom logo with the new image provided.
GenericEntry setDomainSecondaryEmailAddress(String adminSecondaryEmail)
Registers the given Email as domain's secondary Email address
GenericEntry setOrganizationName(String organizationName)
Set the organization name for the domain
[Expand]
Inherited Methods
From class com.google.gdata.client.appsforyourdomain.AppsForYourDomainService
From class com.google.gdata.client.GoogleService
From class com.google.gdata.client.Service
From class java.lang.Object
From interface com.google.gdata.client.AuthTokenFactory.TokenListener

Fields

protected String accountSettingsUrl

protected String appearanceUrl

protected String domainBaseUrl

protected String generalSettingsUrl

Base URL for various feeds.

Public Constructors

public DomainSettingsService (String domain, String applicationName)

Parameterized constructor to setup a Service object which can be used to initialize the service without obtaining a token. The user should explicitly authorize the service by calling either setUserCredentials or setUserToken when using this constructor.

Parameters
domain Domain being configured
applicationName Application name consuming the API

public DomainSettingsService (String adminUser, String adminPassword, String domain, String applicationName)

Parameterized constructor for service authentication.

Parameters
adminUser The email id of the administrator.
adminPassword The administrator password.
domain The domain name to be configured.
applicationName The calling client application name.for e.g. mycompany-java
Throws
AuthenticationException if an authentication related error occurs.

Public Methods

public String getCountryCodeForDomain ()

Retrieves the country code for the domain registered.

Returns
  • Country code
Throws
IOException if an error occurs while communicating with the GData service.
MalformedURLException if the feed URL cannot be constructed.
ServiceException if the fetch request failed due to system error.
AppsForYourDomainException if an Apps for your domain API error occurred.

public String getCustomerPIN ()

Retrieves Customer PIN associated with the domain.

Returns
  • Customer PIN
Throws
IOException if an error occurs while communicating with the GData service.
MalformedURLException if the feed URL cannot be constructed.
ServiceException if the fetch request failed due to system error.
AppsForYourDomainException if an Apps for your domain API error occurred.

public String getDefaultLanguage ()

Retrieves the default language for the Google Apps domain

Returns
  • The default language code
Throws
AppsForYourDomainException if an Apps for your domain API error occurred.
IOException if an error occurs while communicating with the GData service.
ServiceException if the fetch request failed due to system error.

public String getDomainCreationTime ()

Gets the time domain was created.

Returns
  • Time of domain creation
Throws
IOException if an error occurs while communicating with the GData service.
MalformedURLException if the feed URL cannot be constructed.
ServiceException if the fetch request failed due to system error.
AppsForYourDomainException if an Apps for your domain API error occurred.

public String getDomainEdition ()

Retrieves the domain edition.

Returns
  • String Domain edition
Throws
IOException if an error occurs while communicating with the GData service.
MalformedURLException if the feed URL cannot be constructed.
ServiceException if the fetch request failed due to system error.
AppsForYourDomainException if an Apps for your domain API error occurred.

public String getDomainSecondaryEmailAddress ()

Retrieves the secondary Email address registered with the domain

Returns
  • Secondary Email address
Throws
IOException if an error occurs while communicating with the GData service.
MalformedURLException if the feed URL cannot be constructed.
ServiceException if the fetch request failed due to system error.
AppsForYourDomainException if an Apps for your domain API error occurred.

public String getDomainVerificationStatus ()

Retrieves the status of verification for the domain.

Returns
  • Status of domain verification
Throws
IOException if an error occurs while communicating with the GData service.
MalformedURLException if the feed URL cannot be constructed.
ServiceException if the fetch request failed due to system error.
AppsForYourDomainException if an Apps for your domain API error occurred.

public int getMaxUserCount ()

Retrieves the maximum number of users that can be created in the domain

Returns
  • Maximum users count.
Throws
IOException if an error occurs while communicating with the GData service.
MalformedURLException if the feed URL cannot be constructed.
ServiceException if the fetch request failed due to system error.
AppsForYourDomainException if an Apps for your domain API error occurred.

public String getOrganizationName ()

Retrieves the organization name associated with the domain

Returns
  • The name of the organization
Throws
IOException if an error occurs while communicating with the GData service.
MalformedURLException if the feed URL cannot be constructed.
ServiceException if the fetch request failed due to system error.
AppsForYourDomainException if an Apps for your domain API error occurred.

public String getSupportPIN ()

Retrieves the Support PIN for the domain.

Returns
  • String Support PIN
Throws
IOException if an error occurs while communicating with the GData service.
MalformedURLException if the feed URL cannot be constructed.
ServiceException if the fetch request failed due to system error.
AppsForYourDomainException if an Apps for your domain API error occurred.

public GenericEntry setDefaultLanguage (String language)

Sets the default language for Google Apps domain.

Parameters
language
Throws
AppsForYourDomainException if an Apps for your domain API error occurred.
IOException if an error occurs while communicating with the GData service.
ServiceException if the update request failed due to system error.

public GenericEntry setDomainLogo (String base64EncodedImage)

Updates the custom logo with the new image provided.

Parameters
base64EncodedImage Image file in base64 encoding.
Returns
  • GenericEntry an updated GenericEntry with appearance settings
Throws
IOException if an error occurs while communicating with the GData service.
ServiceException if the fetch request failed due to system error.
AppsForYourDomainException if an Apps for your domain API error occurred

public GenericEntry setDomainSecondaryEmailAddress (String adminSecondaryEmail)

Registers the given Email as domain's secondary Email address

Parameters
adminSecondaryEmail Email address
Returns
  • GenericEntry an updated GenericEntry secondary email address.
Throws
IOException if an error occurs while communicating with the GData service.
ServiceException if the fetch request failed due to system error.
AppsForYourDomainException if an Apps for your domain API error occurred

public GenericEntry setOrganizationName (String organizationName)

Set the organization name for the domain

Parameters
organizationName The name of the organization associated with the domain
Throws
IOException if an error occurs while communicating with the GData service.
ServiceException if the update request failed due to system error.
AppsForYourDomainException if an Apps for your domain API error occurred.