Package net.sprd.sampleapps.common.http

Examples of net.sprd.sampleapps.common.http.HttpCallCommand.execute()


    }

    public ArticleDTO getArticle(String articleId) {
        HttpCallCommand command =
                factory.createJaxbHttpCallCommand(shop.getArticles().getHref() + "/" + articleId, HttpMethod.GET, null);
        command.execute();
        if (command.getStatus() != 200)
            throw new IllegalArgumentException("Articles data not available");
        else
            return (ArticleDTO) ((JAXBElement) command.getOutput()).getValue();
    }
View Full Code Here


    }

     public ProductDTO getProduct(String productId) {
        HttpCallCommand command =
                factory.createJaxbHttpCallCommand(shop.getProducts().getHref() + "/" + productId, HttpMethod.GET, null);
        command.execute();
        if (command.getStatus() != 200)
            throw new IllegalArgumentException("Products data not available");
        else
            return (ProductDTO) ((JAXBElement) command.getOutput()).getValue();
    }
View Full Code Here

    }

    public ArticleDTOList getArticles() {
        HttpCallCommand command =
                factory.createJaxbHttpCallCommand(shop.getArticles().getHref() + "?fullData=true&limit=200", HttpMethod.GET, null);
        command.execute();
        if (command.getStatus() != 200)
            throw new IllegalArgumentException("Articles data not available");
        else
            return (ArticleDTOList) ((JAXBElement) command.getOutput()).getValue();
    }
View Full Code Here

    }

    public ProductTypeDTOList getProductTypes() {
        HttpCallCommand command =
                factory.createJaxbHttpCallCommand(shop.getProductTypes().getHref() + "?fullData=true&limit=1000", HttpMethod.GET, null);
        command.execute();
        if (command.getStatus() != 200)
            throw new IllegalArgumentException("ProductTypes data not available");
        else
            return (ProductTypeDTOList) ((JAXBElement) command.getOutput()).getValue();
    }
View Full Code Here

    }

    public PrintTypeDTOList getPrintTypes() {
        HttpCallCommand command =
                factory.createJaxbHttpCallCommand(shop.getPrintTypes().getHref() + "?fullData=true&limit=1000", HttpMethod.GET, null);
        command.execute();
        if (command.getStatus() != 200)
            throw new IllegalArgumentException("PrintTypes data not available");
        else
            return (PrintTypeDTOList) ((JAXBElement) command.getOutput()).getValue();
    }
View Full Code Here

    }

    public FontFamilyDTOList getFontFamilies() {
        HttpCallCommand command =
                factory.createJaxbHttpCallCommand(shop.getFontFamilies().getHref() + "?fullData=true&limit=1000", HttpMethod.GET, null);
        command.execute();
        if (command.getStatus() != 200)
            throw new IllegalArgumentException("FontFamilies data not available");
        else
            return (FontFamilyDTOList) ((JAXBElement) command.getOutput()).getValue();
    }
View Full Code Here

            return (FontFamilyDTOList) ((JAXBElement) command.getOutput()).getValue();
    }

    public ShopDTO getShop() {
        HttpCallCommand command = factory.createJaxbHttpCallCommand(Configuration.getInstance().getShopUrl(), HttpMethod.GET, null);
        command.execute();
        if (command.getStatus() != 200)
            throw new IllegalArgumentException("Shop data not available");
        else {
            return (ShopDTO) ((JAXBElement) command.getOutput()).getValue();
        }
View Full Code Here

        }
    }

    public CurrencyDTO getShopCurrency() {
        HttpCallCommand command = factory.createJaxbHttpCallCommand(getShop().getCurrency().getHref(), HttpMethod.GET, null);
        command.execute();
        if (command.getStatus() != 200)
            throw new IllegalArgumentException("Shop data not available");
        else {
            return (CurrencyDTO) ((JAXBElement) command.getOutput()).getValue();
        }
View Full Code Here


    public DesignDTOList getDesigns() {
        HttpCallCommand command =
                factory.createJaxbHttpCallCommand(shop.getDesignCategories().getHref() + "/b1000000/designs?fullData=true&offset=0&limit=100", HttpMethod.GET, null);
        command.execute();
        if (command.getStatus() != 200)
            throw new IllegalArgumentException("Desgisn data not available");
        else
            return (DesignDTOList) ((JAXBElement) command.getOutput()).getValue();
    }
View Full Code Here

            return (DesignDTOList) ((JAXBElement) command.getOutput()).getValue();
    }

     public CurrencyDTOList getCurrencies() {
        HttpCallCommand command = factory.createJaxbHttpCallCommand(getShop().getCurrencies().getHref()+"?fullData=true", HttpMethod.GET, null);
        command.execute();
        if (command.getStatus() != 200)
            throw new IllegalArgumentException("Shop data not available");
        else {
            return (CurrencyDTOList) ((JAXBElement) command.getOutput()).getValue();           
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.