org.apache.lucene.gdata.server.administration
Interface AdminService

All Superinterfaces:
Service
All Known Implementing Classes:
GDataAdminService

public interface AdminService
extends 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. 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

Method Summary
 void createAccount(GDataAccount account)
          Creates a new account accout.
 void createFeed(ServerBaseFeed feed, GDataAccount account)
          Creates a new feed instance.
 void deleteAccount(GDataAccount account)
          Deletes the given account from the storage.
 void deleteFeed(ServerBaseFeed feed)
          Deletes the given feed and all containing entries from the storage.
 GDataAccount getAccount(String account)
          Returns the account for the given account name or null if the account does not exist
 GDataAccount getFeedOwningAccount(String feedId)
          Returns the account associated with the feed for the given feed id
 void updateAccount(GDataAccount account)
          Updates the given account if the account already exists.
 void updateFeed(ServerBaseFeed feed, GDataAccount account)
          Updates the given feed
 
Methods inherited from interface org.apache.lucene.gdata.server.Service
close, createEntry, deleteEntry, getEntryLastModified, getFeed, getFeedLastModified, getSingleEntry, updateEntry
 

Method Detail

createFeed

void createFeed(ServerBaseFeed feed,
                GDataAccount account)
                throws ServiceException
Creates a new feed instance.

Parameters:
feed - - the feed to create
account - - the account who own this feed
Throws:
ServiceException - - if the feed can not be created

updateFeed

void updateFeed(ServerBaseFeed feed,
                GDataAccount account)
                throws ServiceException
Updates the given feed

Parameters:
feed - - the feed to update
account - - the account who own this feed
Throws:
ServiceException - - if the feed can not be updated or does not exist.

deleteFeed

void deleteFeed(ServerBaseFeed feed)
                throws ServiceException
Deletes the given feed and all containing entries from the storage. The feed will not be accessable anymore.

Parameters:
feed - - the feed to deltete
Throws:
ServiceException - - if the feed can not be deleted or does not exist

createAccount

void createAccount(GDataAccount account)
                   throws ServiceException
Creates a new account accout.

Parameters:
account - - the account to create
Throws:
ServiceException - - if the account can not be created or the account does already exist.

deleteAccount

void deleteAccount(GDataAccount account)
                   throws ServiceException
Deletes the given account from the storage. it will also delete all accociated feeds.

Parameters:
account - the account to delete
Throws:
ServiceException - - if the account does not exist or the account can not be deleted

updateAccount

void updateAccount(GDataAccount account)
                   throws ServiceException
Updates the given account if the account already exists.

Parameters:
account - - the account to update
Throws:
ServiceException - - if the account can not be updated or the account does not exist

getAccount

GDataAccount getAccount(String account)
                        throws ServiceException
Returns the account for the given account name or null if the account does not exist

Parameters:
account - - account name
Returns:
- the account for the given account name or null if the account does not exist
Throws:
ServiceException - - if the account can not be accessed

getFeedOwningAccount

GDataAccount getFeedOwningAccount(String feedId)
                                  throws ServiceException
Returns the account associated with the feed for the given feed id

Parameters:
feedId - - the feed id
Returns:
- 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


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.