public void setWebContainerService(WebContainerService webContainerService) {
this.webContainerService = webContainerService;
}
public Object doExecute() throws Exception {
ShellTable table = new ShellTable();
table.column(new Col("ID"));
table.column(new Col("State"));
table.column(new Col("Web-State"));
table.column(new Col("Level"));
table.column(new Col("Web-ContextPath"));
table.column(new Col("Name"));
java.util.List<WebBundle> webBundles = webContainerService.list();
if (webBundles != null && !webBundles.isEmpty()) {
for (WebBundle webBundle : webBundles) {
table.addRow().addContent(
webBundle.getBundleId(),
webBundle.getState(),
webBundle.getWebState(),
webBundle.getLevel(),
webBundle.getContextPath(),
webBundle.getName());
}
}
table.print(System.out);
return null;
}