|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.gdata.storage.lucenestorage.StorageImplementation
public class StorageImplementation
This is an implementation of the
Storage
interface. The
StorageImplementation provides access to the
StorageQuery
and the
StorageModifier
. This
class will be instantiated per client request.
Constructor Summary | |
---|---|
StorageImplementation()
Creates a new StorageImplementation |
Method Summary | |
---|---|
void |
close()
close this storage instance. |
void |
deleteAccount(String Accountname)
Deletes the account for the given account name. |
void |
deleteEntry(ServerBaseEntry entry)
Deletes the given entry. |
void |
deleteFeed(String feedId)
Deletes the feed for the given feed id. |
GDataAccount |
getAccount(String accountName)
Retrieves the GDataAccount for the given account name |
String |
getAccountNameForFeedId(String feedId)
Each feed belongs to one specific account. |
com.google.gdata.data.BaseEntry |
getEntry(ServerBaseEntry entry)
Retrieves the requested entry from the storage. |
Long |
getEntryLastModified(String entryId,
String feedId)
Retrieves the date of the last modification for the given id |
com.google.gdata.data.BaseFeed |
getFeed(ServerBaseFeed feed)
Retrieves the requested feed from the storage. |
Long |
getFeedLastModified(String feedId)
Retrieves the date of the last modification for the given id |
String |
getServiceForFeed(String feedId)
Retrieves the service name for a stored feed |
void |
storeAccount(GDataAccount Account)
Saves a new account. |
com.google.gdata.data.BaseEntry |
storeEntry(ServerBaseEntry entry)
Stores the given entry. |
void |
storeFeed(ServerBaseFeed feed,
String accountName)
Stores a new feed for a existing account. |
void |
updateAccount(GDataAccount Account)
Updates an existing account. |
com.google.gdata.data.BaseEntry |
updateEntry(ServerBaseEntry entry)
Updates the given entry. |
void |
updateFeed(ServerBaseFeed feed,
String accountName)
Updates a stored feed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StorageImplementation() throws StorageException
StorageException
- -
if the storage controller can not be obtainedMethod Detail |
---|
public com.google.gdata.data.BaseEntry storeEntry(ServerBaseEntry entry) throws StorageException
Storage
storeEntry
in interface Storage
entry
- -
the entry to store
StorageException
- -
if the entry can not be stored or required field are not set.Storage.storeEntry(org.apache.lucene.gdata.data.ServerBaseEntry)
public void deleteEntry(ServerBaseEntry entry) throws StorageException
Storage
deleteEntry
in interface Storage
entry
- -
the entry to delete from the storage
StorageException
- -
if the entry can not be deleted or the entry does not exist
or required field are not set.Storage.deleteEntry(org.apache.lucene.gdata.data.ServerBaseEntry)
public com.google.gdata.data.BaseEntry updateEntry(ServerBaseEntry entry) throws StorageException
Storage
ProvidedService
updateEntry
in interface Storage
entry
- -
the entry to update
StorageException
- -
if the entry can not be updated or does not exist or required
field are not set.Storage.updateEntry(org.apache.lucene.gdata.data.ServerBaseEntry)
public com.google.gdata.data.BaseFeed getFeed(ServerBaseFeed feed) throws StorageException
Storage
getFeed
in interface Storage
feed
- -
the to retieve from the storage
StorageException
- -
the feed does not exist or can not be retrieved or required
field are not set.Storage.getFeed(org.apache.lucene.gdata.data.ServerBaseFeed)
public com.google.gdata.data.BaseEntry getEntry(ServerBaseEntry entry) throws StorageException
Storage
getEntry
in interface Storage
entry
- -
the entry to retrieve
StorageException
- -
if the entry does not exist or can not be created or required
field are not set.Storage.getEntry(org.apache.lucene.gdata.data.ServerBaseEntry)
public void close()
Storage
close
in interface Storage
Storage.close()
public void storeAccount(GDataAccount Account) throws StorageException
Storage
storeAccount
in interface Storage
Account
- -
the account to save
StorageException
- -
if the account can not be stored or the account already
exists or required field are not set.Storage.storeAccount(org.apache.lucene.gdata.data.GDataAccount)
public void updateAccount(GDataAccount Account) throws StorageException
Storage
updateAccount
in interface Storage
Account
- -
the account to update
StorageException
- -
if the account does not exist or required field are not set.Storage.updateAccount(org.apache.lucene.gdata.data.GDataAccount)
public void deleteAccount(String Accountname) throws StorageException
Storage
deleteAccount
in interface Storage
Accountname
- -
the name of the account to delete
StorageException
- -
if the account does not existStorage.deleteAccount(java.lang.String)
public void storeFeed(ServerBaseFeed feed, String accountName) throws StorageException
Storage
storeFeed
in interface Storage
feed
- -
the feed to createaccountName
- -
the account name belongs to the feed
StorageException
- -
if the feed already exists or the feed can not be storedStorage.storeFeed(org.apache.lucene.gdata.data.ServerBaseFeed,
java.lang.String)
public void deleteFeed(String feedId) throws StorageException
Storage
deleteFeed
in interface Storage
feedId
- -
the feed id for the feed to delete.
StorageException
- -
if the feed for the feed id does not exist or the feed can
not be deletedStorage.deleteFeed(java.lang.String)
public void updateFeed(ServerBaseFeed feed, String accountName) throws StorageException
Storage
updateFeed
in interface Storage
feed
- -
the feed to updateaccountName
- -
the account name belongs to the feed
StorageException
- -
if the feed does not exist or the feed can not be updatedStorage.updateFeed(org.apache.lucene.gdata.data.ServerBaseFeed,
java.lang.String)
public String getServiceForFeed(String feedId) throws StorageException
Storage
getServiceForFeed
in interface Storage
feedId
- -
the feed id
StorageException
- -
if no feed for the provided id is storedStorage.getServiceForFeed(java.lang.String)
public GDataAccount getAccount(String accountName) throws StorageException
Storage
GDataAccount
for the given account name
getAccount
in interface Storage
accountName
- -
the name of the requested account
GDataAccount
instance for the requested account name
StorageException
- -
if no account for the account name is storedStorage.getAccount(java.lang.String)
public String getAccountNameForFeedId(String feedId) throws StorageException
Storage
getAccountNameForFeedId
in interface Storage
feedId
- -
the id of the feed to retrieve the accountname
StorageException
- -
if the feed is not stored or the storage can not be accessedStorage.getAccountNameForFeedId(java.lang.String)
public Long getEntryLastModified(String entryId, String feedId) throws StorageException
Storage
getEntryLastModified
in interface Storage
entryId
- -
the entry IdfeedId
- -
the feed which contains the entry
new Long(0)
if the resource can not be found eg.
the time can not be accessed
StorageException
- -
if the storage can not be accessedStorage.getEntryLastModified(java.lang.String, java.lang.String)
public Long getFeedLastModified(String feedId) throws StorageException
Storage
getFeedLastModified
in interface Storage
feedId
- -
the feed Id
new Long(0)
if the resource can not be found eg.
the time can not be accessed
StorageException
- -
if the storage can not be accessedStorage.getFeedLastModified(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |