Package org.apache.geronimo.cli

Examples of org.apache.geronimo.cli.PrintHelper


        displayHelp(args);
    }

    @Override
    protected void displayHelp(String[] args) {
        PrintHelper printHelper = new PrintHelper(System.out);
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out), true);

        out.println();
        if(args.length > 0) {
            CommandMetaData commandLine = getCommandMetaData(args[0]);
            if(commandLine != null) {
                out.println("Help for command: "+commandLine.getCommandName());
                out.println("    "+hangingIndent(commandLine.getCommandName()+" "+commandLine.getHelpArgumentList(), 4));
                out.println();
                out.print(PrintHelper.reformat(commandLine.getHelpText(), 8, 72));
                out.println();
                return;
            } else if(args[0].equals("options")) {
                out.println("Help on general options:");
                printHelper.printOptions(out, options);
                out.println();
                return;
            } else if(args[0].equals("all")) {
                out.println();
                out.println("All commands");
                out.println();
                for (CommandMetaData commandLine2 : commandMetaData) {
                    out.println("    "+hangingIndent(commandLine2.getCommandName()+" "+commandLine2.getHelpArgumentList(), 4));
                    out.print(PrintHelper.reformat(commandLine2.getHelpText(), 8, 72));
                    out.println();
                }
                out.println();
                return;
            }
        }

        out.println("usage: java -jar bin/deployer.jar [general options] command [command options]");
        out.println();
        out.println("The general options are:");
        printHelper.printOptionsNoDesc(out, options);
        out.println();
        out.println("The available commands are:");
        renderCommandList(out);
        out.println();
        out.println("For more information about a specific command, run");
View Full Code Here


        displayHelp(args);
    }

    @Override
    protected void displayHelp(String[] args) {
        PrintHelper printHelper = new PrintHelper(System.out);
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out), true);

        out.println();
        if(args.length > 0) {
            CommandMetaData commandLine = getCommandMetaData(args[0]);
            if(commandLine != null) {
                out.println("Help for command: "+commandLine.getCommandName());
                out.println("    "+hangingIndent(commandLine.getCommandName()+" "+commandLine.getHelpArgumentList(), 4));
                out.println();
                out.print(PrintHelper.reformat(commandLine.getHelpText(), 8, 72));
                out.println();
                return;
            } else if(args[0].equals("options")) {
                out.println("Help on general options:");
                printHelper.printOptions(out, options);
                out.println();
                return;
            } else if(args[0].equals("all")) {
                out.println();
                out.println("All commands");
                out.println();
                for (CommandMetaData commandLine2 : commandMetaData) {
                    out.println("    "+hangingIndent(commandLine2.getCommandName()+" "+commandLine2.getHelpArgumentList(), 4));
                    out.print(PrintHelper.reformat(commandLine2.getHelpText(), 8, 72));
                    out.println();
                }
                out.println();
                return;
            }
        }

        out.println("usage: java -jar bin/deployer.jar [general options] command [command options]");
        out.println();
        out.println("The general options are:");
        printHelper.printOptionsNoDesc(out, options);
        out.println();
        out.println("The available commands are:");
        renderCommandList(out);
        out.println();
        out.println("For more information about a specific command, run");
