Package org.rhq.modules.plugins.jbossas7.json

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


        FakeConnection connection = new FakeConnection();
        String resultString = loadJsonFromFile("collapsedMapTest.json");

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

        connection.setContent(json);

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


        FakeConnection connection = new FakeConnection();
        String resultString = loadJsonFromFile("collapsedMapTest.json");

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

        connection.setContent(json);

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

    }

    public void testListOfPlainMaps() throws Exception {
        String resultString = loadJsonFromFile("listofplainmaps.json");
        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

    @SuppressWarnings("unchecked")
    public void testGroupedPropertiesWithIdenticalNames() throws Exception {
        String resultString = loadJsonFromFile("groupedproperties.json");
        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

        Address address= new Address();
        address.add("subsystem","web");
        address.add("connector","http");
        address.add("profile","default");

        CompositeOperation op = new CompositeOperation();

        Operation step1 = new Operation("add", address);
        op.addStep(step1);

        Operation step2 = new Operation("deploy", address);
        op.addStep(step2);

        ObjectMapper mapper = new ObjectMapper();

        String result = mapper.writeValueAsString(op);
View Full Code Here

        Operation step3 = new Operation("remove",serverGroupAddress);

        Operation step4 = new Operation("remove",deploymentsAddress);

        CompositeOperation cop = new CompositeOperation();
        cop.addStep(step1);
        cop.addStep(step2);
        cop.addStep(step3);
        cop.addStep(step4);

        ObjectMapper mapper = new ObjectMapper();

        String result = mapper.writeValueAsString(cop);
        System.out.println(result);
View Full Code Here

            if (reqName == null) {
               reqName = req.getName();
            }

            ComplexRequest request = null;
            Operation op;
            if (reqName.contains(":")) {
               request = ComplexRequest.create(reqName);
               op = new ReadAttribute(getAddress(), request.getProp());
            } else {
               op = new ReadAttribute(getAddress(), reqName); // TODO batching
View Full Code Here

            return report;
        }
        String newName = report.getUserSpecifiedResourceName();
        Address address = new Address(this.getAddress());
        address.add(flavor,newName);
        Operation add = new Operation("add",address);
        for (Property prop: config.getProperties()) {
            if (prop.getName().equals(FLAVOR)) {
                continue;
            }
            PropertySimple ps = (PropertySimple) prop;
            add.addAdditionalProperty(prop.getName(),ps.getStringValue()); // TODO format conversion?

        }
        Result result = getASConnection().execute(add);
        if (result.isSuccess()) {
            report.setResourceKey(address.getPath());
View Full Code Here

    }

    protected boolean waitUntilDown() throws InterruptedException {
        boolean notAnswering = false;
        while (!notAnswering) {
            Operation op = new ReadAttribute(new Address(), "release-version");

            try {
                Result res = getASConnection().execute(op);
                if (!res.isSuccess()) { // If op succeeds, server is not down
                    notAnswering = true;
View Full Code Here

    }

    private boolean waitForServerToStart() throws InterruptedException {
        boolean up = false;
        while (!up) {
            Operation op = new ReadAttribute(new Address(), "release-version");
            try {
                Result res = getASConnection().execute(op);
                if (res.isSuccess()) { // If op succeeds, server is not down
                    up = true;
                }
View Full Code Here

TOP

Related Classes of org.rhq.modules.plugins.jbossas7.json.ComplexResult

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.