| java.lang.Object | ||||
| ↳ | com.google.gdata.client.Service | |||
| ↳ | com.google.gdata.client.GoogleService | |||
| ↳ | com.google.gdata.client.media.MediaService | |||
| ↳ | com.google.api.gbase.client.GoogleBaseService | |||
Creates a Google data service with extensions
specific to Google Base.
The methods returning Atom feeds and entries in this class
default to returning instances of GoogleBaseFeed and
GoogleBaseEntry.
GoogleBaseService service = new GoogleBaseService("mycompany-myapp-1.0");
service.setUserCredentials(username, password);
GoogleBaseQuery query = new GoogleBaseQuery(...);
query.setGoogleBaseQuery(...);
GoogleBaseFeed feed = service.query(query);
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| GoogleBaseService.Versions | The Versions class contains all released versions of the Google Base API | ||||||||||
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | GOOGLE_BASE_SERVICE | The official name of the service. | |||||||||
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gdata.client.media.MediaService
| |||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| DEFAULT_VERSION | Version 1 is the current default version for GoogleBaseService. | ||||||||||
| GOOGLE_BASE_SERVICE_VERSION | Version of this service. | ||||||||||
| application | Name of the application passed to the constructor. | ||||||||||
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gdata.client.media.MediaService
| |||||||||||
From class
com.google.gdata.client.GoogleService
| |||||||||||
From class
com.google.gdata.client.Service
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a GoogleBaseService connecting to the default
authentication domain (www.google.com) using the HTTPS.
| |||||||||||
Creates a GoogleBaseService connecting to the default
authentication domain (www.google.com) using the HTTPS.
| |||||||||||
Creates a GoogleBaseService connecting to a specific
authentication domain using a specific protocol.
| |||||||||||
Creates a GoogleBaseService connecting to a specific
authentication domain using a specific protocol.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Executes several operations (insert, update or delete) on the entries that
are part of the input
IFeed. | |||||||||||
Returns an Google Base entry instance, given the URL of the entry.
| |||||||||||
Returns an Google Base entry instance, given the URL of the entry and an
if-modified-since date.
| |||||||||||
Returns the Google base feed associated with a particular feed URL.
| |||||||||||
Returns the Google Base feed associated with a particular feed URL, if
it's been modified since the specified date.
| |||||||||||
Returns the media entry referenced by the entryUrl, if it's been modified
since the specified date.
| |||||||||||
Returns the media entry referenced by the entryUrl.
| |||||||||||
Returns the Google Base media feed associated with a particular feed URL,
if it's been modified since the specified date.
| |||||||||||
Returns the Google base media feed associated with the specified feed URL.
| |||||||||||
Returns the google base service version followed by the gdata
service version.
| |||||||||||
Inserts a new
Entry into a feed associated
with the target service. | |||||||||||
Executes a GData query against the target service and returns the
Feed containing entries that match the
query result. | |||||||||||
Executes a GData query against the target service and returns the
GoogleBaseFeed containing entries that match the query result, if
it's been modified since the specified date. | |||||||||||
Updates an existing entry metadata by writing it to the specified edit
URL.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gdata.client.media.MediaService
| |||||||||||
From class
com.google.gdata.client.GoogleService
| |||||||||||
From class
com.google.gdata.client.Service
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.google.gdata.client.AuthTokenFactory.TokenListener
| |||||||||||
The official name of the service.
Version 1 is the current default version for GoogleBaseService.
Version of this service.
Name of the application passed to the constructor.
Creates a GoogleBaseService connecting to the default authentication domain (www.google.com) using the HTTPS.
| 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. |
|---|
Creates a GoogleBaseService connecting to the default authentication domain (www.google.com) using the HTTPS.
| 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. |
|---|---|
| developerKey | Developer key (ignored) |
Creates a GoogleBaseService connecting to a specific authentication domain using a specific protocol.
| 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 handler |
Creates a GoogleBaseService connecting to a specific authentication domain using a specific protocol.
| 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. |
|---|---|
| developerKey | Developer key (ignored) |
| protocol | Name of protocol to use for authentication ("http"/"https") |
| domainName | The name of the domain hosting the login handler |
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.)
| url | The POST URI associated with the target feed. |
|---|---|
| f | A description of the operations to execute, described using tags in the batch: namespace |
| IOException | |
|---|---|
| ServiceException | |
| BatchInterruptedException |
Returns an Google Base entry instance, given the URL of the entry.
| entryUrl | Resource URL for the entry. |
|---|
| 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 Google Base entry instance, given the URL of the entry and an if-modified-since date.
| entryUrl | Resource URL for the entry. |
|---|---|
| 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 Google base feed associated with a particular feed URL.
| feedUrl | The URL associated with a feed. This URL can include GData query parameters. |
|---|
| 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 Google Base 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. |
|---|---|
| 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 media entry referenced by the entryUrl, if it's been modified since the specified date.
| entryUrl | The url to the media entry. |
|---|---|
| ifModifiedSince |
| 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 media entry referenced by the entryUrl. If the URL is not pointing to a media entry, an exception will be thrown.
| entryUrl | The url to the media entry. |
|---|
| 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 the Google Base media feed associated with a particular feed URL, if it's been modified since the specified date.
| feedUrl | The URL associated with a media feed for one particular item. |
|---|---|
| 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 Google base media feed associated with the specified feed URL.
For the call to be valid, the user must be authenticated and own the item.
The Google Base item has the link to its media feed registered as a
FeedLink extension with the
media relation.
| feedUrl |
|---|
| 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 google base service version followed by the gdata service version.
Inserts a new Entry 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.
If the Entry has been associated with a MediaSource through the
setMediaSource(MediaSource) method then both the entry
and the media resource will be inserted into the media feed associated
with the target service.
If the media source has a name (getName() that is
non-null), the name will be provided as a Slug header that is sent
along with request and may be used as a hint when determining
the ID, url, and/or title of the inserted resource.
To insert only media content, use
insert(URL, Class, MediaSource).
| url | The POST URI associated with the target feed. |
|---|---|
| e | The new entry to insert into the feed. |
| IOException | |
|---|---|
| ServiceException |
Executes a GData query against the target service and returns the
Feed containing entries that match the
query result.
| query | Query instance defining target feed and query parameters,
usually a GoogleBaseQuery |
|---|
| 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
GoogleBaseFeed 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,
usually a GoogleBaseQuery |
|---|---|
| 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. |
Updates an existing entry metadata by writing it to the specified edit
URL. The resulting entry (after update) will be returned.
If the entry has media resource, the media part will not be updated.
To update both metadata and media, use updateMedia(URL, IEntry).
To update media only, use updateMedia(URL, Class, MediaSource).
| url | The media edit URL associated with the resource. |
|---|---|
| e | The updated entry to be written to the server. |
| IOException | |
|---|---|
| ServiceException |