org.apache.oodt.cas.filemgr.system
Class XmlRpcFileManager

java.lang.Object
  extended by org.apache.oodt.cas.filemgr.system.XmlRpcFileManager

public class XmlRpcFileManager
extends Object

Version:
$Revision: 11462 $

An XML RPC-based File manager.

Author:
mattmann, bfoster

Constructor Summary
XmlRpcFileManager(int port)
           Creates a new XmlRpcFileManager with the given metadata store factory, and the given data store factory, on the given port.
 
Method Summary
 boolean addMetadata(Hashtable<String,Object> productHash, Hashtable<String,String> metadata)
           
 boolean addProductReferences(Hashtable<String,Object> productHash)
           
 String addProductType(Hashtable<String,Object> productTypeHash)
           
 String catalogProduct(Hashtable<String,Object> productHash)
           
 Vector<Hashtable<String,Object>> complexQuery(Hashtable<String,Object> complexQueryHash)
           
 Hashtable<String,Object> getCatalogQuery(Hashtable<String,Object> queryHash, Hashtable<String,Object> productTypeHash)
           
 Hashtable<String,Object> getCatalogValues(Hashtable<String,Object> metadataHash, Hashtable<String,Object> productTypeHash)
           
 Hashtable<String,Object> getCurrentFileTransfer()
           
 Vector<Hashtable<String,Object>> getCurrentFileTransfers()
           
 Hashtable<String,Object> getElementById(String elementId)
           
 Hashtable<String,Object> getElementByName(String elementName)
           
 Vector<Hashtable<String,Object>> getElementsByProductType(Hashtable<String,Object> productTypeHash)
           
 Hashtable<String,Object> getFirstPage(Hashtable<String,Object> productTypeHash)
           
 Hashtable<String,Object> getLastPage(Hashtable<String,Object> productTypeHash)
           
 Hashtable<String,Object> getMetadata(Hashtable<String,Object> productHash)
           
 Hashtable<String,Object> getNextPage(Hashtable<String,Object> productTypeHash, Hashtable<String,Object> currentPageHash)
           
 int getNumProducts(Hashtable<String,Object> productTypeHash)
           
 Hashtable<String,Object> getOrigValues(Hashtable<String,Object> metadataHash, Hashtable<String,Object> productTypeHash)
           
 Hashtable<String,Object> getPrevPage(Hashtable<String,Object> productTypeHash, Hashtable<String,Object> currentPageHash)
           
 Hashtable<String,Object> getProductById(String productId)
           
 Hashtable<String,Object> getProductByName(String productName)
           
 double getProductPctTransferred(Hashtable<String,Object> productHash)
           
 Vector<Hashtable<String,Object>> getProductReferences(Hashtable<String,Object> productHash)
           
 Vector<Hashtable<String,Object>> getProductsByProductType(Hashtable<String,Object> productTypeHash)
           
 Hashtable<String,Object> getProductTypeById(String productTypeId)
           
 Hashtable<String,Object> getProductTypeByName(String productTypeName)
           
 Vector<Hashtable<String,Object>> getProductTypes()
           
 Hashtable<String,Object> getReducedMetadata(Hashtable<String,Object> productHash, Vector<String> elements)
           
 double getRefPctTransferred(Hashtable<String,Object> refHash)
           
 Vector<Hashtable<String,Object>> getTopNProducts(int n)
           
 Vector<Hashtable<String,Object>> getTopNProducts(int n, Hashtable<String,Object> productTypeHash)
           
 boolean hasProduct(String productName)
           
 String ingestProduct(Hashtable<String,Object> productHash, Hashtable<String,String> metadata, boolean clientTransfer)
           
 boolean isAlive()
           
 boolean isTransferComplete(Hashtable<String,Object> productHash)
           
