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

Examples of org.rhq.modules.plugins.jbossas7.json.WriteAttribute.addAdditionalProperty()


                Operation write = new WriteAttribute(address);
                write.addAdditionalProperty("name", attribute);//attribute to execute on

                //now complete the write operation by updating the value
                write.addAdditionalProperty("value", (Object) currentAttributeState);
                executeWriteAndGenerateAs7ServerUpdate(report, conf, write);
            }
        } else {
            ConfigurationWriteDelegate delegate = new ConfigurationWriteDelegate(configDef, getASConnection(), address);
            delegate.updateResourceConfiguration(report);
View Full Code Here


    public static Operation createAddModuleOptionTypeOperation(Address address, String attribute,
        List<Value> moduleTypeValue) {
        Operation add = null;
        if ((address != null) & (attribute != null) & (moduleTypeValue != null)) {
            add = new Operation("add", address);
            add.addAdditionalProperty(attribute, moduleTypeValue);
        }
        return add;
    }
}
View Full Code Here

         * Now handle the non-grouped properties
         */
        List<PropertyDefinition> nonGroupdedDefs = configurationDefinition.getNonGroupedProperties();
        Operation op = new ReadResource(address);
        if (includeRuntime) {
            op.addAdditionalProperty("include-runtime", "true"); // Include runtime values for attributes
        }
        //        op.addAdditionalProperty("recursive", "true"); // Also get sub-resources
        loadHandleProperties(config, nonGroupdedDefs, op);

        return config;
View Full Code Here

                // We need the type for reading
                type = type.substring(0, type.indexOf(":"));

            }
            operation = new ReadChildrenResources(address, type);
            operation.addAdditionalProperty("recursive", "true");
        } else if (groupName.startsWith("child:")) {
            String subPath = groupName.substring("child:".length());
            if (!subPath.contains("="))
                throw new IllegalArgumentException("subPath of 'child:' expression has no =");
View Full Code Here

    @SuppressWarnings("unchecked")
    private void loadAssignedServerGroups(Configuration configuration) {
        String managementNodeName = getManagementNodeName();
        Address theAddress = new Address("/");
        Operation op = new ReadChildrenResources(theAddress, "server-group");
        op.addAdditionalProperty("recursive-depth", "1");
        Result res = getASConnection().execute(op);
        PropertyList propGroups = new PropertyList("*1");
        configuration.put(propGroups);
        if (res.isSuccess()) {
            Map<String, Object> groups = (Map<String, Object>) res.getResult();
View Full Code Here

        addr.add("server-group", serverGroup);
        addr.add("deployment", getManagementNodeName());
        Operation op = new Operation(action, addr);
        if ("add".equals(action)) {
            if (runtimeName != null && !runtimeName.isEmpty()) {
                op.addAdditionalProperty("runtime-name", runtimeName);
            }
            op.addAdditionalProperty("enabled", enabled);
        }
        return op;
    }
View Full Code Here

        Operation op = new Operation(action, addr);
        if ("add".equals(action)) {
            if (runtimeName != null && !runtimeName.isEmpty()) {
                op.addAdditionalProperty("runtime-name", runtimeName);
            }
            op.addAdditionalProperty("enabled", enabled);
        }
        return op;
    }

    @SuppressWarnings("unchecked")
View Full Code Here

                    //                    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);

                    Address serverGroupAddress = new Address(context.getResourceKey());
                    serverGroupAddress.add("deployment", packageName);
View Full Code Here

                    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);

                    Address serverGroupAddress = new Address(context.getResourceKey());
                    serverGroupAddress.add("deployment", packageName);
                    Operation step2 = new Operation("add", serverGroupAddress);
                    Operation step3 = new Operation("deploy", serverGroupAddress);
View Full Code Here

        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();
        JsonNode ret = connection.executeRaw(op);
        System.out.println("Add to /deploy done " + ret);
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.