org.apache.oodt.cas.filemgr.repository
Class DataSourceRepositoryManager

java.lang.Object
  extended by org.apache.oodt.cas.filemgr.repository.DataSourceRepositoryManager
All Implemented Interfaces:
RepositoryManager

public class DataSourceRepositoryManager
extends Object
implements RepositoryManager

Version:
$Revision: 13181 $

An implementation of the RepositoryManager interface that is backed by a DataSource for storing and retreiving Product policy in the form of ProductTypes.

Author:
mattmann, bfoster

Field Summary
 
Fields inherited from interface org.apache.oodt.cas.filemgr.repository.RepositoryManager
X_POINT_ID
 
Constructor Summary
DataSourceRepositoryManager(DataSource ds)
           Default Constructor
 
Method Summary
 void addProductType(ProductType productType)
           Adds a ProductType to the RepositoryManager.
 ProductType getProductTypeById(String productTypeId)
           Gets a {link ProductType} from the RepositoryManager identified by its productTypeId.
 ProductType getProductTypeByName(String productTypeName)
           Gets a ProductType specified by its productTypeName, from the RepositoryManager.
 List<ProductType> getProductTypes()
           Gets all the ProductTypes from the repository.
 void modifyProductType(ProductType productType)
           Modifies a ProductType in the RepositoryManager with the specified ID field of the productType.
 void removeProductType(ProductType productType)
           Removes a ProductType from the RepositoryManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSourceRepositoryManager

public DataSourceRepositoryManager(DataSource ds)

Default Constructor

.

Parameters:
ds - The DataSource to initialize this repository manager with.
Method Detail

addProductType

public void addProductType(ProductType productType)
                    throws RepositoryManagerException
Description copied from interface: RepositoryManager

Adds a ProductType to the RepositoryManager.

Specified by:
addProductType in interface RepositoryManager
Parameters:
productType - The ProductType to add.
Throws:
RepositoryManagerException

modifyProductType

public void modifyProductType(ProductType productType)
                       throws RepositoryManagerException
Description copied from interface: RepositoryManager

Modifies a ProductType in the RepositoryManager with the specified ID field of the productType.

Specified by:
modifyProductType in interface RepositoryManager
Parameters:
productType - The new ProductType information.
Throws:
RepositoryManagerException - If any error occurs.

removeProductType

public void removeProductType(ProductType productType)
                       throws RepositoryManagerException
Description copied from interface: RepositoryManager

Removes a ProductType from the RepositoryManager

.

Specified by:
removeProductType in interface RepositoryManager
Parameters:
productType - The productType to remove.
Throws:
RepositoryManagerException - If any error occurs during the removal.

getProductTypeById

public ProductType getProductTypeById(String productTypeId)
                               throws RepositoryManagerException
Description copied from interface: RepositoryManager

Gets a {link ProductType} from the RepositoryManager identified by its productTypeId.

Specified by:
getProductTypeById in interface RepositoryManager
Parameters:
productTypeId - The ID of the ProductType to retrieve.
Returns:
The ProductType corresponding to the specified productTypeId.
Throws:
RepositoryManagerException - If any error occurs.

getProductTypeByName

public ProductType getProductTypeByName(String productTypeName)
                                 throws RepositoryManagerException
Description copied from interface: RepositoryManager

Gets a ProductType specified by its productTypeName, from the RepositoryManager.

Specified by:
getProductTypeByName in interface RepositoryManager
Parameters:
productTypeName - The name of the ProductType to get.
Returns:
A ProductType, with the specified name.
Throws:
RepositoryManagerException - If any error occurs.

getProductTypes

public List<ProductType> getProductTypes()
                                  throws RepositoryManagerException
Description copied from interface: RepositoryManager

Gets all the ProductTypes from the repository.

Specified by:
getProductTypes in interface RepositoryManager
Returns:
A List of ProductTypes from the repository.
Throws:
RepositoryManagerException - If any error occurs.


Copyright © 1999-2011 Apache OODT. All Rights Reserved.