FileDocCategorySizeDatePackage
Service.javaAPI DocApache Lucene 2.1.06428Wed Feb 14 10:46:06 GMT 2007org.apache.lucene.gdata.server

Service

public interface Service
The Service class represents an interface to access the GData service componentes of the GData-Server. It encapsulates all interactions with the GData client.

This class provides the base level common functionality required to access the GData components. It is also designed to act as a base class that can be extended for specific types of underlaying server components as different indexing or storage components.

It could also encapsulate caching mechanismn build on top of the storage to reduce load on the storage component

author
Simon Willnauer

Fields Summary
Constructors Summary
Methods Summary
public voidclose()
will close the Service - service should not be used after this method has been called

public abstract com.google.gdata.data.BaseEntrycreateEntry(GDataRequest request, GDataResponse response)
Service method to create an entry in an already created and existing feed. This method will create the entry and passes the entry to the indexing component to make the new entry accessable via get-queries. The response and the corresponding http status code will be added to the given FeedResponse.

param
request - the current FeedRequest
param
response - the current FeedResponse
return
- the entry which has been created
throws
ServiceException - if the corresponding feed does not exist or the storage can not be accessed

public abstract com.google.gdata.data.BaseEntrydeleteEntry(GDataRequest request, GDataResponse response)
Service Method to delete an entry specified in the given FeedRequest. This method will remove the entry permanently. There will be no possiblity to restore the entry. The response and the corresponding http status code will be added to the given FeedResponse.

param
request - the current FeedRequest
param
response - the current FeedResponse
return
- the entry wich has been deleted
throws
ServiceException - if the entry does not exist or the storage can not be accessed

public abstract java.util.DategetEntryLastModified(java.lang.String entryId, java.lang.String feedId)
Retruns the date of the last modification for the given entry id

param
entryId - the id of the entry
param
feedId - the feed id this entry belongs to
return
- the last modified date or the current date if the date can not be retrieved
throws
ServiceException - if the storage can not be accessed

public abstract com.google.gdata.data.BaseFeedgetFeed(GDataRequest request, GDataResponse response)
Service method to retrieve a requested Feed. The feed will also be added to the given FeedResponse instance and can also be accessed via the FeedResponse object.

param
request - the current FeedRequest
param
response - the current FeedResponse
return
- the requested feed
throws
ServiceException - If the storage can not be accessed or the requested feed does not exist.

public abstract java.util.DategetFeedLastModified(java.lang.String feedId)
Retruns the date of the last modification for the given feed id

param
feedId - the id of the feed
return
- the last modified date or the current date if the date can not be retrieved
throws
ServiceException - if the storage can not be accessed

public abstract com.google.gdata.data.BaseEntrygetSingleEntry(GDataRequest request, GDataResponse response)
Service method to retrieve a requested entry. The entry will also be added to the given FeedResponse instance and can also be accessed via the FeedResponse object.

param
request - the current FeedRequest
param
response - the current FeedResponse
return
- the requested entry
throws
ServiceException - If the storage can not be accessed or the requested entry does not exist.

public abstract com.google.gdata.data.BaseEntryupdateEntry(GDataRequest request, GDataResponse response)
Service method to update an existing entry in a existing feed context. The entry version will be checked and a ServiceException will be thrown if the version to update is outdated. The new entry will be passed to the indexing component to make the version accessable via get-queries.

param
request - the current FeedRequest
param
response - the current FeedResponse
return
- the entry wich has been updated
throws
ServiceException - if the corresponding feed does not exist, the storage can not be accessed or the version to update is out of date.