Package org.apache.karaf.shell.table

Examples of org.apache.karaf.shell.table.ShellTable.column()


        Bundle[] bundles = bundleContext.getBundles();
        SortedMap<String, PackageVersion> packageVersionMap = getDuplicatePackages(bundles);
        ShellTable table = new ShellTable();
        table.column(new Col("Package Name"));
        table.column(new Col("Version"));
        table.column(new Col("Exporting bundles (ID)"));
      
        for (String key : packageVersionMap.keySet()) {
            PackageVersion pVer = packageVersionMap.get(key);
            if (pVer.getBundles().size() > 1) {
              String pBundles = getBundlesSt(pVer.getBundles());
View Full Code Here


    protected void printMethodList(CommandSession session, PrintStream out, SortedMap<String, String> commands) {
        Terminal term = (Terminal) session.get(".jline.terminal");
        int termWidth = term != null ? term.getWidth() : 80;
        out.println(Ansi.ansi().a(Ansi.Attribute.INTENSITY_BOLD).a("COMMANDS").a(Ansi.Attribute.RESET));
        ShellTable table = new ShellTable().noHeaders().separator(" ").size(termWidth);
        table.column(new Col("Command").maxSize(35));
        table.column(new Col("Description"));
        for (Map.Entry<String,String> entry : commands.entrySet()) {
            String key = NameScoping.getCommandNameWithoutGlobalPrefix(session, entry.getKey());
            table.addRow().addContent(key, entry.getValue());
        }
View Full Code Here

        Terminal term = (Terminal) session.get(".jline.terminal");
        int termWidth = term != null ? term.getWidth() : 80;
        out.println(Ansi.ansi().a(Ansi.Attribute.INTENSITY_BOLD).a("COMMANDS").a(Ansi.Attribute.RESET));
        ShellTable table = new ShellTable().noHeaders().separator(" ").size(termWidth);
        table.column(new Col("Command").maxSize(35));
        table.column(new Col("Description"));
        for (Map.Entry<String,String> entry : commands.entrySet()) {
            String key = NameScoping.getCommandNameWithoutGlobalPrefix(session, entry.getKey());
            table.addRow().addContent(key, entry.getValue());
        }
        table.print(out, true);
View Full Code Here

    String datasource;

    public Object doExecute() 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));
View Full Code Here

    public Object doExecute() 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));
        }
View Full Code Here

        ShellTable table = new ShellTable();

        Map<String, List<String>> map = this.getJdbcService().tables(datasource);
        int rowCount = 0;
        for (String column : map.keySet()) {
            table.column(column);
            rowCount = map.get(column).size();
        }

        for (int i = 0; i < rowCount; i++) {
            Row row = table.addRow();
View Full Code Here

        ShellTable table = new ShellTable();

        Map<String, List<String>> map = this.getJdbcService().query(datasource, query);
        int rowCount = 0;
        for (String column : map.keySet()) {
            table.column(column);
            rowCount = map.get(column).size();
        }

        for (int i = 0; i < rowCount; i++) {
            Row row = table.addRow();
View Full Code Here

public class DataSourcesCommand extends JdbcCommandSupport {

    public Object doExecute() throws Exception {
        ShellTable table = new ShellTable();

        table.column("Name");
        table.column("Product");
        table.column("Version");
        table.column("URL");

        List<String> datasources = this.getJdbcService().datasources();
View Full Code Here

    public Object doExecute() throws Exception {
        ShellTable table = new ShellTable();

        table.column("Name");
        table.column("Product");
        table.column("Version");
        table.column("URL");

        List<String> datasources = this.getJdbcService().datasources();
        for (String datasource : datasources) {
View Full Code Here

    public Object doExecute() throws Exception {
        ShellTable table = new ShellTable();

        table.column("Name");
        table.column("Product");
        table.column("Version");
        table.column("URL");

        List<String> datasources = this.getJdbcService().datasources();
        for (String datasource : datasources) {
            Map<String, String> info = this.getJdbcService().info(datasource);
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.