edu.nrao.sss.model.resource
Interface ResourceCatalogProvider


public interface ResourceCatalogProvider

A provider of resource catalogs.

Version Info:

$Revision$
$Date$
$Author$ (last person to modify)

Since:
2009-05-05
Author:
David M. Harland

Method Summary
 ResourceCatalog findCatalogById(long id)
          Returns the catalog with the given ID, or null if this provider holds no such catalog.
 List<ResourceCatalog> findCatalogByName(String name)
          Returns a list of all catalogs held by this provider with the given name.
 List<ResourceCatalog> findCatalogsOwnedBy(long ownerId)
          Returns a list of all catalogs held by this provider and owned by the user with the given ID.
 List<ResourceCatalog> findPublicCatalogs()
          Returns a list of all public catalogs held by this provider.
 List<ResourceCatalog> getCatalogs()
          Returns a list of all catalogs held by this provider.
 

Method Detail

findCatalogById

ResourceCatalog findCatalogById(long id)
                                throws RepositoryException
Returns the catalog with the given ID, or null if this provider holds no such catalog.

Parameters:
id - the ID of a catalog that might be held by this provider.
Returns:
the catalog with the given ID, or null if this provider holds no such catalog.
Throws:
RepositoryException - if anything goes wrong while trying to fetch catalogs from this provider.

findCatalogByName

List<ResourceCatalog> findCatalogByName(String name)
                                        throws RepositoryException
Returns a list of all catalogs held by this provider with the given name.

Parameters:
name - the name of one or more catalogs that might be held by this provider.
Returns:
a list of all catalogs with the given name. If the provider has no such catalogs the returned list will be empty.
Throws:
RepositoryException - if anything goes wrong while trying to fetch catalogs from this provider.

findCatalogsOwnedBy

List<ResourceCatalog> findCatalogsOwnedBy(long ownerId)
                                          throws RepositoryException
Returns a list of all catalogs held by this provider and owned by the user with the given ID.

Parameters:
ownerId - the ID of a user who might own catalogs held by this provider.
Returns:
a list of all catalogs owned by the given user. If the provider has no such catalogs the returned list will be empty.
Throws:
RepositoryException - if anything goes wrong while trying to fetch catalogs from this provider.

findPublicCatalogs

List<ResourceCatalog> findPublicCatalogs()
                                         throws RepositoryException
Returns a list of all public catalogs held by this provider. A public catalog is one that is shared by an owner with all users, at least for read-only operations.

Returns:
a list of all public catalogs held by this provider. If the provider has no public catalogs the returned list will be empty.
Throws:
RepositoryException - if anything goes wrong while trying to fetch catalogs from this provider.

getCatalogs

List<ResourceCatalog> getCatalogs()
                                  throws RepositoryException
Returns a list of all catalogs held by this provider.

Returns:
a list of all catalogs held by this provider. If the provider has no catalogs the returned list will be empty.
Throws:
RepositoryException - if anything goes wrong while trying to fetch catalogs from this provider.


Copyright © 2009. All Rights Reserved.