|
|||||||||
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
public abstract class AppsForYourDomainService
The AppsForYourDomainService class extends the basic GoogleService
abstraction to define a service that is preconfigured for access to the
Google Apps for Your Domain GData 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_SERVICE
The abbreviated name of Apps for Your Domain recognized by Google. |
static java.lang.String |
DOMAIN_NAME
The domain which hosts the the authentication. |
static java.lang.String |
HTTPS_PROTOCOL
The protocol used to obtain authentication tokens. |
Constructor Summary | |
---|---|
AppsForYourDomainService(java.lang.String applicationName)
Constructs a AppsForYourDomainService instance for an application with the name applicationName . |
|
AppsForYourDomainService(java.lang.String applicationName,
java.lang.String protocol,
java.lang.String domainName)
Constructs a GoogleService instance connecting to the service with name serviceName for an application with the name
applicationName . |
Method Summary | ||
---|---|---|
void |
delete(java.net.URL entryUrl)
Deletes an existing entry (and associated media content, if any) using the specified edit URL. |
|
|
getEntry(java.net.URL entryUrl,
java.lang.Class<E> entryClass)
The call to super.getEntry should fall through to Service and the behaviour is unknown if this method is overloaded in GoogleService. |
|
|
getEntry(java.net.URL entryUrl,
java.lang.Class<E> entryClass,
DateTime ifModifiedSince)
Returns an Atom entry instance, given the URL of the entry and an if-modified-since date. |
|
|
getFeed(java.net.URL feedUrl,
java.lang.Class<F> feedClass)
The call to super.getEntry should fall through to Service and the behaviour is unknown if this method is overloaded in GoogleService. |
|
|
getFeed(java.net.URL feedUrl,
java.lang.Class<F> feedClass,
DateTime ifModifiedSince)
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. |
|
|
insert(java.net.URL feedUrl,
E entry)
Inserts a new IEntry into a feed associated
with the target service. |
|
|
query(Query query,
java.lang.Class<F> feedClass)
The call to super.getEntry should fall through to Service and the behaviour is unknown if this method is overloaded in GoogleService. |
|
|
update(java.net.URL entryUrl,
E entry)
Updates an existing IEntry by writing it to
the specified entry edit URL. |
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 DOMAIN_NAME
public static final java.lang.String HTTPS_PROTOCOL
public static final java.lang.String APPS_SERVICE
Constructor Detail |
---|
public AppsForYourDomainService(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 AppsForYourDomainService(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 <E extends IEntry> E insert(java.net.URL feedUrl, E entry) throws java.io.IOException, ServiceException, AppsForYourDomainException
Service
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.
insert
in class GoogleService
feedUrl
- the POST URI associated with the target feed.entry
- the new entry to insert into the feed.
AppsForYourDomainException
- If an Apps for Your Domain API error
occurred.
java.io.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.IFeed.getEntryPostLink()
public <E extends IEntry> E getEntry(java.net.URL entryUrl, java.lang.Class<E> entryClass) throws java.io.IOException, ServiceException, AppsForYourDomainException
getEntry
in class Service
entryUrl
- resource URL for the entry.entryClass
- class used to represent service entries,
not null
.
AppsForYourDomainException
- If an Apps for Your Domain API error
occurred.
java.io.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.public <F extends IFeed> F getFeed(java.net.URL feedUrl, java.lang.Class<F> feedClass) throws java.io.IOException, ServiceException, AppsForYourDomainException
getFeed
in class Service
feedUrl
- the URL associated with a feed. This URL can include GData
query parameters.feedClass
- the class used to represent a service Feed.
AppsForYourDomainException
- If an Apps for Your Domain API error
occurred.
java.io.IOException
- error sending request or reading the feed.
ParseException
- error parsing the returned
feed data.
ResourceNotFoundException
- invalid feed URL.
ServiceException
- system error retrieving feed.public <F extends IFeed> F query(Query query, java.lang.Class<F> feedClass) throws java.io.IOException, ServiceException, AppsForYourDomainException
query
in class Service
query
- Query instance defining target feed and query parameters.feedClass
- the Class used to represent a service Feed,
not null
.
AppsForYourDomainException
- If an Apps for Your Domain API error
occurred.
java.io.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.public <E extends IEntry> E update(java.net.URL entryUrl, E entry) throws java.io.IOException, ServiceException, AppsForYourDomainException
Service
IEntry
by writing it to
the specified entry edit URL. The resulting Entry (after update) will be
returned.
update
in class GoogleService
entryUrl
- the edit URL associated with the entry.entry
- the modified Entry to be written to the server.
AppsForYourDomainException
- If an Apps for Your Domain API error
occurred.
java.io.IOException
- error communicating with the GData service.
ParseException
- error parsing the updated
entry data.
ServiceException
- update request failed due to system error.IEntry.getEditLink()
public void delete(java.net.URL entryUrl) throws java.io.IOException, ServiceException, AppsForYourDomainException
Service
delete
in class GoogleService
entryUrl
- the edit or medit edit url associated with the resource.
AppsForYourDomainException
- If an Apps for Your Domain API error
occurred.
java.io.IOException
- error communicating with the GData service.
ResourceNotFoundException
- invalid entry URL.
ServiceException
- delete request failed due to system error.public <E extends IEntry> E getEntry(java.net.URL entryUrl, java.lang.Class<E> entryClass, DateTime ifModifiedSince) throws java.io.IOException, ServiceException
getEntry
in class GoogleService
entryUrl
- resource URL for the entry.entryClass
- class used to represent service entries.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.
java.io.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.public <F extends IFeed> F getFeed(java.net.URL feedUrl, java.lang.Class<F> feedClass, DateTime ifModifiedSince) throws java.io.IOException, ServiceException
IFeed
containing entries that match the query result, if
it's been modified since the specified date. Note that this method is
overridden to prevent the usage of a non-null if-modified-since value. The
Google Apps for Your Domain Provisioning API does not support the use of
the if-modified-since value.
getFeed
in class GoogleService
feedClass
- the Class used to represent a service Feed.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.feedUrl
- the URL associated with a feed. This URL can include GData
query parameters.
java.io.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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |