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

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


    public void propertyValueDeserTest() throws Exception {

        String json = "{\"myKey\":\"myValue\"}";

        ObjectMapper mapper = new ObjectMapper();
        PROPERTY_VALUE pv = mapper.readValue(json, PROPERTY_VALUE.class);

        assertEquals(pv.getKey(), "myKey", "Key is " + pv.getKey());
        assertEquals(pv.getValue(), "myValue", "Value is " + pv.getValue());
    }
View Full Code Here


    Result redeployOnServer() {
        Operation op = new Operation("full-replace-deployment", new Address());
        op.addAdditionalProperty("name", runtimeName);
        List<Object> content = new ArrayList<Object>(1);
        Map<String, Object> contentValues = new HashMap<String, Object>();
        contentValues.put("hash", new PROPERTY_VALUE("BYTES_VALUE", hash));
        content.add(contentValues);
        op.addAdditionalProperty("content", content);
        return connection.execute(op);
    }
View Full Code Here

        Operation step1 = new Operation("add", "deployment", deploymentName);
        //        step1.addAdditionalProperty("hash", new PROPERTY_VALUE("BYTES_VALUE", hash));
        List<Object> content = new ArrayList<Object>(1);
        Map<String, Object> contentValues = new HashMap<String, Object>();
        contentValues.put("hash", new PROPERTY_VALUE("BYTES_VALUE", hash));
        content.add(contentValues);
        step1.addAdditionalProperty("content", content);

        step1.addAdditionalProperty("name", deploymentName);
        step1.addAdditionalProperty("runtime-name", runtimeName);
View Full Code Here

        jsonParser.nextToken();
        String value = jsonParser.getText();
        jsonParser.nextToken();
        tmp = jsonParser.getText(); // }

        PROPERTY_VALUE pv = new PROPERTY_VALUE(key,value);
        return pv;
    }
View Full Code Here

                    deploymentsAddress.add("deployment", packageName);
                    Operation step1 = new Operation("add", deploymentsAddress);
                    //                    step1.addAdditionalProperty("hash", new PROPERTY_VALUE("BYTES_VALUE", hash));
                    List<Object> content = new ArrayList<Object>(1);
                    Map<String, Object> contentValues = new HashMap<String, Object>();
                    contentValues.put("hash", new PROPERTY_VALUE("BYTES_VALUE", hash));
                    content.add(contentValues);
                    step1.addAdditionalProperty("content", content);

                    step1.addAdditionalProperty("name", packageName);
View Full Code Here

        Address deploymentsAddress = new Address("deployment", TEST_WAR_FILE_NAME);
        Operation op = new Operation("add", deploymentsAddress);
        List<Object> content = new ArrayList<Object>(1);
        Map<String, Object> contentValues = new HashMap<String, Object>();
        contentValues.put("hash", new PROPERTY_VALUE("BYTES_VALUE", bytes_value));
        content.add(contentValues);
        op.addAdditionalProperty("content", content);
        op.addAdditionalProperty("name", TEST_WAR_FILE_NAME); // this needs to be unique per upload
        op.addAdditionalProperty("runtime-name", TEST_WAR_FILE_NAME);
        System.out.flush();
View Full Code Here

        Address deploymentsAddress = new Address();
        deploymentsAddress.add("deployment", TEST_WAR_FILE_NAME);
        Operation step1 = new Operation("add", deploymentsAddress);
        List<Object> content = new ArrayList<Object>(1);
        Map<String, Object> contentValues = new HashMap<String, Object>();
        contentValues.put("hash", new PROPERTY_VALUE("BYTES_VALUE", bytes_value));
        content.add(contentValues);
        step1.addAdditionalProperty("content", content);
        step1.addAdditionalProperty("name", TEST_WAR_FILE_NAME); // this needs to be unique per upload

        Address serverGroupAddress = new Address();
View Full Code Here

        Address deploymentsAddress = new Address("deployment", TEST_WAR_FILE_NAME);
        Operation step1 = new Operation("add", deploymentsAddress);
        List<Object> content = new ArrayList<Object>(1);
        Map<String, Object> contentValues = new HashMap<String, Object>();
        contentValues.put("hash", new PROPERTY_VALUE("BYTES_VALUE", bytes_value));
        content.add(contentValues);
        step1.addAdditionalProperty("content", content);
        step1.addAdditionalProperty("name", TEST_WAR_FILE_NAME); // this needs to be unique per upload

        CompositeOperation cop = new CompositeOperation();
View Full Code Here

        }

        Operation addDeploymentStep = new Operation("add", "deployment", filename);
        List<Object> addDeploymentContentProperty = new ArrayList<Object>(1);
        Map<String, Object> contentValues = new HashMap<String, Object>();
        contentValues.put("hash", new PROPERTY_VALUE("BYTES_VALUE", hash));
        addDeploymentContentProperty.add(contentValues);
        addDeploymentStep.addAdditionalProperty("content", addDeploymentContentProperty);
        addDeploymentStep.addAdditionalProperty("name", filename);
        addDeploymentStep.addAdditionalProperty("runtime-name", runtimeName);
View Full Code Here

            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
            }

            Result res = getASConnection().execute(op);
            if (!res.isSuccess()) {
               log.warn("Getting metric [" + req.getName() + "] at [ " + getAddress() + "] failed: " + res.getFailureDescription());
View Full Code Here

TOP

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

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.