com.google.gdata.client.appsforyourdomain.adminsettings
Class EmailManagementService
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
- All Implemented Interfaces:
- AuthTokenFactory.TokenListener
public class EmailManagementService
- extends AppsPropertyService
Specialization of AppsPropertyService
for managing Email migration,
routing and outbound gateway settings of a domain.
Constructor Summary |
EmailManagementService(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. |
EmailManagementService(java.lang.String adminEmail,
java.lang.String password,
java.lang.String domain,
java.lang.String applicationName)
Parameterized constructor for service authentication. |
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, getStrictValidation, getVersion, initServiceVersion, introspect, parseResponseData, parseResponseData, patch, patch, query, query, setAcceptLanguage, setAltRegistry, setConnectTimeout, setContentType, setExtensionProfile, setHeader, setOAuthProxyHeaders, setPrivateHeader, setProtocolVersion, setReadTimeout, setRequestFactory, setStrictValidation, setTimeouts, startVersionScope, update, useSsl, writeRequestData, writeRequestData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
domainUrlBase
protected java.lang.String domainUrlBase
emailBaseUrl
protected java.lang.String emailBaseUrl
EmailManagementService
public EmailManagementService(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 configuredapplicationName
- Application name consuming the API
EmailManagementService
public EmailManagementService(java.lang.String adminEmail,
java.lang.String password,
java.lang.String domain,
java.lang.String applicationName)
throws AuthenticationException
- Parameterized constructor for service authentication.
- Parameters:
adminEmail
- the email id of the administrator.password
- the administrator password.domain
- the domain name to be configured.
- Throws:
AuthenticationException
- if an authentication related error occurs.
isUserMigrationEnabled
public boolean isUserMigrationEnabled()
throws AppsForYourDomainException,
java.net.MalformedURLException,
java.io.IOException,
ServiceException
- Retrieves the migration access settings
- Returns:
- true, if user migration access is enabled.
- Throws:
AppsForYourDomainException
java.io.IOException
ServiceException
java.net.MalformedURLException
setUserMigrationAccess
public void setUserMigrationAccess(boolean enableUserMigration)
throws AppsForYourDomainException,
java.io.IOException,
ServiceException
- 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.
java.io.IOException
- if an error occurs while communicating with the GData
service.
ServiceException
- if the fetch request failed due to system error.
retrieveOutboundGatewaySettings
public GenericEntry retrieveOutboundGatewaySettings()
throws AppsForYourDomainException,
java.net.MalformedURLException,
java.io.IOException,
ServiceException
- 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.
java.io.IOException
- if an error occurs while communicating with the GData
service.
ServiceException
- if the fetch request failed due to system error.
java.net.MalformedURLException
updateOutboundGatewaySettings
public GenericEntry updateOutboundGatewaySettings(java.lang.String smartHost,
java.lang.String smtpMode)
throws AppsForYourDomainException,
java.io.IOException,
ServiceException
- 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.
java.io.IOException
- if an error occurs while communicating with the GData
service.
ServiceException
- if the fetch request failed due to system error.
retrieveEmailRoutingSettings
public GenericFeed retrieveEmailRoutingSettings()
throws AppsForYourDomainException,
java.io.IOException,
ServiceException
- 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.
java.io.IOException
- if an error occurs while communicating with the GData
service.
ServiceException
- if the fetch request failed due to system error.