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(); } }
@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("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("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("Property"); table.column("Value"); Map<String, String> info = getJmsService().info(connectionFactory, username, password); for (String key : info.keySet()) { table.addRow().addContent(key, info.get(key)); } table.print(System.out); return null; }
@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 Object execute() throws Exception { ShellTable table = new ShellTable(); table.column("JMS Queues"); for (String queue : getJmsService().queues(connectionFactory, username, password)) { table.addRow().addContent(queue); } table.print(System.out); return null; }
@Override public Object execute() throws Exception { ShellTable table = new ShellTable(); table.column("Messages Count"); table.addRow().addContent(getJmsService().count(connectionFactory, queue, username, password)); 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; }
@Override public Object execute() throws Exception { ShellTable table = new ShellTable(); table.column("JMS Connection Factory"); List<String> connectionFactories = getJmsService().connectionFactories(); for (String connectionFactory : connectionFactories) { table.addRow().addContent(connectionFactory); } table.print(System.out); return null; }
@Override protected void doExecute(FeaturesService service) throws Exception { ShellTable table = new ShellTable(); table.column("Name"); table.column("Version"); for (Feature feature : service.repositoryProvidedFeatures(featuresRepositoryUri)) { table.addRow().addContent(feature.getName(), feature.getVersion()); } table.print(System.out); }
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); }
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); }
@Override public Object execute() throws Exception { ShellTable table = new ShellTable(); table.column("ID"); table.column("Flight"); table.column("Customer"); Booking booking = bookingService.get(id); table.addRow().addContent(booking.getId(), booking.getFlight(), booking.getCustomer()); table.print(System.out); return null; }
@Override public Object execute() throws Exception { ShellTable table = new ShellTable(); table.column("ID"); table.column("Flight"); table.column("Customer"); for (Booking booking : bookingService.list()) { table.addRow().addContent(booking.getId(), booking.getFlight(), booking.getCustomer()); } table.print(System.out); return null; }
@Override public Object execute() throws Exception { ShellTable table = new ShellTable(); table.column("ID"); table.column("Flight"); table.column("Customer"); for (Booking booking : bookingService.list()) { table.addRow().addContent(booking.getId(), booking.getFlight(), booking.getCustomer()); } table.print(System.out); return null; }
@Override public Object execute() throws Exception { ShellTable table = new ShellTable(); table.column("ID"); table.column("Flight"); table.column("Customer"); Booking booking = bookingService.get(id); table.addRow().addContent(booking.getId(), booking.getFlight(), booking.getCustomer()); table.print(System.out); return null; }
@Override public Object execute() throws Exception { ShellTable table = new ShellTable(); table.column("ID"); table.column("Flight"); table.column("Customer"); for (Booking booking : bookingService.list()) { table.addRow().addContent(booking.getId(), booking.getFlight(), booking.getCustomer()); } table.print(System.out); return null; }