static void main(String[] args)
           
 boolean modifyProduct(Hashtable productHash)
           
 boolean moveProduct(Hashtable<String,Object> productHash, String newPath)
           
 Hashtable<String,Object> pagedQuery(Hashtable<String,Object> queryHash, Hashtable<String,Object> productTypeHash, int pageNum)
           
 Vector<Hashtable<String,Object>> query(Hashtable<String,Object> queryHash, Hashtable<String,Object> productTypeHash)
           
 boolean refreshConfigAndPolicy()
           
 boolean removeFile(String filePath)
           
 boolean removeProduct(Hashtable<String,Object> productHash)
           
 boolean removeProductTransferStatus(Hashtable<String,Object> productHash)
           
 void setCatalog(Catalog catalog)
           
 boolean setProductTransferStatus(Hashtable<String,Object> productHash)
           
 boolean shutdown()
           
 boolean transferFile(String filePath, byte[] fileData, int offset, int numBytes)
           
 boolean transferringProduct(Hashtable<String,Object> productHash)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlRpcFileManager

public XmlRpcFileManager(int port)
                  throws Exception

Creates a new XmlRpcFileManager with the given metadata store factory, and the given data store factory, on the given port.

Parameters:
port - The web server port to run the XML Rpc server on, defaults to 1999.
Throws:
Exception
Method Detail

setCatalog

public void setCatalog(Catalog catalog)

isAlive

public boolean isAlive()

refreshConfigAndPolicy

public boolean refreshConfigAndPolicy()

transferringProduct

public boolean transferringProduct(Hashtable<String,Object> productHash)

getCurrentFileTransfer

public Hashtable<String,Object> getCurrentFileTransfer()

getCurrentFileTransfers

public Vector<Hashtable<String,Object>> getCurrentFileTransfers()

getProductPctTransferred

public double getProductPctTransferred(Hashtable<String,Object> productHash)

getRefPctTransferred

public double getRefPctTransferred(Hashtable<String,Object> refHash)

removeProductTransferStatus

public boolean removeProductTransferStatus(Hashtable<String,Object> productHash)

isTransferComplete

public boolean isTransferComplete(Hashtable<String,Object> productHash)

pagedQuery

public Hashtable<String,Object> pagedQuery(Hashtable<String,Object> queryHash,
                                           Hashtable<String,Object> productTypeHash,
                                           int pageNum)
                                    throws CatalogException
Throws:
CatalogException

getFirstPage

public Hashtable<String,Object> getFirstPage(Hashtable<String,Object> productTypeHash)

getLastPage

public Hashtable<String,Object> getLastPage(Hashtable<String,Object> productTypeHash)

getNextPage

public Hashtable<String,Object> getNextPage(Hashtable<String,Object> productTypeHash,
                                            Hashtable<String,Object> currentPageHash)

getPrevPage

public Hashtable<String,Object> getPrevPage(Hashtable<String,Object> productTypeHash,
                                            Hashtable<String,Object> currentPageHash)

addProductType

public String addProductType(Hashtable<String,Object> productTypeHash)
                      throws RepositoryManagerException
Throws:
RepositoryManagerException

setProductTransferStatus

public boolean setProductTransferStatus(Hashtable<String,Object> productHash)
                                 throws CatalogException
Throws:
CatalogException

getNumProducts

public int getNumProducts(Hashtable<String,Object> productTypeHash)
                   throws CatalogException
Throws:
CatalogException

getTopNProducts

public Vector<Hashtable<String,Object>> getTopNProducts(int n)
                                                 throws CatalogException
Throws:
CatalogException

getTopNProducts

public Vector<Hashtable<String,Object>> getTopNProducts(int n,
                                                        Hashtable<String,Object> productTypeHash)
                                                 throws CatalogException
Throws:
CatalogException

hasProduct

public boolean hasProduct(String productName)
                   throws CatalogException
Throws:
CatalogException

getMetadata

public Hashtable<String,Object> getMetadata(Hashtable<String,Object> productHash)
                                     throws CatalogException
Throws:
CatalogException

getReducedMetadata

public Hashtable<String,Object> getReducedMetadata(Hashtable<String,Object> productHash,
                                                   Vector<String> elements)
                                            throws CatalogException
Throws:
CatalogException

getProductTypes

public Vector<Hashtable<String,Object>> getProductTypes()
                                                 throws RepositoryManagerException
Throws:
RepositoryManagerException