View Full Code Here

    public String[] getOverride() {
        return commandLine.getOptionValues(ARGUMENT_MODULE_OVERRIDE_SHORTFORM);
    }
   
    public void displayHelp() {
        PrintHelper printHelper = new PrintHelper(out);
        printHelper.printHelp("java -jar bin/server.jar $options",
                "\nThe following options are available:",
                options,
                "\nIn addition you may specify a replacement for var/config/config.xml by setting the property "
                        + "-Dorg.apache.geronimo.config.file=var/config/<my-config.xml>. "
                        + "This is resolved relative to the geronimo base directory.\n",
View Full Code Here

        displayHelp(args);
    }

    @Override
    protected void displayHelp(String[] args) {
        PrintHelper printHelper = new PrintHelper(System.out);
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out), true);

        out.println();
        if(args.length > 0) {
            CommandMetaData commandLine = getCommandMetaData(args[0]);
            if(commandLine != null) {
                out.println("Help for command: "+commandLine.getCommandName());
                out.println("    "+hangingIndent(commandLine.getCommandName()+" "+commandLine.getHelpArgumentList(), 4));
                out.println();
                out.print(PrintHelper.reformat(commandLine.getHelpText(), 8, 72));
                out.println();
                return;
            } else if(args[0].equals("options")) {
                out.println("Help on general options:");
                printHelper.printOptions(out, options);
                out.println();
                return;
            } else if(args[0].equals("all")) {
                out.println();
                out.println("All commands");
                out.println();
                for (CommandMetaData commandLine2 : commandMetaData) {
                    out.println("    "+hangingIndent(commandLine2.getCommandName()+" "+commandLine2.getHelpArgumentList(), 4));
                    out.print(PrintHelper.reformat(commandLine2.getHelpText(), 8, 72));
                    out.println();
                }
                out.println();
                return;
            }
        }

        out.println("usage: java -jar bin/deployer.jar [general options] command [command options]");
        out.println();
        out.println("The general options are:");
        printHelper.printOptionsNoDesc(out, options);
        out.println();
        out.println("The available commands are:");
        renderCommandList(out);
        out.println();
        out.println("For more information about a specific command, run");
View Full Code Here

    public String[] getOverride() {
        return commandLine.getOptionValues(ARGUMENT_MODULE_OVERRIDE_SHORTFORM);
    }
   
    public void displayHelp() {
        PrintHelper printHelper = new PrintHelper(out);
        printHelper.printHelp("java -jar bin/server.jar $options",
                "\nThe following options are available:",
                options,
                "\nIn addition you may specify a replacement for var/config/config.xml by setting the property "
                        + "-Dorg.apache.geronimo.config.file=var/config/<my-config.xml>. "
                        + "This is resolved relative to the geronimo base directory.\n",
View Full Code Here

    public boolean isSecure() {
        return commandLine.hasOption(ARGUMENT_SECURE_SHORTFORM);
    }   
   
    public void displayHelp() {
        PrintHelper printHelper = new PrintHelper(System.out);
        printHelper.printHelp("java -jar bin/shutdown.jar $options",
                "\nThe following options are available:",
                options,
                "\n",
                true);
    }
View Full Code Here

        displayHelp(args);
    }

    @Override
    protected void displayHelp(String[] args) {
        PrintHelper printHelper = new PrintHelper(System.out);
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out), true);

        out.println();
        if(args.length > 0) {
            CommandMetaData commandLine = getCommandMetaData(args[0]);
            if(commandLine != null) {
                out.println("Help for command: "+commandLine.getCommandName());
                out.println("    "+hangingIndent(commandLine.getCommandName()+" "+commandLine.getHelpArgumentList(), 4));
                out.println();
                out.print(PrintHelper.reformat(commandLine.getHelpText(), 8, 72));
                out.println();
                return;
            } else if(args[0].equals("options")) {
                out.println("Help on general options:");
                printHelper.printOptions(out, options);
                out.println();
                return;
            } else if(args[0].equals("all")) {
                out.println();
                out.println("All commands");
                out.println();
                for (CommandMetaData commandLine2 : commandMetaData) {
                    out.println("    "+hangingIndent(commandLine2.getCommandName()+" "+commandLine2.getHelpArgumentList(), 4));
                    out.print(PrintHelper.reformat(commandLine2.getHelpText(), 8, 72));
                    out.println();
                }
                out.println();
                return;
            }
        }

        out.println("usage: java -jar bin/deployer.jar [general options] command [command options]");
        out.println();
        out.println("The general options are:");
        printHelper.printOptionsNoDesc(out, options);
        out.println();
        out.println("The available commands are:");
        renderCommandList(out);
        out.println();
        out.println("For more information about a specific command, run");
