|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Storage
A interface every storage implementation must provide to access the Storage. It describes all access methodes needed to store, retrieve and look up data stored in the Storage component. This interface acts as a Facade to hide the storage implementation from the user.
This could also act as a proxy for a remote storage. It also removes any restrictions from custom storage implementations.
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. |
Method Detail |
---|
com.google.gdata.data.BaseEntry storeEntry(ServerBaseEntry entry) throws StorageException
entry
- -
the entry to store
StorageException
- -
if the entry can not be stored or required field are not set.void deleteEntry(ServerBaseEntry entry) throws StorageException
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.com.google.gdata.data.BaseEntry updateEntry(ServerBaseEntry entry) throws StorageException
ProvidedService
entry
- -
the entry to update
StorageException
- -
if the entry can not be updated or does not exist or required
field are not set.com.google.gdata.data.BaseFeed getFeed(ServerBaseFeed feed) throws StorageException
feed
- -
the to retieve from the storage
StorageException
- -
the feed does not exist or can not be retrieved or required
field are not set.com.google.gdata.data.BaseEntry getEntry(ServerBaseEntry entry) throws StorageException
entry
- -
the entry to retrieve
StorageException
- -
if the entry does not exist or can not be created or required
field are not set.void storeAccount(GDataAccount account) throws StorageException
account
- -
the account to save
StorageException
- -
if the account can not be stored or the account already
exists or required field are not set.void updateAccount(GDataAccount account) throws StorageException
account
- -
the account to update
StorageException
- -
if the account does not exist or required field are not set.void deleteAccount(String accountname) throws StorageException
accountname
- -
the name of the account to delete
StorageException
- -
if the account does not existvoid storeFeed(ServerBaseFeed feed, String accountname) throws StorageException
feed
- -
the feed to createaccountname
- -
the account name belongs to the feed
StorageException
- -
if the feed already exists or the feed can not be storedProvidedService
void deleteFeed(String feedId) throws StorageException
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 deletedvoid updateFeed(ServerBaseFeed feed, String accountname) throws StorageException
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 updatedString getServiceForFeed(String feedId) throws StorageException
feedId
- -
the feed id
StorageException
- -
if no feed for the provided id is storedGDataAccount getAccount(String accountName) throws StorageException
GDataAccount
for the given account name
accountName
- -
the name of the requested account
GDataAccount
instance for the requested account name
StorageException
- -
if no account for the account name is storedvoid close()
String getAccountNameForFeedId(String feedId) throws StorageException
feedId
- -
the id of the feed to retrieve the accountname
StorageException
- -
if the feed is not stored or the storage can not be accessedLong getEntryLastModified(String entryId, String feedId) throws StorageException
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 accessedLong getFeedLastModified(String feedId) throws StorageException
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 accessed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |