FileDocCategorySizeDatePackage
AdminService.javaAPI DocApache Lucene 2.1.04693Wed Feb 14 10:46:06 GMT 2007org.apache.lucene.gdata.server.administration

AdminService

public interface AdminService implements org.apache.lucene.gdata.server.Service
The AdminService interface extends the Service interface to serve common administrator requests. Common users can not create feed or user instances. This interface provides all actions for create, delete or update Users and Feeds. Each Feed has an associated Feed - Name which acts as an ID. Feed will be identified by the feed name e.g. {@link com.google.gdata.data.Source#getId()}

User accounts are supposed to have a unique username attribute as the username acts as a primary key for the storage

author
Simon Willnauer

Fields Summary
Constructors Summary
Methods Summary
public abstract voidcreateAccount(org.apache.lucene.gdata.data.GDataAccount account)
Creates a new account accout.

param
account - the account to create
throws
ServiceException - if the account can not be created or the account does already exist.

public abstract voidcreateFeed(org.apache.lucene.gdata.data.ServerBaseFeed feed, org.apache.lucene.gdata.data.GDataAccount account)
Creates a new feed instance.

param
feed - the feed to create
param
account - the account who own this feed
throws
ServiceException - if the feed can not be created

public abstract voiddeleteAccount(org.apache.lucene.gdata.data.GDataAccount account)
Deletes the given account from the storage. it will also delete all accociated feeds.

param
account the account to delete
throws
ServiceException - if the account does not exist or the account can not be deleted

public abstract voiddeleteFeed(org.apache.lucene.gdata.data.ServerBaseFeed feed)
Deletes the given feed and all containing entries from the storage. The feed will not be accessable anymore.

param
feed - the feed to deltete
throws
ServiceException - if the feed can not be deleted or does not exist

public abstract org.apache.lucene.gdata.data.GDataAccountgetAccount(java.lang.String account)
Returns the account for the given account name or null if the account does not exist

param
account - account name
return
- the account for the given account name or null if the account does not exist
throws
ServiceException - if the account can not be accessed

public abstract org.apache.lucene.gdata.data.GDataAccountgetFeedOwningAccount(java.lang.String feedId)
Returns the account associated with the feed for the given feed id

param
feedId - the feed id
return
- the GdataAccount assoziated with the feed for the given feed Id or null if there is no feed for the given feed Id
throws
ServiceException - if the storage can not be accessed

public abstract voidupdateAccount(org.apache.lucene.gdata.data.GDataAccount account)
Updates the given account if the account already exists.

param
account - the account to update
throws
ServiceException - if the account can not be updated or the account does not exist

public abstract voidupdateFeed(org.apache.lucene.gdata.data.ServerBaseFeed feed, org.apache.lucene.gdata.data.GDataAccount account)
Updates the given feed

param
feed - the feed to update
param
account - the account who own this feed
throws
ServiceException - if the feed can not be updated or does not exist.