Package org.jboss.as.cli.operation.impl

Examples of org.jboss.as.cli.operation.impl.DefaultOperationRequestBuilder.buildRequest()


        ModelNode request;
        DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder(address);
        try {
            builder.setOperationName(Util.READ_CHILDREN_TYPES);
            request = builder.buildRequest();
        } catch (OperationFormatException e1) {
            throw new IllegalStateException("Failed to build operation", e1);
        }

        List<String> result;
View Full Code Here


        final ModelNode request;
        DefaultOperationRequestBuilder builder = address == null ? new DefaultOperationRequestBuilder() : new DefaultOperationRequestBuilder(address);
        try {
            builder.setOperationName("read-children-names");
            builder.addProperty("child-type", type);
            request = builder.buildRequest();
        } catch (OperationFormatException e1) {
            throw new IllegalStateException("Failed to build operation", e1);
        }

        List<String> result;
View Full Code Here

                builder.addNode("profile", profile);
            }
            builder.addNode("subsystem", "messaging");
            builder.setOperationName("read-children-names");
            builder.addProperty("child-type", type);
            request = builder.buildRequest();
        } catch (OperationFormatException e) {
            throw new IllegalStateException("Failed to build operation", e);
        }

        try {
View Full Code Here

                builder.addNode("profile", profile);
            }
            builder.addNode("subsystem", "datasources");
            builder.setOperationName("read-children-names");
            builder.addProperty("child-type", dsType);
            request = builder.buildRequest();
        } catch (OperationFormatException e) {
            throw new IllegalStateException("Failed to build operation", e);
        }

        try {
View Full Code Here

        builder.addNode(dsType, jndiName.getValue(args, true));
        builder.setOperationName("add");

        setParams(ctx, builder.getModelNode());

        return builder.buildRequest();
    }

    private void initArguments() {
        ArgumentWithoutValue lastRequired = initRequiredArguments();
        initOptionalArguments(lastRequired);
View Full Code Here

                builder.addNode("subsystem", "datasources");
                builder.addNode(dsType, jndiName.getValue(args, true));
                builder.setOperationName("write-attribute");
                builder.addProperty("name", arg.getPropertyName());
                builder.addProperty("value", value);
                request.add(builder.buildRequest());
            }
        }
    }

    private void initArguments() {
View Full Code Here

            }
        } else if(Util.isDeployedAndEnabledInStandalone(name, client)) {
            builder = new DefaultOperationRequestBuilder();
            builder.setOperationName("undeploy");
            builder.addNode("deployment", name);
            steps.add(builder.buildRequest());
        }

        if (!keepContent) {
            builder = new DefaultOperationRequestBuilder();
            builder.setOperationName("remove");
View Full Code Here

        if (!keepContent) {
            builder = new DefaultOperationRequestBuilder();
            builder.setOperationName("remove");
            builder.addNode("deployment", name);
            steps.add(builder.buildRequest());
        }
        return composite;
    }
}
View Full Code Here

                    builder.setOperationName("read-attribute");
                    builder.addProperty("name", attrName);

                    try {
                        ModelNode result = client.execute(builder.buildRequest());
                        if(!result.hasDefined("result"))
                            return Collections.emptyList();
                        return Collections.singletonList(result.get("result").asString());
                    } catch (Exception e) {
                        return Collections.emptyList();
View Full Code Here

        builder.addNode("subsystem", "datasources");
        builder.addNode(dsType, name);
        builder.setOperationName(operationName);

        return builder.buildRequest();
    }
}
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.