@Override public Object execute() throws Exception { ShellTable table = new ShellTable(); table.column("KAR Name"); for (String karName : karService.list()) { table.addRow().addContent(karName); } table.print(System.out, !noFormat); return null; }
@Override public void endPara() { if (sb.length() > 0) { ShellTable table = new ShellTable().noHeaders().separator("").size(maxSize - 1); table.column("").maxSize(indent.length()); table.column("").wrap(); table.addRow().addContent(indent, sb.toString()); table.print(out); sb.setLength(0); } else { out.println(); } }
public void print(PrintStream out, boolean format) { print(out, null, format); }
private List<String> displayGroupRoles(BackingEngine engine, String userName, GroupPrincipal group, ShellTable table) { List<String> names = new ArrayList<>(); List<RolePrincipal> roles = engine.listRoles(group); if (roles != null && roles.size() >= 1) { for (RolePrincipal role : roles) { String roleName = role.getName(); names.add(roleName); table.addRow().addContent(userName, group.getName(), roleName); } } return names; }
@Override public void endPara() { if (sb.length() > 0) { ShellTable table = new ShellTable().noHeaders().separator("").size(maxSize - 1); table.column("").maxSize(indent.length()); table.column("").wrap(); table.addRow().addContent(indent, sb.toString()); table.print(out); sb.setLength(0); } else { out.println(); } }
public void print(PrintStream out) { print(out, true); }
private List<String> displayGroupRoles(BackingEngine engine, String userName, GroupPrincipal group, ShellTable table) { List<String> names = new ArrayList<>(); List<RolePrincipal> roles = engine.listRoles(group); if (roles != null && roles.size() >= 1) { for (RolePrincipal role : roles) { String roleName = role.getName(); names.add(roleName); table.addRow().addContent(userName, group.getName(), roleName); } } return names; }
protected void doExecute(RepositoryAdmin admin) { ShellTable table = new ShellTable(); table.column("Index"); table.column("OBR URL"); table.emptyTableText("No OBR repository URL"); Repository[] repos = admin.listRepositories(); if (repos != null) { for (int i = 0; i < repos.length; i++) { table.addRow().addContent(i, repos[i].getURI()); } } table.print(System.out, !noFormat); }
ShellTable table = new ShellTable().noHeaders().separator(" ").size(termWidth - 1); Col col = new Col("Command").maxSize(64); if (indent > 0 || list) { table.column(new Col("")); col.bold(); table.column(col); table.column(new Col("Description").wrap()); for (Map.Entry<String,String> entry : commands.entrySet()) { String key = NameScoping.getCommandNameWithoutGlobalPrefix(session, entry.getKey()); table.addRow().addContent(prefix, key, entry.getValue()); } else { table.addRow().addContent(key, entry.getValue()); table.print(out, true);
public void print(PrintStream out) { print(out, true); }
/** * Helper to add row to {@link ShellTable} * @param table * @param label * @param value * @param descriptionText */ private <T> void addRow(ShellTable table, String label, SourceAnd<T> value, String descriptionText) { Row row = table.addRow(); row.addContent(label, value.val()); if (source) { row.addContent(value.source); } if (description) { row.addContent(descriptionText); } }
protected void doExecute(RepositoryAdmin admin) { ShellTable table = new ShellTable(); table.column("Index"); table.column("OBR URL"); table.emptyTableText("No OBR repository URL"); Repository[] repos = admin.listRepositories(); if (repos != null) { for (int i = 0; i < repos.length; i++) { table.addRow().addContent(i, repos[i].getURI()); } } table.print(System.out, !noFormat); }
ShellTable table = new ShellTable().noHeaders().separator(" ").size(termWidth - 1); Col col = new Col("Command").maxSize(64); if (indent > 0 || list) { table.column(new Col("")); col.bold(); table.column(col); table.column(new Col("Description").wrap()); for (Map.Entry<String,String> entry : commands.entrySet()) { String key = NameScoping.getCommandNameWithoutGlobalPrefix(session, entry.getKey()); table.addRow().addContent(prefix, key, entry.getValue()); } else { table.addRow().addContent(key, entry.getValue()); table.print(out, true);
public void print(PrintStream out, boolean format) { print(out, null, format); }
@Override public Object execute() throws Exception { ShellTable table = new ShellTable(); table.column("Property"); table.column("Value"); Map<String, String> info = this.getJdbcService().info(datasource); for (String property : info.keySet()) { table.addRow().addContent(property, info.get(property)); } table.print(System.out); return null; }
@Override public Object execute() throws Exception { ShellTable table = new ShellTable(); table.column("URL"); table.column("ProxyTo"); for (String url : proxyService.getProxies().keySet()) { table.addRow().addContent(url, proxyService.getProxies().get(url)); } table.print(System.out); return null; }
@Override public Object execute() throws Exception { Map<String, Set<String>> requirements = featuresService.listRequirements(); ShellTable table = new ShellTable(); table.column("Region"); table.column("Requirement"); table.emptyTableText("No requirements defined"); for (Map.Entry<String, Set<String>> entry : requirements.entrySet()) { for (String requirement : entry.getValue()) { table.addRow().addContent(entry.getKey(), requirement); } } table.print(System.out, !noFormat); return null; } }
@Override public Object execute() throws Exception { ShellTable table = new ShellTable(); table.column("Property"); table.column("Value"); Map<String, String> info = this.getJdbcService().info(datasource); for (String property : info.keySet()) { table.addRow().addContent(property, info.get(property)); } table.print(System.out); return null; }
@Override public Object execute() throws Exception { ShellTable table = new ShellTable(); table.column("URL"); table.column("ProxyTo"); for (String url : proxyService.getProxies().keySet()) { table.addRow().addContent(url, proxyService.getProxies().get(url)); } table.print(System.out); return null; }
@Override public Object execute() throws Exception { ShellTable table = new ShellTable(); table.column("JMS Topics"); for (String topic : getJmsService().topics(connectionFactory, username, password)) { table.addRow().addContent(topic); } table.print(System.out); return null; }