public class

EmailManagementService

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.EmailManagementService

Class Overview

Specialization of AppsPropertyService for managing Email migration, routing and outbound gateway settings of a domain.

Summary

[Expand]
Inherited Constants
From class com.google.gdata.client.appsforyourdomain.AppsForYourDomainService
Fields
protected String domainUrlBase
protected String emailBaseUrl
[Expand]
Inherited Fields
From class com.google.gdata.client.GoogleService
From class com.google.gdata.client.Service
Public Constructors
EmailManagementService(String domain, String applicationName)
Parameterized constructor to setup a Service object which can be used to initialize the service without obtaining a token.
EmailManagementService(String adminEmail, String password, String domain, String applicationName)
Parameterized constructor for service authentication.
Public Methods
boolean isUserMigrationEnabled()
Retrieves the migration access settings
GenericFeed retrieveEmailRoutingSettings()
Retrieves all configured email routing settings as a GenericFeed.
GenericEntry retrieveOutboundGatewaySettings()
Retrieves the outbound gateway settings for the domain.
void setUserMigrationAccess(boolean enableUserMigration)
Grants email migration access to users.
GenericEntry updateOutboundGatewaySettings(String smartHost, String smtpMode)
Updates the outbound gateway settings 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 domainUrlBase

protected String emailBaseUrl

Public Constructors

public EmailManagementService (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 EmailManagementService (String adminEmail, String password, String domain, String applicationName)

Parameterized constructor for service authentication.

Parameters
adminEmail The email id of the administrator.
password The administrator password.
domain The domain name to be configured.
applicationName
Throws
AuthenticationException if an authentication related error occurs.

Public Methods

public boolean isUserMigrationEnabled ()

Retrieves the migration access settings

Returns
  • true, if user migration access is enabled.
Throws
ServiceException
AppsForYourDomainException
IOException
MalformedURLException

public GenericFeed retrieveEmailRoutingSettings ()

Retrieves all configured email routing settings as a GenericFeed.

Returns
  • GenericFeed a GenericFeed with email routing settings.
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 GenericEntry retrieveOutboundGatewaySettings ()

Retrieves the outbound gateway settings for the domain.

Returns
  • GenericEntry a updated GenericEntry instance with outbound gateway settings.
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.
MalformedURLException

public void setUserMigrationAccess (boolean enableUserMigration)

Grants email migration access to users.

Parameters
enableUserMigration If true, user migration access is granted.
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 GenericEntry updateOutboundGatewaySettings (String smartHost, String smtpMode)

Updates the outbound gateway settings for the domain.

Parameters
smartHost Either the IP address or hostname of your SMTP server. Google Apps routes outgoing mail to this server.
smtpMode The default value is SMTP. Another value, SMTP_TLS, secures a TLS connection with TLS when delivering the message.
Returns
  • GenericEntry a updated GenericEntry instance with outbound gateway settings.
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.