getProductReferences

public Vector<Hashtable<String,Object>> getProductReferences(Hashtable<String,Object> productHash)
                                                      throws CatalogException
Throws:
CatalogException

getProductById

public Hashtable<String,Object> getProductById(String productId)
                                        throws CatalogException
Throws:
CatalogException

getProductByName

public Hashtable<String,Object> getProductByName(String productName)
                                          throws CatalogException
Throws:
CatalogException

getProductsByProductType

public Vector<Hashtable<String,Object>> getProductsByProductType(Hashtable<String,Object> productTypeHash)
                                                          throws CatalogException
Throws:
CatalogException

getElementsByProductType

public Vector<Hashtable<String,Object>> getElementsByProductType(Hashtable<String,Object> productTypeHash)
                                                          throws ValidationLayerException
Throws:
ValidationLayerException

getElementById

public Hashtable<String,Object> getElementById(String elementId)
                                        throws ValidationLayerException
Throws:
ValidationLayerException

getElementByName

public Hashtable<String,Object> getElementByName(String elementName)
                                          throws ValidationLayerException
Throws:
ValidationLayerException

complexQuery

public Vector<Hashtable<String,Object>> complexQuery(Hashtable<String,Object> complexQueryHash)
                                              throws CatalogException
Throws:
CatalogException

query

public Vector<Hashtable<String,Object>> query(Hashtable<String,Object> queryHash,
                                              Hashtable<String,Object> productTypeHash)
                                       throws CatalogException
Throws:
CatalogException

getProductTypeByName

public Hashtable<String,Object> getProductTypeByName(String productTypeName)
                                              throws RepositoryManagerException
Throws:
RepositoryManagerException

getProductTypeById

public Hashtable<String,Object> getProductTypeById(String productTypeId)
                                            throws RepositoryManagerException
Throws:
RepositoryManagerException

catalogProduct

public String catalogProduct(Hashtable<String,Object> productHash)
                      throws CatalogException
Throws:
CatalogException

addMetadata

public boolean addMetadata(Hashtable<String,Object> productHash,
                           Hashtable<String,String> metadata)
                    throws CatalogException
Throws:
CatalogException

addProductReferences

public boolean addProductReferences(Hashtable<String,Object> productHash)
                             throws CatalogException
Throws:
CatalogException

ingestProduct

public String ingestProduct(Hashtable<String,Object> productHash,
                            Hashtable<String,String> metadata,
                            boolean clientTransfer)
                     throws VersioningException,
                            RepositoryManagerException,
                            DataTransferException,
                            CatalogException
Throws:
VersioningException
RepositoryManagerException
DataTransferException
CatalogException

transferFile

public boolean transferFile(String filePath,
                            byte[] fileData,
                            int offset,
                            int numBytes)

moveProduct

public boolean moveProduct(Hashtable<String,Object> productHash,
                           String newPath)
                    throws DataTransferException
Throws:
DataTransferException

removeFile

public boolean removeFile(String filePath)

modifyProduct

public boolean modifyProduct(Hashtable productHash)
                      throws CatalogException
Throws:
CatalogException

removeProduct

public boolean removeProduct(Hashtable<String,Object> productHash)
                      throws CatalogException
Throws:
CatalogException

getCatalogValues

public Hashtable<String,Object> getCatalogValues(Hashtable<String,Object> metadataHash,
                                                 Hashtable<String,Object> productTypeHash)
                                          throws RepositoryManagerException
Throws:
RepositoryManagerException

getOrigValues

public Hashtable<String,Object> getOrigValues(Hashtable<String,Object> metadataHash,
                                              Hashtable<String,Object> productTypeHash)
                                       throws RepositoryManagerException
Throws:
RepositoryManagerException

getCatalogQuery

public Hashtable<String,Object> getCatalogQuery(Hashtable<String,Object> queryHash,
                                                Hashtable<String,Object> productTypeHash)
                                         throws RepositoryManagerException,
                                                QueryFormulationException
Throws:
RepositoryManagerException
QueryFormulationException

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

shutdown

public boolean shutdown()


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