Package org.apache.karaf.shell.support.table

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


    @Override
    public Object execute() throws Exception {
        ShellTable table = new ShellTable();

        table.column("JNDI Name");
        table.column("Class Name");

        Map<String, String> names;
        if (context == null) {
            names = jndiService.names();
View Full Code Here


    @Override
    public Object execute() throws Exception {
        ShellTable table = new ShellTable();

        table.column("JNDI Name");
        table.column("Class Name");

        Map<String, String> names;
        if (context == null) {
            names = jndiService.names();
        } else {
View Full Code Here

    protected void printMethodList(Session session, PrintStream out, SortedMap<String, String> commands) {
        Terminal term = session.getTerminal();
        int termWidth = term != null ? term.getWidth() : 80;
        out.println(SimpleAnsi.INTENSITY_BOLD + "COMMANDS" + SimpleAnsi.INTENSITY_NORMAL);
        ShellTable table = new ShellTable().noHeaders().separator(" ").size(termWidth);
        table.column(new Col("Command").maxSize(64));
        table.column(new Col("Description"));
        for (Map.Entry<String,String> entry : commands.entrySet()) {
            String key = NameScoping.getCommandNameWithoutGlobalPrefix(session, entry.getKey());
            table.addRow().addContent(SimpleAnsi.INTENSITY_BOLD + key + SimpleAnsi.INTENSITY_NORMAL, entry.getValue());
        }
View Full Code Here

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

    private final IdComparator idComparator = new IdComparator();

    @Override
    protected Object doScrAction(ScrService scrService) throws Exception {
        ShellTable table = new ShellTable();
        table.column("ID");
        table.column("State");
        table.column("Component Name");

        Component[] components = scrService.getComponents();
        Arrays.sort(components, idComparator);
View Full Code Here

    @Override
    protected Object doScrAction(ScrService scrService) throws Exception {
        ShellTable table = new ShellTable();
        table.column("ID");
        table.column("State");
        table.column("Component Name");

        Component[] components = scrService.getComponents();
        Arrays.sort(components, idComparator);
        for (Component component : ScrUtils.emptyIfNull(Component.class, components)) {
View Full Code Here

    @Override
    protected Object doScrAction(ScrService scrService) throws Exception {
        ShellTable table = new ShellTable();
        table.column("ID");
        table.column("State");
        table.column("Component Name");

        Component[] components = scrService.getComponents();
        Arrays.sort(components, idComparator);
        for (Component component : ScrUtils.emptyIfNull(Component.class, components)) {
            // Display only non hidden components, or all if showHidden is true
View Full Code Here

    @Override
    public Object execute() throws Exception {
        SortedMap<String, PackageRequirement> imports = packageService.getImports();
        ShellTable table = new ShellTable();
        table.column(new Col(onlyPackage ? "Package name" : "Filter"));
        table.column(new Col("Optional"));
        table.column(new Col("ID"));
        table.column(new Col("Bundle Name"));
        table.column(new Col("Resolveable"));
       
View Full Code Here

    @Override
    public Object execute() throws Exception {
        SortedMap<String, PackageRequirement> imports = packageService.getImports();
        ShellTable table = new ShellTable();
        table.column(new Col(onlyPackage ? "Package name" : "Filter"));
        table.column(new Col("Optional"));
        table.column(new Col("ID"));
        table.column(new Col("Bundle Name"));
        table.column(new Col("Resolveable"));
       
        for (String filter : imports.keySet()) {
View Full Code Here

    public Object execute() throws Exception {
        SortedMap<String, PackageRequirement> imports = packageService.getImports();
        ShellTable table = new ShellTable();
        table.column(new Col(onlyPackage ? "Package name" : "Filter"));
        table.column(new Col("Optional"));
        table.column(new Col("ID"));
        table.column(new Col("Bundle Name"));
        table.column(new Col("Resolveable"));
       
        for (String filter : imports.keySet()) {
            PackageRequirement req = imports.get(filter);
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.