View Full Code Here

    public String[] getOverride() {
        return commandLine.getOptionValues(ARGUMENT_MODULE_OVERRIDE_SHORTFORM);
    }
   
    public void displayHelp() {
        PrintHelper printHelper = new PrintHelper(out);
        printHelper.printHelp("java -jar bin/server.jar $options",
                "\nThe following options are available:",
                options,
                "\nIn addition you may specify a replacement for var/config/config.xml by setting the property "
                        + "-Dorg.apache.geronimo.config.file=var/config/<my-config.xml>. "
                        + "This is resolved relative to the geronimo base directory.\n",
View Full Code Here

        displayHelp(args);
    }

    @Override
    protected void displayHelp(String[] args) {
        PrintHelper printHelper = new PrintHelper(System.out);
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out), true);

        out.println();
        if(args.length > 0) {
            CommandMetaData commandLine = getCommandMetaData(args[0]);
            if(commandLine != null) {
                out.println("Help for command: "+commandLine.getCommandName());
                out.println("    "+hangingIndent(commandLine.getCommandName()+" "+commandLine.getHelpArgumentList(), 4));
                out.println();
                out.print(PrintHelper.reformat(commandLine.getHelpText(), 8, 72));
                out.println();
                return;
            } else if(args[0].equals("options")) {
                out.println("Help on general options:");
                printHelper.printOptions(out, options);
                out.println();
                return;
            } else if(args[0].equals("all")) {
                out.println();
                out.println("All commands");
                out.println();
                for (CommandMetaData commandLine2 : commandMetaData) {
                    out.println("    "+hangingIndent(commandLine2.getCommandName()+" "+commandLine2.getHelpArgumentList(), 4));
                    out.print(PrintHelper.reformat(commandLine2.getHelpText(), 8, 72));
                    out.println();
                }
                out.println();
                return;
            }
        }

        out.println("usage: java -jar bin/deployer.jar [general options] command [command options]");
        out.println();
        out.println("The general options are:");
        printHelper.printOptionsNoDesc(out, options);
        out.println();
        out.println("The available commands are:");
        renderCommandList(out);
        out.println();
        out.println("For more information about a specific command, run");
View Full Code Here

        displayHelp(args);
    }

    @Override
    protected void displayHelp(String[] args) {
        PrintHelper printHelper = new PrintHelper(System.out);
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out), true);

        out.println();
        if(args.length > 0) {
            CommandMetaData commandLine = getCommandMetaData(args[0]);
            if(commandLine != null) {
                out.println("Help for command: "+commandLine.getCommandName());
                out.println("    "+hangingIndent(commandLine.getCommandName()+" "+commandLine.getHelpArgumentList(), 4));
                out.println();
                out.print(PrintHelper.reformat(commandLine.getHelpText(), 8, 72));
                out.println();
                return;
            } else if(args[0].equals("options")) {
                out.println("Help on general options:");
                printHelper.printOptions(out, options);
                out.println();
                return;
            } else if(args[0].equals("all")) {
                out.println();
                out.println("All commands");
                out.println();
                for (CommandMetaData commandLine2 : commandMetaData) {
                    out.println("    "+hangingIndent(commandLine2.getCommandName()+" "+commandLine2.getHelpArgumentList(), 4));
                    out.print(PrintHelper.reformat(commandLine2.getHelpText(), 8, 72));
                    out.println();
                }
                out.println();
                return;
            }
        }

        out.println("usage: java -jar bin/deployer.jar [general options] command [command options]");
        out.println();
        out.println("The general options are:");
        printHelper.printOptionsNoDesc(out, options);
        out.println();
        out.println("The available commands are:");
        renderCommandList(out);
        out.println();
        out.println("For more information about a specific command, run");
View Full Code Here

TOP

Related Classes of org.apache.geronimo.cli.PrintHelper

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.