Package org.jboss.as.cli.util

Examples of org.jboss.as.cli.util.SimpleTable.addLine()


        if(opResponse.hasDefined(Util.RESPONSE_HEADERS)) {
            final ModelNode headers = opResponse.get(Util.RESPONSE_HEADERS);
            final Set<String> keys = headers.keys();
            final SimpleTable table = new SimpleTable(2);
            for(String key : keys) {
                table.addLine(new String[]{key, headers.get(key).asString()});
            }
            if(buf == null) {
                buf = new StringBuilder();
            } else {
                buf.append(Util.LINE_SEPARATOR);
View Full Code Here


                        if(!pattern.matcher(name).matches()) {
                            continue;
                        }
                        if(sgDeployments.hasDefined(name)) {
                            final ModelNode node = sgDeployments.get(name);
                            table.addLine(new String[]{node.get(Util.NAME).asString(), node.get(Util.RUNTIME_NAME).asString(),
                                    node.get(Util.ENABLED).asBoolean() ? Util.ENABLED : ADDED});
                        } else {
                            final ModelNode resource = allDeployments.get(name);
                            table.addLine(new String[]{resource.get(Util.NAME).asString(), resource.get(Util.RUNTIME_NAME).asString(), NOT_ADDED});
                        }
View Full Code Here

                            final ModelNode node = sgDeployments.get(name);
                            table.addLine(new String[]{node.get(Util.NAME).asString(), node.get(Util.RUNTIME_NAME).asString(),
                                    node.get(Util.ENABLED).asBoolean() ? Util.ENABLED : ADDED});
                        } else {
                            final ModelNode resource = allDeployments.get(name);
                            table.addLine(new String[]{resource.get(Util.NAME).asString(), resource.get(Util.RUNTIME_NAME).asString(), NOT_ADDED});
                        }
                    }
                    if(!table.isEmpty()) {
                        ctx.printLine(table.toString(true));
                    }
View Full Code Here

                            }

                            if (stepResponse.hasDefined(Util.RESULT)) {
                                final ModelNode stepResult = stepResponse.get(Util.RESULT);
                                if (stepResult.hasDefined(Util.ENABLED)) {
                                    groups.addLine(new String[] { sg,
                                            stepResult.get(Util.ENABLED).asBoolean() ? Util.ENABLED : ADDED });
                                } else {
                                    groups.addLine(new String[] { sg, N_A });
                                }
                            } else {
View Full Code Here

                                final ModelNode stepResult = stepResponse.get(Util.RESULT);
                                if (stepResult.hasDefined(Util.ENABLED)) {
                                    groups.addLine(new String[] { sg,
                                            stepResult.get(Util.ENABLED).asBoolean() ? Util.ENABLED : ADDED });
                                } else {
                                    groups.addLine(new String[] { sg, N_A });
                                }
                            } else {
                                groups.addLine(new String[] { sg, "no response" });
                            }
                        }
View Full Code Here

                                            stepResult.get(Util.ENABLED).asBoolean() ? Util.ENABLED : ADDED });
                                } else {
                                    groups.addLine(new String[] { sg, N_A });
                                }
                            } else {
                                groups.addLine(new String[] { sg, "no response" });
                            }
                        }
                    }

                    if (otherServerGroups != null) {
View Full Code Here

                        }
                    }

                    if (otherServerGroups != null) {
                        for (String sg : otherServerGroups) {
                            groups.addLine(new String[] { sg, NOT_ADDED });
                        }
                    }
                    ctx.printLine(groups.toString(true));
                }
            } else {
View Full Code Here

                        final Pattern pattern = Pattern.compile(Util.wildcardToJavaRegex(deploymentName == null ? "*" : deploymentName));
                        for (Property p : list) {
                            final ModelNode node = p.getValue();
                            final String name = node.get(Util.NAME).asString();
                            if(pattern.matcher(name).matches()) {
                                table.addLine(new String[]{name, node.get(Util.RUNTIME_NAME).asString(),
                                        node.get(Util.PERSISTENT).asString(), node.get(Util.ENABLED).asString(),
                                        node.get(Util.STATUS).asString()});
                            }
                        }
                    }
View Full Code Here

                                        node.get(Util.STATUS).asString()});
                            }
                        }
                    }
                } else {
                    table.addLine(new String[]{result.get(Util.NAME).asString(), result.get(Util.RUNTIME_NAME).asString(),
                            result.get(Util.PERSISTENT).asString(), result.get(Util.ENABLED).asString(),
                            result.get(Util.STATUS).asString()});
                }
                if(!table.isEmpty()) {
                    ctx.printLine(table.toString());
View Full Code Here

        if(opResponse.hasDefined(Util.RESPONSE_HEADERS)) {
            final ModelNode headers = opResponse.get(Util.RESPONSE_HEADERS);
            final Set<String> keys = headers.keys();
            final SimpleTable table = new SimpleTable(2);
            for(String key : keys) {
                table.addLine(new String[]{key, headers.get(key).asString()});
            }
            if(buf == null) {
                buf = new StringBuilder();
            } else {
                buf.append(Util.LINE_SEPARATOR);
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.