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.TermsNotAgreedExceptionService.ClientInputProperties, Service.ClientOutputProperties, Service.ClientStreamProperties, Service.GDataRequest, Service.GDataRequestFactory, Service.Versions| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
domainUrlBase |
protected java.lang.String |
emailBaseUrl |
APPS_SERVICE, DOMAIN_NAME, HTTPS_PROTOCOLconnectTimeout, extProfile, metadataRegistry, requestFactory| 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, getAllPages, getEntry, getEntry, getFeed, getFeed, insert, query, updateaddCookie, 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, tokenChangedclassOf, 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, writeRequestDataprotected java.lang.String domainUrlBase
protected java.lang.String emailBaseUrl
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
AppsForYourDomainExceptionjava.io.IOExceptionServiceExceptionjava.net.MalformedURLExceptionpublic 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.MalformedURLExceptionpublic 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.