Package org.apache.jackrabbit.vault.util.console.util

Examples of org.apache.jackrabbit.vault.util.console.util.Table


        if (path == null) {
            // display mount information
            if (!ctx.getVaultFsApp().isMounted()) {
                VaultFsApp.log.info("Not mounted.");
            } else {
                Table t = new Table(2);
                t.addRow("      User:", ctx.getVaultFsApp().getProperty(VaultFsApp.KEY_USER));
                t.addRow(" Workspace:", ctx.getVaultFsApp().getProperty(VaultFsApp.KEY_WORKSPACE));
                t.addRow("Mountpoint:", ctx.getVaultFsApp().getProperty(VaultFsApp.KEY_MOUNTPOINT));
                t.print();
            }
        } else {
            if (!ctx.getVaultFsApp().isLoggedIn()) {
                VaultFsApp.log.info("Not logged in.");
            } else {
View Full Code Here


    }

    public void switchContext(String name) {
        if (name == null) {
            Iterator iter = contexts.keySet().iterator();
            Table t = new Table(2);
            while (iter.hasNext()) {
                name = (String) iter.next();
                ConsoleExecutionContext c = (ConsoleExecutionContext) contexts.get(name);
                if (c == currentCtx) {
                    name = "*" + name;
                } else {
                    name = " " + name;
                }
                String path = c.getProperty(AbstractApplication.KEY_PATH);
                t.addRow(name, path);
            }
            t.print();

        } else {
            if (!contexts.containsKey(name)) {
                throw new ExecutionException("No such context: " + name);
            }
View Full Code Here

* <code>CmdEnv</code>...
*/
public class CmdEnv extends AbstractConsoleCommand {

    protected void doExecute(ConsoleExecutionContext ctx, CommandLine cl) throws Exception {
        Table t = new Table(2);
        Iterator iter = ctx.getPropertyKeys().iterator();
        while (iter.hasNext()) {
            String key = (String) iter.next();
            t.addRow(key, ctx.getProperty(key));
        }
        t.sort(0);
        t.print();
    }
View Full Code Here

    protected void doExecute(ConsoleExecutionContext ctx, CommandLine cl)
            throws Exception {
        String key = (String) cl.getValue(argKey);
        String value = (String) cl.getValue(argValue);
        if (key == null) {
            Table t = new Table(2);
            Iterator iter = ctx.getPropertyKeys().iterator();
            while (iter.hasNext()) {
                key = (String) iter.next();
                t.addRow(key, ctx.getProperty(key));
            }
            t.sort(0);
            t.print();
        } else {
            ctx.getApplication().setProperty(key, value);
        }
    }
View Full Code Here

            if ((f & 1) == 1) {
                numCols++;
            }
            f >>= 1;
        }
        Table t = new Table(numCols);
        ls(t, (File) file.unwrap(), flags, 0, maxDepth);
        t.print();
    }
View Full Code Here

            if ((f & 1) == 1) {
                numCols++;
            }
            f >>= 1;
        }
        Table t = new Table(numCols);

        ConsoleFile[] files = file.listFiles();
        for (ConsoleFile file1 : files) {
            Table.Row r = t.createRow();
            formatFile(file1, r, flags);
            t.addRow(r);
        }

        t.print();
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.vault.util.console.util.Table

Copyright © 2018 www.massapicom. 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.