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

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

public class XMLRepositoryManager
extends Object
implements RepositoryManager

Version:
$Revision$

A RepositoryManager that manages Product policy based on an xml file called product-types.xml.

Author:
mattmann, bfoster

Field Summary
 
Fields inherited from interface org.apache.oodt.cas.filemgr.repository.RepositoryManager
X_POINT_ID
 
Constructor Summary
XMLRepositoryManager(List<String> uris)
           
 
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

XMLRepositoryManager

public XMLRepositoryManager(List<String> uris)
                     throws InstantiationException
Throws:
InstantiationException
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-2013
Apache OODT. All Rights Reserved.