|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.client.Service
com.google.gdata.client.GoogleService
com.google.gdata.client.appsforyourdomain.AppsForYourDomainService
com.google.gdata.client.appsforyourdomain.gmailsettings.GmailFilterService
public class GmailFilterService
The GmailFilterService class extends the basic AppsForYourDomainService
abstraction to define a service that is preconfigured for access to the
the Google Apps Gmail Settings API.
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.ClientOutputProperties, Service.GDataRequest, Service.GDataRequestFactory, Service.Versions |
Field Summary | |
---|---|
static java.lang.String |
APPS_APIS_DOMAIN
Domain for sending API requests. |
static java.lang.String |
BATCH_URL_SUFFIX
URL suffix for the Gmail filter batch feed. |
static java.lang.String |
URL_PREFIX
URL prefix for accessing Gmail setting feeds. |
static java.lang.String |
URL_SUFFIX
URL suffix for the single Gmail filter feed. |
Fields inherited from class com.google.gdata.client.appsforyourdomain.AppsForYourDomainService |
---|
APPS_SERVICE, DOMAIN_NAME, HTTPS_PROTOCOL |
Constructor Summary | |
---|---|
GmailFilterService(java.lang.String applicationName)
Constructs a GmailFilterService instance for an application with the name applicationName . |
Method Summary | |
---|---|
GenericFeed |
batch(java.lang.String domain,
GenericFeed feed)
Inserts one or more Gmail filter entries in a single batch operation. |
GenericEntry |
insert(java.lang.String domain,
GenericEntry entry)
Inserts one Gmail filter entry. |
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, delete, getAuthToken, getAuthTokenFactory, getCookieManager, getCookies, getEntry, getFeed, getFeed, getFeed, handlesCookies, makePostRequest, setAuthSubToken, setAuthSubToken, setAuthTokenFactory, setCookieManager, setHandlesCookies, setOAuthCredentials, setUserCredentials, setUserCredentials, setUserCredentials, setUserCredentials, setUserToken, tokenChanged |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String APPS_APIS_DOMAIN
public static final java.lang.String URL_PREFIX
public static final java.lang.String URL_SUFFIX
public static final java.lang.String BATCH_URL_SUFFIX
Constructor Detail |
---|
public GmailFilterService(java.lang.String applicationName)
applicationName
.
applicationName
- the name of the client application accessing the
service. Application names should preferably have
the format [company-id]-[app-name]-[app-version].
The name will be used by the Google servers to
monitor the source of authentication.Method Detail |
---|
public GenericEntry insert(java.lang.String domain, GenericEntry entry) throws java.io.IOException, java.net.MalformedURLException, ServiceException
domain
- the domain into which the filter is being created.entry
- an GenericEntry
object containing all the properties
of a Gmail filter.
java.io.IOException
- if an error occurs while communicating with the GData
service.
java.net.MalformedURLException
- if the batch feed URL cannot be constructed.
ServiceException
- if the insert request failed due to system error.public GenericFeed batch(java.lang.String domain, GenericFeed feed) throws BatchInterruptedException, java.io.IOException, java.net.MalformedURLException, ServiceException
batch
instead of repeated calls to #insert
is helpful in
reducing HTTP overhead.
domain
- the domain into which filters are being created.feed
- a feed containing one or more GenericEntry
objects
containing all the properties of Gmail filters,
each of which has been tagged with
BatchUtils#setBatchId(com.google.gdata.data.BaseEntry,
String)
. The batch operation type of each entry must be
BatchOperationType.INSERT
; however, there should be no
need to call BatchUtils#setBatchOperationType(
com.google.gdata.data.BaseEntry, BatchOperationType)
on each
entry, as this operation is already the default.
GenericEntry
object.
java.io.IOException
- if an error occurs while communicating with the GData
service.
java.net.MalformedURLException
- if the batch feed URL cannot be constructed.
ServiceException
- if the insert request failed due to system error.
BatchInterruptedException
- if an irrecoverable error was detected
by the server while parsing the request,
like invalid XML data. Some operations
might have succeeded when this exception
is thrown. Check BatchInterruptedException.getFeed()
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |