Package com.sun.jersey.samples.jmaki.beans

Examples of com.sun.jersey.samples.jmaki.beans.TreeModel


     */
    @Test
    public void doTestGetPrinterJMakiTree() {
        WebResource webResource = resource();
        //GET on printer list - mime-type application/json
        TreeModel treeModel = webResource.path("printers").path("jMakiTree").accept(MediaType.APPLICATION_JSON).get(TreeModel.class);
        Assert.assertEquals("Method: doTestGetPrinterJMakiTree \nMessage: Root of the returned " +
                "jMakiTree doesn't match the expected value", "printers", treeModel.root.label);
    }
View Full Code Here


    }

    @GET @Path("/jMakiTree")
    @Produces("application/json")
    public TreeModel getTree() {
        TreeModel model = new TreeModel();
        model.root = new TreeModel.Node("printers");
        if (!getPrinters().isEmpty()) {
            model.root.children = new LinkedList<TreeModel.Node>();
            model.root.expanded = true;
            Map<String, TreeModel.Node> byModel = new HashMap<String, TreeModel.Node>();
View Full Code Here

TOP

Related Classes of com.sun.jersey.samples.jmaki.beans.TreeModel

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.