Examples of ComplexResult


Examples of org.rhq.modules.plugins.jbossas7.json.ComplexResult

            if (mode == D2DMode.RECURSIVE) {
                op.addAdditionalProperty("operations", true);
                op.addAdditionalProperty("include-runtime", true);
            }
   
            ComplexResult res = conn.executeComplex(op);
            if (res == null) {
                System.err.println("Got no result");
                return;
            }
            if (!res.isSuccess()) {
                System.err.println("Failure: " + res.getFailureDescription());
                return;
            }
   
            //load json object hierarchy of response
            Map<String, Object> resMap = res.getResult();
            String what;
            if (mode == D2DMode.OPERATION) {
                what = "operations";
            } else {
                what = "attributes";
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.json.ComplexResult

            ret.add(info);

            address = new Address("host", domainHost);
            address.add("server-config", server);
            operation = new ReadResource(address);
            ComplexResult cres = connection.executeComplex(operation);
            Map<String, Object> map = cres.getResult();
            info.group = (String) map.get("group");
            info.autoStart = (Boolean) map.get("auto-start");
            Integer offset = (Integer) map.get("socket-binding-port-offset");
            if (offset != null)
                info.portOffset = offset;
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.json.ComplexResult

    private HostInfo getHostInfo(String domainHost) {
        Address address = new Address("host", domainHost);
        Operation operation = new ReadResource(address);
        HostInfo info = new HostInfo();

        ComplexResult cres = parentComponent.getASConnection().executeComplex(operation);
        if (!cres.isSuccess())
            return null;

        Map<String, Object> map = cres.getResult();
        info.releaseCodeName = (String) map.get("release-codename");
        info.releaseVersion = (String) map.get("release-version");
        info.productName = (String) map.get("product-name");
        info.productVersion = (String) map.get("product-version");
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.json.ComplexResult

        String resultString = " {\"outcome\" : \"success\", \"result\" : {\"alias\" : [\"example.com\",\"example2.com\"],"
            + " \"access-log\" : \"my.log\", \"rewrite\" : true}}";

        ObjectMapper mapper = new ObjectMapper();
        //deserialize string to ComplexResult.
        ComplexResult result = mapper.readValue(resultString, ComplexResult.class);

        //create json tree from result.
        JsonNode json = mapper.valueToTree(result);

        //add the created content to the fake connection so that we set the results to be returned.
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.json.ComplexResult

        PropertyDefinitionMap fileMapDef = new PropertyDefinitionMap("file", "Log file", true, pathProperty,
            relativeToProperty);
        definition.put(fileMapDef);

        ObjectMapper mapper = new ObjectMapper();
        ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
        JsonNode json = mapper.valueToTree(result);

        connection.setContent(json);

        ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition, connection, null);
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.json.ComplexResult

            + "    }\n" + "  }\n" + "}";

        ConfigurationDefinition definition = loadDescriptor("socketBinding");

        ObjectMapper mapper = new ObjectMapper();
        ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
        JsonNode json = mapper.valueToTree(result);

        FakeConnection connection = new FakeConnection();
        connection.setContent(json);
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.json.ComplexResult

        String resultString = loadJsonFromFile("schema-locations.json");

        ConfigurationDefinition definition = loadDescriptor("test5");

        ObjectMapper mapper = new ObjectMapper();
        ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
        JsonNode json = mapper.valueToTree(result);

        FakeConnection connection = new FakeConnection();
        connection.setContent(json);
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.json.ComplexResult

        String resultString = loadJsonFromFile("loopback.json");

        ConfigurationDefinition definition = loadDescriptor("test6and7");

        ObjectMapper mapper = new ObjectMapper();
        ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
        JsonNode json = mapper.valueToTree(result);

        FakeConnection connection = new FakeConnection();
        connection.setContent(json);
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.json.ComplexResult

        String resultString = loadJsonFromFile("interfaces.json");

        ConfigurationDefinition definition = loadDescriptor("test6and7");

        ObjectMapper mapper = new ObjectMapper();
        ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
        JsonNode json = mapper.valueToTree(result);

        FakeConnection connection = new FakeConnection();
        connection.setContent(json);
View Full Code Here

Examples of org.rhq.modules.plugins.jbossas7.json.ComplexResult

        String resultString = loadJsonFromFile("connector.json");

        ConfigurationDefinition definition = loadDescriptor("test8");

        ObjectMapper mapper = new ObjectMapper();
        ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
        JsonNode json = mapper.valueToTree(result);

        FakeConnection connection = new FakeConnection();
        connection.setContent(json);
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.