|
|||||||||
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.media.MediaService
com.google.gdata.client.docs.DocsService
public class DocsService
Extends the basic MediaService
abstraction to define a service that
is preconfigured for access to the Google Documents List data API.
Nested Class Summary | |
---|---|
static class |
DocsService.Versions
GData versions supported by Google Documents List Service. |
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.GDataRequest, Service.GDataRequestFactory |
Field Summary | |
---|---|
static Version |
DEFAULT_VERSION
Default GData version used by the Google Documents List service. |
static java.lang.String |
DOCS_SERVICE
The abbreviated name of Google Documents List recognized by Google. |
static java.lang.String |
DOCS_SERVICE_VERSION
The version ID of the service. |
Fields inherited from class com.google.gdata.client.media.MediaService |
---|
DEFAULT_CHUNKED_BUFFER_SIZE, NO_CHUNKED_MEDIA_REQUEST |
Fields inherited from class com.google.gdata.client.Service |
---|
connectTimeout, extProfile, requestFactory |
Constructor Summary | |
---|---|
DocsService(java.lang.String applicationName)
Constructs an instance connecting to the Google Documents List service for an application with the name applicationName . |
|
DocsService(java.lang.String applicationName,
Service.GDataRequestFactory requestFactory,
AuthTokenFactory authTokenFactory)
Constructs an instance connecting to the Google Documents List service for an application with the name applicationName and the given GDataRequestFactory and AuthTokenFactory . |
|
DocsService(java.lang.String applicationName,
java.lang.String protocol,
java.lang.String domainName)
Constructs an instance connecting to the Google Documents List service with name serviceName for an application with the name applicationName . |
Method Summary | |
---|---|
void |
addExtensions()
Adds the Google Docs extensions. |
void |
delete(java.net.URL aclFeedUrl,
AclScope scope)
Deletes an existing AclEntry from the specified feed URL. |
java.lang.String |
getServiceVersion()
Returns information about the service version. |
static Version |
getVersion()
Returns the current GData version used by the Google Documents List service. |
AclEntry |
insert(java.net.URL aclFeedUrl,
AclScope scope,
AclRole role)
Inserts a new AclEntry into a feed
associated with the target service. |
AclEntry |
update(java.net.URL aclFeedUrl,
AclScope scope,
AclRole role)
Updates an existing AclEntry by writing
it to the specified feed URL. |
Methods inherited from class com.google.gdata.client.media.MediaService |
---|
getMedia, getMedia, insert, insert, setChunkedMediaUpload, updateMedia, updateMedia |
Methods inherited from class com.google.gdata.client.GoogleService |
---|
addCookie, createRequest, createRequest, delete, delete, getAuthToken, getAuthTokenFactory, getCookieManager, getCookies, getEntry, getEntry, getFeed, getFeed, getFeed, getFeed, handleRedirectException, handlesCookies, handleSessionExpiredException, makePostRequest, setAuthSubToken, setAuthSubToken, setAuthTokenFactory, setCookieManager, setHandlesCookies, setOAuthCredentials, setUserCredentials, setUserCredentials, setUserToken, tokenChanged, update |
Methods inherited from class com.google.gdata.client.Service |
---|
batch, closeSource, createBatchRequest, createDeleteRequest, createEntryRequest, createFeedRequest, createFeedRequest, createInsertRequest, createUpdateRequest, delete, delete, endVersionScope, getContentType, getEntry, getExtensionProfile, getFeed, getFeed, getProtocolVersion, getRequestFactory, getStreamFromLink, initServiceVersion, introspect, parseEntry, query, query, query, setAcceptLanguage, setConnectTimeout, setContentType, setExtensionProfile, setProtocolVersion, setReadTimeout, setRequestFactory, setTimeouts, startVersionScope, update, useSsl |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DOCS_SERVICE
public static final java.lang.String DOCS_SERVICE_VERSION
public static final Version DEFAULT_VERSION
Constructor Detail |
---|
public DocsService(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.public DocsService(java.lang.String applicationName, Service.GDataRequestFactory requestFactory, AuthTokenFactory authTokenFactory)
applicationName
and the given GDataRequestFactory
and AuthTokenFactory
. Use this constructor to
override the default factories.
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.requestFactory
- the request factory that generates gdata request
objectsauthTokenFactory
- the factory that creates auth tokenspublic DocsService(java.lang.String applicationName, java.lang.String protocol, java.lang.String domainName)
serviceName
for an application with the name applicationName
. The service will authenticate at the provided domainName
.
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.protocol
- name of protocol to use for authentication
("http"/"https")domainName
- the name of the domain hosting the login handlerMethod Detail |
---|
public java.lang.String getServiceVersion()
Service
getServiceVersion
in class Service
public static Version getVersion()
public void addExtensions()
public AclEntry insert(java.net.URL aclFeedUrl, AclScope scope, AclRole role) throws java.io.IOException, ServiceException
AclEntry
into a feed
associated with the target service. It will return the inserted AclEntry,
including any additional attributes or extensions set by the GData server.
This is a convenience method. It constructs the AclEntry from the specified AclScope and AclRole.
aclFeedUrl
- the POST URL associated with the target acl feedscope
- the scope of the new aclrole
- the desired role for scope
java.io.IOException
- an ill-formed URI, internal error. See
makeEntryUrl
ServiceException
- insert request failed due to lack of
permissions, scope already defined on this feed, unsupported role or scope,
system error, etcpublic AclEntry update(java.net.URL aclFeedUrl, AclScope scope, AclRole role) throws java.io.IOException, ServiceException
AclEntry
by writing
it to the specified feed URL. The resulting AclEntry (after update)
will be returned.
This is a convenience method. It constructs the entry edit URL from the feed URL and scope, and also constructs the AclEntry.
aclFeedUrl
- the POST URL associated with the target acl feedscope
- the scope of the to-be-updated aclrole
- the desired role for scope
java.io.IOException
- an ill-formed URI, internal error. See
makeEntryUrl
ServiceException
- update request failed due to lack of
permissions, unsupported role or scope, system error, etcpublic void delete(java.net.URL aclFeedUrl, AclScope scope) throws java.io.IOException, ServiceException
This is a convenience method. It constructs the entry edit URL from the feed URL and scope.
aclFeedUrl
- the POST URI associated with the target acl feedscope
- the scope of the to-be-deleted acl
java.io.IOException
- an ill-formed URI, internal error. See
makeEntryUrl
ServiceException
- delete request failed due to lack of
permissions, unsupported role or scope, system error, etc
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |