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

Examples of org.rhq.modules.plugins.jbossas7.json.CompositeOperation.addStep()


            for (String childrenName : childrenNamesSubList) {
                Address address = new Address(getAddress());
                address.add("query-cache", childrenName);
                ReadResource readQueryCacheResource = new ReadResource(address);
                readQueryCacheResource.includeRuntime(true);
                batchOperation.addStep(readQueryCacheResource);
            }

            // Execute batch
            Result batchResult = getASConnection().execute(batchOperation, timeoutSec);
            if (!batchResult.isSuccess()) {
View Full Code Here


        String resourceKey;
        Result result;

        CompositeOperation cop = new CompositeOperation();
        cop.addStep(step1);
        /*
         * We need to check here if this is an upload to /deployment only
         * or if this should be deployed to a server group too
         */

 
View Full Code Here

        if (!toServerGroup) {

            // if standalone, then :deploy the deployment anyway
            if (context.getResourceType().getName().contains("Standalone")) {
                Operation step2 = new Operation("deploy", step1.getAddress());
                cop.addStep(step2);
            }

            result = connection.execute(cop, 300);
            resourceKey = step1.getAddress().getPath();
View Full Code Here

            Address serverGroupAddress = new Address(context.getResourceKey());
            serverGroupAddress.add("deployment", deploymentName);
            Operation step2 = new Operation("add", serverGroupAddress);

            cop.addStep(step2);

            Operation step3 = new Operation("deploy", serverGroupAddress);
            cop.addStep(step3);

            resourceKey = serverGroupAddress.getPath();
View Full Code Here

            Operation step2 = new Operation("add", serverGroupAddress);

            cop.addStep(step2);

            Operation step3 = new Operation("deploy", serverGroupAddress);
            cop.addStep(step3);

            resourceKey = serverGroupAddress.getPath();

            if (verbose) {
                LOG.info("Deploy operation: " + cop);
View Full Code Here

            for (Map.Entry<String, String> connectionProperty : connectionPropertiesAsMap.entrySet()) {
                Address propertyAddress = new Address(datasourceAddress);
                propertyAddress.add(connPropAttributeNameOnServer, connectionProperty.getKey());
                Operation op = new Operation("add", propertyAddress);
                op.addAdditionalProperty("value", connectionProperty.getValue());
                cop.addStep(op);
            }
            Result res = getASConnection().execute(cop);
            if (!res.isSuccess()) {
                report.setErrorMessage("Datasource was added, but setting " + connPropAttributeNameOnServer
                    + " failed: " + res.getFailureDescription());
View Full Code Here

                    if (canUnset) {
                        val = null;
                    } else {
                        val = configDef.getPropertyDefinitionSimple(simplePropertyName).getDefaultValue();
                    }
                    updateOperation.addStep(new WriteAttribute(getAddress(), simplePropertyName, val));
                }
            } else if (!newConfigPropertySimpleValue.equals(currentConfigPropertySimpleValue)) {
                updateOperation.addStep(new WriteAttribute(getAddress(), simplePropertyName,
                    newConfigPropertySimpleValue));
            }
View Full Code Here

                        val = configDef.getPropertyDefinitionSimple(simplePropertyName).getDefaultValue();
                    }
                    updateOperation.addStep(new WriteAttribute(getAddress(), simplePropertyName, val));
                }
            } else if (!newConfigPropertySimpleValue.equals(currentConfigPropertySimpleValue)) {
                updateOperation.addStep(new WriteAttribute(getAddress(), simplePropertyName,
                    newConfigPropertySimpleValue));
            }
        }

        // 4. Capture connection property changes
View Full Code Here

            String newConfigConnectionPropertyValue = newConfigConnectionProperties.get(connectionPropertyName);
            String currentConfigConnectionPropertyValue = currentConfigConnectionProperties.get(connectionPropertyName);

            if (newConfigConnectionPropertyValue == null) {
                updateOperation.addStep(new Operation("remove", propertyAddress));
            } else if (currentConfigConnectionPropertyValue == null) {
                Operation addOperation = new Operation("add", propertyAddress);
                addOperation.addAdditionalProperty("value", newConfigConnectionPropertyValue);
                updateOperation.addStep(addOperation);
            } else if (!newConfigConnectionPropertyValue.equals(currentConfigConnectionPropertyValue)) {
View Full Code Here

            if (newConfigConnectionPropertyValue == null) {
                updateOperation.addStep(new Operation("remove", propertyAddress));
            } else if (currentConfigConnectionPropertyValue == null) {
                Operation addOperation = new Operation("add", propertyAddress);
                addOperation.addAdditionalProperty("value", newConfigConnectionPropertyValue);
                updateOperation.addStep(addOperation);
            } else if (!newConfigConnectionPropertyValue.equals(currentConfigConnectionPropertyValue)) {
                updateOperation.addStep(new Operation("remove", propertyAddress));
                Operation addOperation = new Operation("add", propertyAddress);
                addOperation.addAdditionalProperty("value", newConfigConnectionPropertyValue);
                updateOperation.addStep(addOperation);
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.