org.apache.lucene.gdata.server.administration
Class GDataAdminService

java.lang.Object
  extended by org.apache.lucene.gdata.server.GDataService
      extended by org.apache.lucene.gdata.server.administration.GDataAdminService
All Implemented Interfaces:
AdminService, Service

public class GDataAdminService
extends GDataService
implements AdminService

default implementation of the AdminService interface.

Author:
Simon Willnauer

Field Summary
 
Fields inherited from class org.apache.lucene.gdata.server.GDataService
entryEventMediator, registry, storage
 
Constructor Summary
GDataAdminService()
           
 
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 accountName)
          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 class org.apache.lucene.gdata.server.GDataService
close, createEntry, deleteEntry, dynamicElementFeedStragey, getCurrentDateTime, getEntryLastModified, getFeed, getFeedLastModified, getSingleEntry, updateEntry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.lucene.gdata.server.Service
close, createEntry, deleteEntry, getEntryLastModified, getFeed, getFeedLastModified, getSingleEntry, updateEntry
 

Constructor Detail

GDataAdminService

public GDataAdminService()
                  throws ServiceException
Throws:
ServiceException
Method Detail

createFeed

public void createFeed(ServerBaseFeed feed,
                       GDataAccount account)
                throws ServiceException
Description copied from interface: AdminService
Creates a new feed instance.

Specified by:
createFeed in interface AdminService
Parameters:
feed - - the feed to create
account - - the account who own this feed
Throws:
ServiceException - - if the feed can not be created
See Also:
AdminService.createFeed(org.apache.lucene.gdata.data.ServerBaseFeed, org.apache.lucene.gdata.data.GDataAccount)

updateFeed

public void updateFeed(ServerBaseFeed feed,
                       GDataAccount account)
                throws ServiceException
Description copied from interface: AdminService
Updates the given feed

Specified by:
updateFeed in interface AdminService
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.
See Also:
AdminService.updateFeed(org.apache.lucene.gdata.data.ServerBaseFeed, org.apache.lucene.gdata.data.GDataAccount)

deleteFeed

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

Specified by:
deleteFeed in interface AdminService
Parameters:
feed - - the feed to deltete
Throws:
ServiceException - - if the feed can not be deleted or does not exist
See Also:
AdminService.deleteFeed(org.apache.lucene.gdata.data.ServerBaseFeed)

createAccount

public void createAccount(GDataAccount account)
                   throws ServiceException
Description copied from interface: AdminService
Creates a new account accout.

Specified by:
createAccount in interface AdminService
Parameters:
account - - the account to create
Throws:
ServiceException - - if the account can not be created or the account does already exist.
See Also:
AdminService.createAccount(org.apache.lucene.gdata.data.GDataAccount)

deleteAccount

public void deleteAccount(GDataAccount account)
                   throws ServiceException
Description copied from interface: AdminService
Deletes the given account from the storage. it will also delete all accociated feeds.

Specified by:
deleteAccount in interface AdminService
Parameters:
account - the account to delete
Throws:
ServiceException - - if the account does not exist or the account can not be deleted
See Also:
AdminService.deleteAccount(org.apache.lucene.gdata.data.GDataAccount)

updateAccount

public void updateAccount(GDataAccount account)
                   throws ServiceException
Description copied from interface: AdminService
Updates the given account if the account already exists.

Specified by:
updateAccount in interface AdminService
Parameters:
account - - the account to update
Throws:
ServiceException - - if the account can not be updated or the account does not exist
See Also:
AdminService.updateAccount(org.apache.lucene.gdata.data.GDataAccount)

getAccount

public GDataAccount getAccount(String accountName)
                        throws ServiceException
Description copied from interface: AdminService
Returns the account for the given account name or null if the account does not exist

Specified by:
getAccount in interface AdminService
Parameters:
accountName - - 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
See Also:
AdminService.getAccount(java.lang.String)

getFeedOwningAccount

public GDataAccount getFeedOwningAccount(String feedId)
                                  throws ServiceException
Description copied from interface: AdminService
Returns the account associated with the feed for the given feed id

Specified by:
getFeedOwningAccount in interface AdminService
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
See Also:
AdminService.getFeedOwningAccount(java.lang.String)


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