Google Data APIs Client Library (1.41.1)



com.google.gdata.client.appsforyourdomain.adminsettings
Class DomainSettingsService

java.lang.Object
  extended by com.google.gdata.client.Service
      extended by com.google.gdata.client.GoogleService
          extended by com.google.gdata.client.appsforyourdomain.AppsForYourDomainService
              extended by com.google.gdata.client.appsforyourdomain.AppsPropertyService
                  extended by com.google.gdata.client.appsforyourdomain.adminsettings.DomainSettingsService
All Implemented Interfaces:
AuthTokenFactory.TokenListener

public class DomainSettingsService
extends AppsPropertyService

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


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gdata.client.GoogleService
GoogleService.AccountDeletedException, GoogleService.AccountDisabledException, GoogleService.CaptchaRequiredException, GoogleService.InvalidCredentialsException, GoogleService.NotVerifiedException, GoogleService.ServiceUnavailableException, GoogleService.SessionExpiredException, GoogleService.TermsNotAgreedException
 
Nested classes/interfaces inherited from class com.google.gdata.client.Service
Service.ClientInputProperties, Service.ClientOutputProperties, Service.ClientStreamProperties, Service.GDataRequest, Service.GDataRequestFactory, Service.Versions
 
Field Summary
protected  java.lang.String accountSettingsUrl
           
protected  java.lang.String appearanceUrl
           
protected  java.lang.String domainBaseUrl
           
protected  java.lang.String generalSettingsUrl
          Base URL for various feeds.
 
Fields inherited from class com.google.gdata.client.appsforyourdomain.AppsForYourDomainService
APPS_SERVICE, DOMAIN_NAME, HTTPS_PROTOCOL
 
Fields inherited from class com.google.gdata.client.Service
connectTimeout, extProfile, metadataRegistry, requestFactory
 
Constructor Summary
DomainSettingsService(java.lang.String domain, java.lang.String applicationName)
          Parameterized constructor to setup a Service object which can be used to initialize the service without obtaining a token.
DomainSettingsService(java.lang.String adminUser, java.lang.String adminPassword, java.lang.String domain, java.lang.String applicationName)
          Parameterized constructor for service authentication.
 
Method Summary
 java.lang.String getCountryCodeForDomain()
          Retrieves the country code for the domain registered.
 java.lang.String getCustomerPIN()
          Retrieves Customer PIN associated with the domain.
 java.lang.String getDefaultLanguage()
          Retrieves the default language for the Google Apps domain
 java.lang.String getDomainCreationTime()
          Gets the time domain was created.
 java.lang.String getDomainEdition()
          Retrieves the domain edition.
 java.lang.String getDomainSecondaryEmailAddress()
          Retrieves the secondary Email address registered with the domain
 java.lang.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
 java.lang.String getOrganizationName()
          Retrieves the organization name associated with the domain
 java.lang.String getSupportPIN()
          Retrieves the Support PIN for the domain.
 GenericEntry setDefaultLanguage(java.lang.String language)
          Sets the default language for Google Apps domain.
 GenericEntry setDomainLogo(java.lang.String base64EncodedImage)
          Updates the custom logo with the new image provided.
 GenericEntry setDomainSecondaryEmailAddress(java.lang.String adminSecondaryEmail)
          Registers the given Email as domain's secondary Email address
 GenericEntry setOrganizationName(java.lang.String organizationName)
          Set the organization name for the domain
 
Methods inherited from class com.google.gdata.client.appsforyourdomain.AppsForYourDomainService
delete, getEntry, getEntry, getFeed, getFeed, insert, query, update
 
Methods inherited from class com.google.gdata.client.GoogleService
addCookie, batch, createRequest, createRequest, delete, getAuthToken, getAuthTokenFactory, getCookieManager, getCookies, getEntry, getFeed, getFeed, getFeed, handleRedirectException, handlesCookies, handleSessionExpiredException, makePostRequest, setAuthSubToken, setAuthSubToken, setAuthTokenFactory, setCookieManager, setHandlesCookies, setOAuthCredentials, setUserCredentials, setUserCredentials, setUserCredentials, setUserCredentials, setUserToken, tokenChanged
 
Methods inherited from class com.google.gdata.client.Service
classOf, createBatchRequest, createDeleteRequest, createEntryRequest, createFeedRequest, createFeedRequest, createInsertRequest, createLinkQueryRequest, createPatchRequest, createUpdateRequest, delete, delete, endVersionScope, getAltRegistry, getContentType, getDefaultAltRegistry, getExtensionProfile, getFeed, getMetadataRegistry, getProtocolVersion, getRequestFactory, getSchema, getServiceVersion, getStreamFromLink, getVersion, initServiceVersion, introspect, parseResponseData, parseResponseData, patch, patch, query, query, setAcceptLanguage, setAltRegistry, setConnectTimeout, setContentType, setExtensionProfile, setHeader, setOAuthProxyHeaders, setPrivateHeader, setProtocolVersion, setReadTimeout, setRequestFactory, setTimeouts, startVersionScope, update, useSsl, writeRequestData, writeRequestData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

generalSettingsUrl

protected java.lang.String generalSettingsUrl
Base URL for various feeds.


domainBaseUrl

protected java.lang.String domainBaseUrl

appearanceUrl

