Package org.apache.oodt.cas.filemgr.structs

Examples of org.apache.oodt.cas.filemgr.structs.ProductType


    }

    public Hashtable<String, Object> getNextPage(
            Hashtable<String, Object> productTypeHash,
            Hashtable<String, Object> currentPageHash) {
        ProductType type = XmlRpcStructFactory
                .getProductTypeFromXmlRpc(productTypeHash);
        ProductPage currPage = XmlRpcStructFactory
                .getProductPageFromXmlRpc(currentPageHash);
        ProductPage page = catalog.getNextPage(type, currPage);
        try {
View Full Code Here


    }

    public Hashtable<String, Object> getPrevPage(
            Hashtable<String, Object> productTypeHash,
            Hashtable<String, Object> currentPageHash) {
        ProductType type = XmlRpcStructFactory
                .getProductTypeFromXmlRpc(productTypeHash);
        ProductPage currPage = XmlRpcStructFactory
                .getProductPageFromXmlRpc(currentPageHash);
        ProductPage page = catalog.getPrevPage(type, currPage);
        try {
View Full Code Here

        return XmlRpcStructFactory.getXmlRpcProductPage(page);
    }

    public String addProductType(Hashtable<String, Object> productTypeHash)
            throws RepositoryManagerException {
        ProductType productType = XmlRpcStructFactory
                .getProductTypeFromXmlRpc(productTypeHash);
        repositoryManager.addProductType(productType);
        return productType.getProductTypeId();

    }
View Full Code Here

    public int getNumProducts(Hashtable<String, Object> productTypeHash)
            throws CatalogException {
        int numProducts = -1;

        ProductType type = XmlRpcStructFactory
                .getProductTypeFromXmlRpc(productTypeHash);

        try {
            numProducts = catalog.getNumProducts(type);
        } catch (CatalogException e) {
View Full Code Here

    }

    public Vector<Hashtable<String, Object>> getTopNProducts(int n,
            Hashtable<String, Object> productTypeHash)
            throws CatalogException {
        ProductType type = XmlRpcStructFactory
                .getProductTypeFromXmlRpc(productTypeHash);
        List<Product> topNProducts = null;

        try {
            topNProducts = catalog.getTopNProducts(n, type);
            return XmlRpcStructFactory.getXmlRpcProductList(topNProducts);
        } catch (Exception e) {
            e.printStackTrace();
            LOG.log(Level.WARNING,
                    "Exception when getting topN products by product type: ["
                            + type.getProductTypeId() + "]: Message: "
                            + e.getMessage());
            throw new CatalogException(e.getMessage());
        }

    }
View Full Code Here

    }

    public Vector<Hashtable<String, Object>> getProductsByProductType(
            Hashtable<String, Object> productTypeHash)
            throws CatalogException {
        ProductType type = XmlRpcStructFactory
                .getProductTypeFromXmlRpc(productTypeHash);
        List<Product> productList = null;

        try {
            productList = catalog.getProductsByProductType(type);
            return XmlRpcStructFactory.getXmlRpcProductList(productList);
        } catch (Exception e) {
            e.printStackTrace();
            LOG.log(Level.SEVERE,
                    "Exception obtaining products by product type for type: ["
                            + type.getName() + "]: Message: " + e.getMessage());
            throw new CatalogException(e.getMessage());
        }
    }
View Full Code Here

    }

    public Vector<Hashtable<String, Object>> getElementsByProductType(
            Hashtable<String, Object> productTypeHash)
            throws ValidationLayerException {
        ProductType type = XmlRpcStructFactory
                .getProductTypeFromXmlRpc(productTypeHash);
        List<Element> elementList = null;

        try {
            elementList = catalog.getValidationLayer().getElements(type);
            return XmlRpcStructFactory.getXmlRpcElementList(elementList);
        } catch (Exception e) {
            e.printStackTrace();
            LOG.log(Level.SEVERE,
                    "Exception obtaining elements for product type: ["
                            + type.getName() + "]: Message: " + e.getMessage());
            throw new ValidationLayerException(e.getMessage());
        }

    }
View Full Code Here

    public Vector<Hashtable<String, Object>> query(
            Hashtable<String, Object> queryHash,
            Hashtable<String, Object> productTypeHash)
            throws CatalogException {
        Query query = XmlRpcStructFactory.getQueryFromXmlRpc(queryHash);
        ProductType type = XmlRpcStructFactory
                .getProductTypeFromXmlRpc(productTypeHash);
        return XmlRpcStructFactory.getXmlRpcProductList(this.query(query, type));
    }
View Full Code Here

        return XmlRpcStructFactory.getXmlRpcProductList(this.query(query, type));
    }

    public Hashtable<String, Object> getProductTypeByName(String productTypeName)
            throws RepositoryManagerException {
        ProductType type = repositoryManager
                .getProductTypeByName(productTypeName);
        return XmlRpcStructFactory.getXmlRpcProductType(type);
    }
View Full Code Here

        return XmlRpcStructFactory.getXmlRpcProductType(type);
    }

    public Hashtable<String, Object> getProductTypeById(String productTypeId)
            throws RepositoryManagerException {
        ProductType type = null;

        try {
            type = repositoryManager.getProductTypeById(productTypeId);
            return XmlRpcStructFactory.getXmlRpcProductType(type);
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.filemgr.structs.ProductType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.