Examples of addAdditionalProperty()


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

            //update the operation components with details from the resource being operated on.
            //Ex. {modcluster address}:{jvmRoute}:{virtual-host}:{context}
            String[] keyComponents = key.split(":");
            if (keyComponents.length == 4) {
                op.addAdditionalProperty("virtualhost", keyComponents[2]);
                op.addAdditionalProperty("context", keyComponents[3]);
                result = getASConnection().execute(op);
                if ((result != null) && (result.isSuccess())) {
                    operationResult.setSimpleResult("Success");
                }
            } else {
View Full Code Here

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

        } else if ("stop-context".equals(name)) {
            String currentAddress = getAddress().getPath();
            //Ex. {modcluster address}:{jvmRoute}:{virtual-host}:{context}
            String[] keyComponents = key.split(":");
            if (keyComponents.length == 4) {
                op.addAdditionalProperty("virtualhost", keyComponents[2]);
                op.addAdditionalProperty("context", keyComponents[3]);
                addAdditionalToOp(op, parameters, "waittime", true);
                result = getASConnection().execute(op);
                if ((result != null) && (result.isSuccess())) {
                    operationResult.setSimpleResult("Success");
View Full Code Here

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

            String currentAddress = getAddress().getPath();
            //Ex. {modcluster address}:{jvmRoute}:{virtual-host}:{context}
            String[] keyComponents = key.split(":");
            if (keyComponents.length == 4) {
                op.addAdditionalProperty("virtualhost", keyComponents[2]);
                op.addAdditionalProperty("context", keyComponents[3]);
                addAdditionalToOp(op, parameters, "waittime", true);
                result = getASConnection().execute(op);
                if ((result != null) && (result.isSuccess())) {
                    operationResult.setSimpleResult("Success");
                }
View Full Code Here

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

            CompositeOperation cop = new CompositeOperation();
            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
View Full Code Here

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

    @Override
    public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
        if (name.equals(ENABLE_OPERATION)) {
            Operation operation = new Operation(ENABLE_OPERATION, getAddress());
            Boolean persistent = Boolean.valueOf(parameters.getSimpleValue("persistent", TRUE.toString()));
            operation.addAdditionalProperty("persistent", persistent);
            Result res = getASConnection().execute(operation);
            if (res.isSuccess()) {
                return new OperationResult();
            } else {
                OperationResult operationResult = new OperationResult();
View Full Code Here

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

            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);
View Full Code Here

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

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

        // 5. Update config if needed
View Full Code Here

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

    @Override
    public OperationResult invokeOperation(String name, Configuration parameters) throws InterruptedException,
        Exception {
        Operation op = new Operation(name, getAddress());
        op.addAdditionalProperty("blocking", Boolean.valueOf(parameters.getSimpleValue("blocking", "false")));
        Result res = getASConnection().execute(op,
            Integer.parseInt(parameters.getSimpleValue("operationTimeout", "120")));
        OperationResult opRes;
        if (res.isSuccess()) {
            opRes = new OperationResult("successfully invoked [" + name + "]");
View Full Code Here

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

            Address address = new Address(path);
   
            //create request to get metadata type information
            Operation op = new Operation("read-resource-description", address);
            //recurse down the tree.
            op.addAdditionalProperty("recursive", "true");
   
            //additionally request operation metadata
            if (mode == D2DMode.OPERATION) {
                op.addAdditionalProperty("operations", true);
            }
View Full Code Here

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

            //recurse down the tree.
            op.addAdditionalProperty("recursive", "true");
   
            //additionally request operation metadata
            if (mode == D2DMode.OPERATION) {
                op.addAdditionalProperty("operations", true);
            }
            //additionally request metric metadata
            if (mode == D2DMode.METRICS) {
                op.addAdditionalProperty("include-runtime", true);
            }
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.