protected java.lang.String appearanceUrl

accountSettingsUrl

protected java.lang.String accountSettingsUrl
Constructor Detail

DomainSettingsService

public DomainSettingsService(java.lang.String domain,
                             java.lang.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

DomainSettingsService

public DomainSettingsService(java.lang.String adminUser,
                             java.lang.String adminPassword,
                             java.lang.String domain,
                             java.lang.String applicationName)
                      throws AuthenticationException
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.
Method Detail

setDefaultLanguage

public GenericEntry setDefaultLanguage(java.lang.String language)
                                throws AppsForYourDomainException,
                                       java.io.IOException,
                                       ServiceException
Sets the default language for Google Apps domain.

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

getDefaultLanguage

public java.lang.String getDefaultLanguage()
                                    throws AppsForYourDomainException,
                                           java.io.IOException,
                                           ServiceException
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.
java.io.IOException - if an error occurs while communicating with the GData service.
ServiceException - if the fetch request failed due to system error.

setOrganizationName

public GenericEntry setOrganizationName(java.lang.String organizationName)
                                 throws AppsForYourDomainException,
                                        java.io.IOException,
                                        ServiceException
Set the organization name for the domain

Parameters:
organizationName - The name of the organization associated with the domain
Throws:
java.io.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.

getOrganizationName

public java.lang.String getOrganizationName()
                                     throws AppsForYourDomainException,
                                            java.net.MalformedURLException,
                                            java.io.IOException,
                                            ServiceException
Retrieves the organization name associated with the domain

Returns:
The name of the organization
Throws:
java.io.IOException - if an error occurs while communicating with the GData service.
java.net.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.

getMaxUserCount

public int getMaxUserCount()
                    throws AppsForYourDomainException,
                           java.net.MalformedURLException,
                           java.io.IOException,
                           ServiceException
Retrieves the maximum number of users that can be created in the domain

Returns:
Maximum users count.
Throws:
java.io.IOException - if an error occurs while communicating with the GData service.
java.net.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.

getDomainVerificationStatus

public java.lang.String getDomainVerificationStatus()
                                             throws AppsForYourDomainException,
                                                    java.net.MalformedURLException,
                                                    java.io.IOException,
                                                    ServiceException
Retrieves the status of verification for the domain.

Returns:
Status of domain verification
Throws:
java.io.IOException - if an error occurs while communicating with the GData service.
java.net.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.

getSupportPIN

public java.lang.String getSupportPIN()
                               throws AppsForYourDomainException,
                                      java.net.MalformedURLException,
                                      java.io.IOException,
                                      ServiceException
Retrieves the Support PIN for the domain.

Returns:
String Support PIN
Throws:
java.io.IOException - if an error occurs while communicating with the GData service.
java.net.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.

getDomainEdition

public java.lang.String getDomainEdition()
                                  throws AppsForYourDomainException,
                                         java.net.MalformedURLException,
                                         java.io.IOException,
                                         ServiceException
Retrieves the domain edition.

Returns:
String Domain edition
Throws:
java.io.IOException - if an error occurs while communicating with the GData service.
java.net.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.

getCustomerPIN

public java.lang.String getCustomerPIN()
                                throws AppsForYourDomainException,
                                       java.net.MalformedURLException,
                                       java.io.IOException,
                                       ServiceException
Retrieves Customer PIN associated with the domain.

Returns:
Customer PIN
Throws:
java.io.IOException - if an error occurs while communicating with the GData service.
java.net.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.

getDomainCreationTime

public java.lang.String getDomainCreationTime()
                                       throws AppsForYourDomainException,
                                              java.net.MalformedURLException,
                                              java.io.IOException,
                                              ServiceException
Gets the time domain was created.

Returns:
Time of domain creation
Throws:
java.io.IOException - if an error occurs while communicating with the GData service.
java.net.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.

getCountryCodeForDomain

public java.lang.String getCountryCodeForDomain()
                                         throws AppsForYourDomainException,
                                                java.net.MalformedURLException,
                                                java.io.IOException,
                                                ServiceException
Retrieves the country code for the domain registered.

Returns:
Country code
Throws:
java.io.IOException - if an error occurs while communicating with the GData service.
java.net.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.

getDomainSecondaryEmailAddress

public java.lang.String getDomainSecondaryEmailAddress()
                                                throws AppsForYourDomainException,
                                                       java.net.MalformedURLException,
                                                       java.io.IOException,
                                                       ServiceException
Retrieves the secondary Email address registered with the domain

Returns:
Secondary Email address
Throws:
java.io.IOException - if an error occurs while communicating with the GData service.
java.net.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.

setDomainSecondaryEmailAddress

public GenericEntry setDomainSecondaryEmailAddress(java.lang.String adminSecondaryEmail)
                                            throws AppsForYourDomainException,
                                                   java.io.IOException,
                                                   ServiceException
Registers the given Email as domain's secondary Email address

Parameters:
adminSecondaryEmail - Email address
Returns:
GenericEntry an updated GenericEntry secondary email address.
Throws:
java.io.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

setDomainLogo

public GenericEntry setDomainLogo(java.lang.String base64EncodedImage)
                           throws java.io.IOException,
                                  AppsForYourDomainException,
                                  ServiceException
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:
java.io.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