本文整理了Java中org.apache.karaf.shell.support.table.Row.addContent
方法的一些代码示例,展示了Row.addContent
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Row.addContent
方法的具体详情如下:
包路径:org.apache.karaf.shell.support.table.Row
类名称:Row
方法名:addContent
暂无
代码示例来源:origin: apache/karaf
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;
}
代码示例来源:origin: apache/karaf
@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();
}
}
代码示例来源:origin: apache/karaf
@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;
}
代码示例来源:origin: apache/karaf
@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;
}
代码示例来源:origin: org.apache.karaf.http/org.apache.karaf.http.core
@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;
}
代码示例来源:origin: org.apache.karaf.jdbc/org.apache.karaf.jdbc.core
@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;
}
代码示例来源:origin: apache/karaf
@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;
}
代码示例来源:origin: apache/karaf
@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;
}
代码示例来源:origin: apache/karaf
@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;
}
代码示例来源:origin: apache/karaf
@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;
}
代码示例来源:origin: apache/karaf
@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;
}
代码示例来源:origin: apache/karaf
@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;
}
代码示例来源:origin: apache/karaf
@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);
}
代码示例来源:origin: apache/karaf
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);
}
代码示例来源:origin: org.apache.karaf.obr/org.apache.karaf.obr.core
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);
}
代码示例来源:origin: apache/karaf
@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;
}
代码示例来源:origin: apache/karaf
@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;
}
代码示例来源:origin: apache/karaf
@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;
}
代码示例来源:origin: apache/karaf
@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;
}
代码示例来源:origin: apache/karaf
@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;
}
内容来源于网络,如有侵权,请联系作者删除!