| java.lang.Object | |
| ↳ | com.google.gdata.client.Service |
Known Direct Subclasses
|
The Service class represents a client connection to a GData service. It encapsulates all protocol-level interactions with the GData server and acts as a helper class for higher level entities (feeds, entries, etc) that invoke operations on the server and process their results.
This class provides the base level common functionality required to access any GData service. It is also designed to act as a base class that can be customized for specific types of GData services. Examples of supported customizations include:
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Service.ClientInputProperties | The ClientInputProperties class is an adaptor class that implements the
InputProperties interface for content to be read from the target
service based upon its attributes and a Service.GDataRequest. |
||||||||||
| Service.ClientOutputProperties | The ClientOutputProperties class is an adaptor class that implements
the OutputProperties interface for content to be written to the
target service based upon its attributes and a Service.GDataRequest. |
||||||||||
| Service.ClientStreamProperties | The ClientStreamProperties class is an abstract adaptor class that
implements the StreamProperties interface for content to be written
to or read from the target service based upon its attributes and a
Service.GDataRequest. |
||||||||||
| Service.GDataRequest | The GDataRequest interface represents a streaming connection to a GData service that can be used either to send request data to the service using an OutputStream (or XmlWriter for XML content) or to receive response data from the service as an InputStream (or ParseSource for XML data). | ||||||||||
| Service.GDataRequestFactory | The GDataRequestFactory interface defines a basic factory interface for constructing a new GDataRequest interface. | ||||||||||
| Service.Versions | The Versions class defines Version constants representing the set
of active versions of the GData core protocol and common data model
classes. |
||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| BASE_REGISTRY | The DEFAULT_REGISTRY contains the default set of representations and associated parser/generator configurations for all services. | ||||||||||
| CORE_VERSION | Initializes the default client version for the GData core protocol. | ||||||||||
| SERVICE_VERSION | |||||||||||
| altRegistry | The alternate representation registry that describes formats supported by the remote GData service. | ||||||||||
| connectTimeout | Client-configured connection timeout value. | ||||||||||
| contentType | Content type of data posted to the GData service. | ||||||||||
| extProfile | |||||||||||
| metadataRegistry | |||||||||||
| protocolVersion | The version of the service protocol to use for this service instance. | ||||||||||
| readTimeout | Client configured read timeout value. | ||||||||||
| requestFactory | The GDataRequestFactory associated with this service. | ||||||||||
| strictValidation | |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new Service instance that is configured to accept arbitrary
extension data within feed or entry elements.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Executes several operations (insert, update or delete) on the entries that
are part of the input
IFeed. | |||||||||||
Creates a new GDataRequest that can be used to execute several
insert/update/delete operations in one request by writing a feed into the
request stream to read a feed containing the result of the batch operations
from the response stream.
| |||||||||||
Creates a new GDataRequest that can be used to delete an Atom entry.
| |||||||||||
Returns a GDataRequest instance that can be used to access an entry's
contents as a stream, given the URL of the entry.
| |||||||||||
Executes a GData feed request against the target service and returns the
resulting feed results via an input stream.
| |||||||||||
Executes a GData query request against the target service and returns the
resulting feed results via an input stream.
| |||||||||||
Creates a new GDataRequest that can be used to insert a new entry into a
feed using the request stream and to read the resulting entry content from
the response stream.
| |||||||||||
Returns a query (GET) request that targets the provided link.
| |||||||||||
Creates a new GDataRequest that can be used to update an existing Atom
entry.
| |||||||||||
Creates a new GDataRequest for use by the service.
| |||||||||||
Creates a new GDataRequest that can be used to update an existing Atom
entry.
| |||||||||||
Deletes an existing entry (and associated media content, if any) using the
specified edit URL.
| |||||||||||
Deletes an existing entry (and associated media content, if any) using the
specified edit URL.
| |||||||||||
Deletes an existing entry (and associated media content, if any) using the
specified edit URI.
| |||||||||||
Deletes an existing entry (and associated media content, if any) using the
specified edit URI.
| |||||||||||
Returns the alternate registration registry that describes representations
that may be parsed from or generated to the remote GData service.
| |||||||||||
Returns the default ContentType for data associated with this GData
service.
| |||||||||||
Returns an
AltRegistry instance that is configured with the
default parser/generator configuration for a media service. | |||||||||||
Returns an Atom entry instance given the URL of the entry, if its current
entity tag is different than the provided value.
| |||||||||||
Returns an Atom entry instance, given the URL of the entry.
| |||||||||||
Returns an Atom entry instance, given the URL of the entry and an
if-modified-since date.
| |||||||||||
Returns the
ExtensionProfile that defines any expected extensions
to the base RSS/Atom content model. | |||||||||||
Returns the Feed associated with a particular feed URL.
| |||||||||||
Returns the Feed associated with a particular feed URL, if it's been
modified since the specified date.
| |||||||||||
Returns the Feed resulting from executing a query, if it's been modified
since the specified date.
| |||||||||||
Returns the Feed associated with a particular feed URL if the entity tag
associated with it has changed.
| |||||||||||
Returns the feed resulting from execution of a query.
| |||||||||||
Returns the Feed resulting from query execution, if if the entity tag
associated with it has changed.
| |||||||||||
Returns the
MetadataRegistry that defines the expected metadata. | |||||||||||
Returns the service protocol version that will be used for requests
generated by this service.
| |||||||||||
Returns the GDataRequestFactory currently associated with the service.
| |||||||||||
Returns the
Schema that contains the metadata about
element types parsed or generated by this service. | |||||||||||
Returns information about the service version.
| |||||||||||
This method is deprecated.
Use
createLinkQueryRequest(ILink) instead.
| |||||||||||
Returns
true if strict validation is enabled for
this service. | |||||||||||
Returns the current
Version of the GData core protocol. | |||||||||||
Inserts a new
IEntry into a feed associated
with the target service. | |||||||||||
Returns the Atom introspection Service Document associated with a
particular feed URL.
| |||||||||||
Parses the response stream for a request based upon request properties and
an expected result type.
| |||||||||||
Patches an existing
IEntry by removing a set of selected fields and
then merging a partial entry representation into the resource at the
specified entry edit URL. | |||||||||||
Patches an existing
IEntry by removing a set of selected fields and
then merging a partial entry representation into the resource at the
specified entry edit URL. | |||||||||||
Executes a GData query against the target service and returns the
IFeed containing entries that match the query result if the etag
for the target feed does not match the provided value. | |||||||||||
Executes a GData query against the target service and returns the
IFeed containing entries that match the query result, if it's been
modified since the specified date. | |||||||||||
Executes a GData query against the target service and returns the
IFeed containing entries that match the query result. | |||||||||||
Defines the languages accepted by the application.
| |||||||||||
Sets the default wait timeout (in milliseconds) for a connection to the
remote GData service.
| |||||||||||
Sets the default ContentType for writing data to the GData service.
| |||||||||||
Sets the
ExtensionProfile that defines any expected extensions to
the base RSS/Atom content model. | |||||||||||
Set a header that will be included in all requests.
| |||||||||||
Adds OAuth Proxy-related headers to the request.
| |||||||||||
Set a header that will be included in all requests and do not log the
value.
| |||||||||||
Sets the service protocol version that will be used for requests associated
with this service.
| |||||||||||
Sets the default wait timeout (in milliseconds) for a response from the
remote GData service.
| |||||||||||
Sets the GDataRequestFactory currently associated with the service.
| |||||||||||
Enables or disables strict validation.
| |||||||||||
Sets timeout value for GDataRequest.
| |||||||||||
Updates an existing
IEntry by writing it to
the specified entry edit URL. | |||||||||||
Updates an existing
IEntry by writing it to the specified entry
edit URL. | |||||||||||
Sets the HttpGDataRequest.Factory associate with the service
to use secure connections.
| |||||||||||
Writes the request body to the target service based upon the attributes of
the request and the source object.
| |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new GDataRequest for querying the service.
| |||||||||||
Initializes the version information for a specific service type.
| |||||||||||
Parses the response stream for a request based upon response content type
and an expected result type.
| |||||||||||
Writes the request body to the target service based upon requested
output properties and the source object.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
The DEFAULT_REGISTRY contains the default set of representations and
associated parser/generator configurations for all services. It will be
used as the default configuration for all Service instances unless
setAltRegistry(AltRegistry) is called.
Initializes the default client version for the GData core protocol.
The alternate representation registry that describes formats supported by the remote GData service.
Client-configured connection timeout value. A value of -1 indicates the client has not set any timeout.
Content type of data posted to the GData service. Defaults to Atom using UTF-8 character set.
The version of the service protocol to use for this service instance. It
will be initialized to the service default version but can be set
explicitly by calling setProtocolVersion(Version).
Client configured read timeout value. A value of -1 indicates the client has not set any timeout.
The GDataRequestFactory associated with this service. The default is the base HttpGDataRequest Factory class.
Constructs a new Service instance that is configured to accept arbitrary extension data within feed or entry elements.
Executes several operations (insert, update or delete) on the entries that
are part of the input IFeed. It will return another feed that
describes what was done while executing these operations.
It is possible for one batch operation to fail even though other operations
have worked, so this method won't throw a ServiceException unless something
really wrong is going on. You need to check the entries in the returned
feed to know which operations succeeded and which operations failed (see
BatchStatus and
BatchInterrupted extensions.)
| feedUrl | The POST URI associated with the target feed. |
|---|---|
| inputFeed | A description of the operations to execute, described using tags in the batch: namespace |
| IOException | error communicating with the GData service. |
|---|---|
| ParseException | error parsing the return entry data. |
| ServiceException | insert request failed due to system error. |
| BatchInterruptedException | if something really wrong was detected by
the server while parsing the request, like invalid XML data. Some
operations might have succeeded when this exception is thrown.
Check getIFeed(). |
Creates a new GDataRequest that can be used to execute several insert/update/delete operations in one request by writing a feed into the request stream to read a feed containing the result of the batch operations from the response stream.
Clients should be sure to call end() on the
returned request once they have finished using it.
| feedUrl | The POST URI associated with the target feed. |
|---|
| IOException | error reading from or writing to the GData service. |
|---|---|
| ServiceException | insert request failed. |
Creates a new GDataRequest that can be used to delete an Atom entry. For delete requests, no input is expected from the request stream nor will any response data be returned.
Clients should be sure to call end() on the
returned request once they have finished using it.
| entryUrl | The edit URL associated with the entry. |
|---|
| IOException | error communicating with the GData service. |
|---|---|
| ServiceException | creation of delete request failed. |
Returns a GDataRequest instance that can be used to access an entry's contents as a stream, given the URL of the entry.
Clients should be sure to call end() on the
returned request once they have finished using it.
| entryUrl | Resource URL for the entry. |
|---|
| IOException | error communicating with the GData service. |
|---|---|
| ServiceException | entry request creation failed. |
Executes a GData feed request against the target service and returns the resulting feed results via an input stream.
| feedUrl | URL that defines target feed. |
|---|
| IOException | error communicating with the GData service. |
|---|---|
| ServiceException | creation of query feed request failed. |
Executes a GData query request against the target service and returns the resulting feed results via an input stream.
Clients should be sure to call end() on the
returned request once they have finished using it.
| query | Feed query. |
|---|
| IOException | error communicating with the GData service. |
|---|---|
| ServiceException | creation of query feed request failed. |
Creates a new GDataRequest that can be used to insert a new entry into a feed using the request stream and to read the resulting entry content from the response stream.
Clients should be sure to call end() on the
returned request once they have finished using it.
| feedUrl | The POST URI associated with the target feed. |
|---|
| IOException | error reading from or writing to the GData service. |
|---|---|
| ServiceException | insert request failed. |
Returns a query (GET) request that targets the provided link. This can be used to execute the request and access the link's content via the response stream of the request (if successful).
Clients should be sure to call end() on the
returned request once they have finished using it.
| link | Link to target resource for created request |
|---|
| IOException | error communicating with the GData service. |
|---|---|
| ServiceException | creation of query request failed. |
Creates a new GDataRequest that can be used to update an existing Atom entry. The updated entry content can be written to the GDataRequest request stream and the resulting updated entry can be obtained from the GDataRequest response stream.
Clients should be sure to call end() on the
returned request once they have finished using it.
| entryUrl | The edit URL associated with the entry. |
|---|
| IOException | error communicating with the GData service. |
|---|---|
| ServiceException | creation of update request failed. |
Creates a new GDataRequest for use by the service.
Clients should be sure to call end() on the
returned request once they have finished using it.
| type | |
|---|---|
| requestUrl | |
| inputType |
| IOException | |
|---|---|
| ServiceException |
Creates a new GDataRequest that can be used to update an existing Atom entry. The updated entry content can be written to the GDataRequest request stream and the resulting updated entry can be obtained from the GDataRequest response stream.
Clients should be sure to call end() on the
returned request once they have finished using it.
| entryUrl | The edit URL associated with the entry. |
|---|
| IOException | error communicating with the GData service. |
|---|---|
| ServiceException | creation of update request failed. |
Deletes an existing entry (and associated media content, if any) using the specified edit URL. This delete is conditional upon the provided tag matching the current entity tag for the entry. If (and only if) they match, the deletion will be performed.
| resourceUrl | The edit or medit edit url associated with the resource. |
|---|---|
| etag | The entity tag value that is the expected value for the target
resource. A value of null will not set an etag
precondition and a value of "*" will perform an
unconditional delete. |
| IOException | error communicating with the GData service. |
|---|---|
| ResourceNotFoundException | invalid entry URL. |
| ServiceException | delete request failed due to system error. |
Deletes an existing entry (and associated media content, if any) using the specified edit URL.
| resourceUrl | The edit or medit edit url associated with the resource. |
|---|
| IOException | error communicating with the GData service. |
|---|---|
| ResourceNotFoundException | invalid entry URL. |
| ServiceException | delete request failed due to system error. |
Deletes an existing entry (and associated media content, if any) using the specified edit URI. This delete is conditional upon the provided tag matching the current entity tag for the entry. If (and only if) they match, the deletion will be performed.
| resourceUri | The edit or medit edit URI associated with the resource. |
|---|---|
| etag | The entity tag value that is the expected value for the target
resource. A value of null will not set an etag
precondition and a value of "*" will perform an
unconditional delete. |
| IOException | error communicating with the GData service. |
|---|---|
| ResourceNotFoundException | invalid entry URI. |
| ServiceException | delete request failed due to system error. |
Deletes an existing entry (and associated media content, if any) using the specified edit URI.
| resourceUri | The edit or medit edit URI associated with the resource. |
|---|
| IOException | error communicating with the GData service. |
|---|---|
| ResourceNotFoundException | invalid entry URI. |
| ServiceException | delete request failed due to system error. |
Returns the alternate registration registry that describes representations that may be parsed from or generated to the remote GData service.
Returns the default ContentType for data associated with this GData service.
Returns an AltRegistry instance that is configured with the
default parser/generator configuration for a media service.
Returns an Atom entry instance given the URL of the entry, if its current entity tag is different than the provided value.
| entryUrl | Resource URL for the entry. |
|---|---|
| entryClass | Class used to represent service entries,
not null. |
| etag | Used to provide an entity tag that indicates the entry should
be returned only if the entity tag of the current representation is
different from the provided value. A value of null indicates
unconditional return. |
| IOException | error communicating with the GData service. |
|---|---|
| NotModifiedException | if the entry resource entity tag matches the provided value. |
| ParseException | error parsing the returned entry. |
| ResourceNotFoundException | if the entry URL is not valid. |
| ServiceForbiddenException | if the GData service cannot get the entry resource due to access constraints. |
| ServiceException | if a system error occurred when retrieving the entry. |
Returns an Atom entry instance, given the URL of the entry.
| entryUrl | Resource URL for the entry. |
|---|---|
| entryClass | Class used to represent service entries,
not null. |
| IOException | error communicating with the GData service. |
|---|---|
| ParseException | error parsing the returned entry. |
| ResourceNotFoundException | if the entry URL is not valid. |
| ServiceForbiddenException | if the GData service cannot get the entry resource due to access constraints. |
| ServiceException | if a system error occurred when retrieving the entry. |
Returns an Atom entry instance, given the URL of the entry and an if-modified-since date.
| entryUrl | Resource URL for the entry. |
|---|---|
| entryClass | Class used to represent service entries,
not null. |
| ifModifiedSince | Used to set a precondition date that indicates the
entry should be returned only if it has been modified after the
specified date. A value of null indicates no precondition. |
| IOException | error communicating with the GData service. |
|---|---|
| NotModifiedException | if the entry resource has not been modified after the specified precondition date. |
| ParseException | error parsing the returned entry. |
| ResourceNotFoundException | if the entry URL is not valid. |
| ServiceForbiddenException | if the GData service cannot get the entry resource due to access constraints. |
| ServiceException | if a system error occurred when retrieving the entry. |
Returns the ExtensionProfile that defines any expected extensions
to the base RSS/Atom content model.
Returns the Feed associated with a particular feed URL.
| feedUrl | The URL associated with a feed. This URL can include GData query parameters. |
|---|---|
| feedClass | The class used to represent a service Feed. |
| IOException | error sending request or reading the feed. |
|---|---|
| ParseException | error parsing the returned feed data. |
| ResourceNotFoundException | invalid feed URL. |
| ServiceException | system error retrieving feed. |
Returns the Feed associated with a particular feed URL, if it's been modified since the specified date.
| feedUrl | The URL associated with a feed. This URL can include GData query parameters. |
|---|---|
| feedClass | The class used to represent a service Feed. |
| ifModifiedSince | Used to set a precondition date that indicates the
feed should be returned only if it has been modified after the
specified date. A value of null indicates no precondition. |
| IOException | error sending request or reading the feed. |
|---|---|
| NotModifiedException | if the feed resource has not been modified since the specified precondition date. |
| ParseException | error parsing the returned feed data. |
| ResourceNotFoundException | invalid feed URL. |
| ServiceException | system error retrieving feed. |
Returns the Feed resulting from executing a query, if it's been modified since the specified date.
| query | Feed query. |
|---|---|
| feedClass | The class used to represent a service Feed. |
| ifModifiedSince | Used to set a precondition date that indicates the
feed should be returned only if it has been modified after the
specified date. A value of null indicates no precondition. |
| IOException | error sending request or reading the feed. |
|---|---|
| ServiceException | system error retrieving feed. |
Returns the Feed associated with a particular feed URL if the entity tag associated with it has changed.
| feedUrl | The URL associated with a feed. This URL can include GData query parameters. |
|---|---|
| feedClass | The class used to represent a service Feed. |
| etag | Used to provide an entity tag that indicates the feed should be
returned only if the entity tag of the current representation is
different from the provided value. A value of null indicates
unconditional return. |
| IOException | error sending request or reading the feed. |
|---|---|
| NotModifiedException | if the feed resource entity tag matches the provided value. |
| ParseException | error parsing the returned feed data. |
| ResourceNotFoundException | invalid feed URL. |
| ServiceException | system error retrieving feed. |
Returns the feed resulting from execution of a query.
| query | Feed query. |
|---|---|
| feedClass | The class used to represent query results. |
| IOException | error sending request or reading the feed. |
|---|---|
| ParseException | error parsing the returned feed data. |
| ResourceNotFoundException | invalid feed URL. |
| ServiceException | system error retrieving feed. |
Returns the Feed resulting from query execution, if if the entity tag associated with it has changed.
| query | Feed query. |
|---|---|
| feedClass | The class used to represent query results. |
| etag | Used to provide an entity tag that indicates the feed should be
returned only if the entity tag of the current representation is
different from the provided value. A value of null indicates
unconditional return. |
| IOException | error sending request or reading the feed. |
|---|---|
| NotModifiedException | if the feed resource entity tag matches the provided value. |
| ParseException | error parsing the returned feed data. |
| ResourceNotFoundException | invalid feed URL. |
| ServiceException | system error retrieving feed. |
Returns the MetadataRegistry that defines the expected metadata.
Returns the service protocol version that will be used for requests generated by this service.
Returns the GDataRequestFactory currently associated with the service.
Returns the Schema that contains the metadata about
element types parsed or generated by this service.
Returns information about the service version.
This method is deprecated.
Use createLinkQueryRequest(ILink) instead.
Returns an InputStream that contains the content referenced by a link.
| link | Link that references the target resource. |
|---|
| IOException | error communication with the remote service. |
|---|---|
| ServiceException | resource access failed due to system error. |
Returns true if strict validation is enabled for
this service.
Returns the current Version of the GData core protocol.
Inserts a new IEntry into a feed associated
with the target service. It will return the inserted entry, including any
additional attributes or extensions set by the GData server.
| feedUrl | The POST URI associated with the target feed. |
|---|---|
| entry | The new entry to insert into the feed. |
| IOException | error communicating with the GData service. |
|---|---|
| ParseException | error parsing the return entry data. |
| ServiceForbiddenException | the inserted Entry has associated media content and can only be inserted using a media service. |
| ServiceException | insert request failed due to system error. |
Returns the Atom introspection Service Document associated with a particular feed URL. This document provides service metadata about the set of Atom services associated with the target feed URL.
| feedUrl | The URL associated with a feed. This URL can not include any query parameters. |
|---|---|
| serviceClass | The class used to represent a service document,
not null. |
| IOException | error sending request or reading the feed. |
|---|---|
| ParseException | error parsing the returned service data. |
| ResourceNotFoundException | invalid feed URL. |
| ServiceException | system error retrieving service document. |
Parses the response stream for a request based upon request properties and an expected result type. The parser will be selected based upon the request alt type or response content type and used to parse the response content into the result object.
| req | Request that has been executed but not yet read from. |
|---|---|
| resultType | Expected result type, not null. |
| ServiceException | |
|---|---|
| IOException |
Patches an existing IEntry by removing a set of selected fields and
then merging a partial entry representation into the resource at the
specified entry edit URL. The resulting entry (after update) will be
returned.
| entryUrl | The edit URL associated with the entry. |
|---|---|
| fields | Selection representing the set of fields to be patched from the resource. |
| entry | The partial entry to be merged with current resource. |
| IOException | error communicating with the GData service. |
|---|---|
| ParseException | error parsing the returned entry data. |
| ServiceException | update request failed due to system error. |
Patches an existing IEntry by removing a set of selected fields and
then merging a partial entry representation into the resource at the
specified entry edit URL. The resulting entry (after update) will be
returned. This update is conditional upon the provided tag matching the
current entity tag for the entry. If (and only if) they match, the patch
will be performed.
| entryUrl | The edit URL associated with the entry. |
|---|---|
| fields | Selection representing the set of fields to be removed from the resource. |
| entry | The partial entry to be merged with current resource. |
| etag | The entity tag value that is the expected value for the target
resource. A value of null will not set an etag precondition
and a value of "*" will perform an unconditional
update. |
| IOException | error communicating with the GData service. |
|---|---|
| PreconditionFailedException | if the resource entity tag does not match the provided value. |
| ParseException | error parsing the patched entry data. |
| ServiceException | update request failed due to system error. |
Executes a GData query against the target service and returns the
IFeed containing entries that match the query result if the etag
for the target feed does not match the provided value.
| query | Query instance defining target feed and query parameters. |
|---|---|
| feedClass | The Class used to represent a service Feed,
not null. |
| etag | Used to provide an entity tag that indicates the query should be
be performed only if the entity tag of the current representation is
different from the provided value. A value of null indicates
unconditional return. |
| IOException | error communicating with the GData service. |
|---|---|
| NotModifiedException | if the feed resource entity tag matches the provided value. |
| ServiceForbiddenException | feed does not support the query. |
| ParseException | error parsing the returned feed data. |
| ServiceException | query request failed. |
Executes a GData query against the target service and returns the
IFeed containing entries that match the query result, if it's been
modified since the specified date.
| query | Query instance defining target feed and query parameters. |
|---|---|
| feedClass | The Class used to represent a service Feed,
not null. |
| ifModifiedSince | Used to set a precondition date that indicates the
query result feed should be returned only if contains entries that
have been modified after the specified date. A value of null
indicates no precondition. |
| IOException | error communicating with the GData service. |
|---|---|
| NotModifiedException | if the query resource does not contain entries modified since the specified precondition date. |
| ServiceForbiddenException | feed does not support the query. |
| ParseException | error parsing the returned feed data. |
| ServiceException | query request failed. |
Executes a GData query against the target service and returns the
IFeed containing entries that match the query result.
| query | Query instance defining target feed and query parameters. |
|---|---|
| feedClass | The Class used to represent a service Feed,
not null. |
| IOException | error communicating with the GData service. |
|---|---|
| ServiceForbiddenException | feed does not support the query. |
| ParseException | error parsing the returned feed data. |
| ServiceException | query request failed. |
Defines the languages accepted by the application.
This parameters defines the human language the service should use for
generated strings. Different services support different languages, please
check the service documentation.
If no language on this list is accepted by the service, and if the list
does not contain * to accept all languages, the exception
in the exception NotAcceptableException.
The service will choose the best available language on this list. Check the
attribute xml:lang on the relevant tags, such as atom:content,
atom:title and atom:category.
| acceptedLanguages | List of accepted languages, as defined in section 14.4 of RFC 2616 |
|---|
Sets the default wait timeout (in milliseconds) for a connection to the remote GData service.
| timeout | The read timeout. A value of zero indicates an infinite timeout. |
|---|
| IllegalArgumentException | if the timeout value is negative. |
|---|
Sets the default ContentType for writing data to the GData service.
| contentType |
|---|
Sets the ExtensionProfile that defines any expected extensions to
the base RSS/Atom content model.
| v |
|---|
Set a header that will be included in all requests. If header of the same name was previously set, then replace the previous header value.
| header | The name of the header |
|---|---|
| value | The value of the header, if null, then unset that header. |
Adds OAuth Proxy-related headers to the request. The OAuth Proxy simplifies the OAuth dance on when running in App Engine.
| headers |
|---|
Set a header that will be included in all requests and do not log the value. Useful for values that are sensitive or related to security. If header of the same name was previously set, then replace the previous header value.
| header | The name of the header |
|---|---|
| value | The value of the header. If null, then unset that header. |
Sets the service protocol version that will be used for requests associated with this service.
| v | New service protocol version. |
|---|
Sets the default wait timeout (in milliseconds) for a response from the remote GData service.
| timeout | The read timeout. A value of zero indicates an infinite timeout. |
|---|
| IllegalArgumentException | if the timeout value is negative. |
|---|
Sets the GDataRequestFactory currently associated with the service.
| requestFactory |
|---|
Enables or disables strict validation. It is enabled by default. When this flag is enabled, the client library rejects unknown attributes and validates both input and output data.
| strictValidation |
|---|
Sets timeout value for GDataRequest.
| request |
|---|
Updates an existing IEntry by writing it to
the specified entry edit URL. The resulting Entry (after update) will be
returned.
| entryUrl | The edit URL associated with the entry. |
|---|---|
| entry | The modified Entry to be written to the server. |
| IOException | error communicating with the GData service. |
|---|---|
| ParseException | error parsing the updated entry data. |
| ServiceException | update request failed due to system error. |
Updates an existing IEntry by writing it to the specified entry
edit URL. The resulting entry (after update) will be returned. This update
is conditional upon the provided tag matching the current entity tag for
the entry. If (and only if) they match, the update will be performed.
| entryUrl | The edit URL associated with the entry. |
|---|---|
| entry | The modified entry to be written to the server. |
| etag | The entity tag value that is the expected value for the target
resource. A value of null will not set an etag precondition
and a value of "*" will perform an unconditional
update. |
| IOException | error communicating with the GData service. |
|---|---|
| PreconditionFailedException | if the resource entity tag does not match the provided value. |
| ParseException | error parsing the updated entry data. |
| ServiceException | update request failed due to system error. |
Sets the HttpGDataRequest.Factory associate with the service to use secure connections.
Writes the request body to the target service based upon the attributes of the request and the source object.
| req | Currently executing request |
|---|---|
| source | Source object to be written |
| IOException |
|---|
| object |
|---|
Creates a new GDataRequest for querying the service.
Clients should be sure to call end() on the
returned request once they have finished using it.
| query | |
|---|---|
| inputType |
| IOException | |
|---|---|
| ServiceException |
Initializes the version information for a specific service type. Subclasses
of Service will generally call this method from within their static
initializers to bind version information for the associated service.
| serviceClass | The service type being initialized. |
|---|---|
| defaultVersion | The service version expected by this client library. |
Parses the response stream for a request based upon response content type and an expected result type. The parser will be selected based upon the request alt type or response content type and used to parse the response content into the result object.
| source | |
|---|---|
| responseType | Content type of the response to parse. |
| resultType | Expected result type, not null. |
| ServiceException | |
|---|---|
| IOException |
Writes the request body to the target service based upon requested output properties and the source object.
| req | |
|---|---|
| outProps | Client output properties |
| source | Source object to be written |
| IOException |
|---|