public class EmailManagementService extends AppsPropertyService
AppsPropertyService
for managing Email migration,
routing and outbound gateway settings of a domain.GoogleService.AccountDeletedException, GoogleService.AccountDisabledException, GoogleService.CaptchaRequiredException, GoogleService.InvalidCredentialsException, GoogleService.NotVerifiedException, GoogleService.ServiceUnavailableException, GoogleService.SessionExpiredException, GoogleService.TermsNotAgreedException
Service.ClientOutputProperties, Service.GDataRequest, Service.GDataRequestFactory, Service.Versions
APPS_SERVICE, DOMAIN_NAME, HTTPS_PROTOCOL
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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(java.lang.String smartHost,
java.lang.String smtpMode)
Updates the outbound gateway settings for the domain.
|
delete, getEntry, getEntry, getFeed, getFeed, insert, query, update
addCookie, batch, createRequest, delete, getAuthToken, getAuthTokenFactory, getCookieManager, getCookies, getEntry, getFeed, getFeed, getFeed, handlesCookies, makePostRequest, setAuthSubToken, setAuthSubToken, setAuthTokenFactory, setCookieManager, setHandlesCookies, setOAuthCredentials, setUserCredentials, setUserCredentials, setUserCredentials, setUserCredentials, setUserToken, tokenChanged
createBatchRequest, createDeleteRequest, createEntryRequest, createFeedRequest, createFeedRequest, createInsertRequest, createLinkQueryRequest, createPatchRequest, createUpdateRequest, delete, delete, getAltRegistry, getContentType, getDefaultAltRegistry, getExtensionProfile, getFeed, getMetadataRegistry, getProtocolVersion, getRequestFactory, getSchema, getServiceVersion, getStreamFromLink, getStrictValidation, getVersion, introspect, parseResponseData, patch, patch, query, query, setAcceptLanguage, setAltRegistry, setConnectTimeout, setContentType, setExtensionProfile, setHeader, setOAuthProxyHeaders, setPrivateHeader, setProtocolVersion, setReadTimeout, setRequestFactory, setStrictValidation, setTimeouts, update, useSsl, writeRequestData
public EmailManagementService(java.lang.String domain, java.lang.String applicationName)
setUserCredentials
or setUserToken
when using this constructor.domain
- Domain being configuredapplicationName
- Application name consuming the APIpublic EmailManagementService(java.lang.String adminEmail, java.lang.String password, java.lang.String domain, java.lang.String applicationName) throws AuthenticationException
adminEmail
- the email id of the administrator.password
- the administrator password.domain
- the domain name to be configured.AuthenticationException
- if an authentication related error occurs.public boolean isUserMigrationEnabled() throws AppsForYourDomainException, java.net.MalformedURLException, java.io.IOException, ServiceException
AppsForYourDomainException
java.io.IOException
ServiceException
java.net.MalformedURLException
public void setUserMigrationAccess(boolean enableUserMigration) throws AppsForYourDomainException, java.io.IOException, ServiceException
enableUserMigration
- If true, user migration access is granted.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.public GenericEntry retrieveOutboundGatewaySettings() throws AppsForYourDomainException, java.net.MalformedURLException, java.io.IOException, ServiceException
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
public GenericEntry updateOutboundGatewaySettings(java.lang.String smartHost, java.lang.String smtpMode) throws AppsForYourDomainException, java.io.IOException, ServiceException
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.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.public GenericFeed retrieveEmailRoutingSettings() throws AppsForYourDomainException, java.io.IOException, ServiceException
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.