Examples of CommandLineOptions


Examples of bdsup2sub.cli.CommandLineOptions

    private File paletteFile;
    private Options options;

    public CommandLineParser() {
        this.options = new CommandLineOptions().getOptions();
    }
View Full Code Here

Examples of com.barrybecker4.common.app.CommandLineOptions

    /**
     * create and show the server.
     */
    public static void main(String[] args) {

        CommandLineOptions options = new CommandLineOptions(args);

        if (verifyCmdLineOptions(options))  {
            String gameName = options.getValueForOption(GAME_OPTION);
            new OnlineGameServer(gameName, null);
        }
    }
View Full Code Here

Examples of com.barrybecker4.common.app.CommandLineOptions

    /**
     * create and show the server.
     */
    public static void main(String[] args) {

        CommandLineOptions options = new CommandLineOptions(args);

        if (OnlineGameServer.verifyCmdLineOptions(options)) {
            String gameName = options.getValueForOption(OnlineGameServer.GAME_OPTION);
            OnlineGameServerFrame frame = new OnlineGameServerFrame(gameName);
            frame.setVisible(true);
        }
    }
View Full Code Here

Examples of com.barrybecker4.common.app.CommandLineOptions

        if (args.length == 1) {
            // if there is only one arg assume it is the name of the game
            gameName = args[0];
        }
        else if (args.length > 1) {
            CommandLineOptions options = new CommandLineOptions(args);

            if (options.contains("help")) {     // NON-NLS
                GameContext.log(0, "Usage: -name <game> [-locale <locale>]"); // NON_NLS
            }
            // create a game panel of the appropriate type based on the name of the class passed in.
            // if no game is specified as an argument, then we show a menu for selecting a game
            gameName = options.getValueForOption("name", defaultGame);

            if (options.contains("locale")) {
                // then a locale has been specified
                String localeName = options.getValueForOption("locale", "ENGLISH");
                LocaleType locale = GameContext.getLocale(localeName, true);
                GameContext.setLocale(locale);
            }
        }
View Full Code Here

Examples of com.barrybecker4.common.app.CommandLineOptions

    public ApplicationApplet(String[] args) {
        GUIUtil.setCustomLookAndFeel();

        String localeName = "ENGLISH";
        if (args.length > 0) {
            CommandLineOptions options = new CommandLineOptions(args);

            if (options.contains("help")) {                          // NON-NLS
                System.out.println("Usage: [-locale <locale>]");     // NON-NLS
            }
            if (options.contains("locale")) {
                // then a locale has been specified
                localeName = options.getValueForOption("locale", "ENGLISH");

            }
        }
        initializeContext(localeName);
    }
View Full Code Here

Examples of com.socrata.datasync.config.CommandLineOptions

    @Before
    public void initialize() {
        job = new PortJob();
        parser = new PosixParser();
        cmd = new CommandLineOptions();
    }
View Full Code Here

Examples of com.socrata.datasync.config.CommandLineOptions

     * NB: it is expected that this is run before 'configure'.
     * @param cmd the commandLine object constructed from the user's options
     * @return true if the commandLine is approved, false otherwise
     */
    public static boolean validateArgs(CommandLine cmd) {
        CommandLineOptions options = new CommandLineOptions();
        return  validateDatasetIdArg(cmd, options) &&
                validateFileToPublishArg(cmd, options) &&
                validatePublishMethodArg(cmd, options) &&
                validateHeaderRowArg(cmd, options) &&
                validatePublishViaFtpArg(cmd, options) &&
View Full Code Here

Examples of com.socrata.datasync.config.CommandLineOptions

     * set from the cmd line and the controlFile contents are deserialized
     * NB: This should be run after 'validateArgs' and before 'run'
     * @param cmd the commandLine object constructed from the user's options
     */
    public void configure(CommandLine cmd) {
        CommandLineOptions options = new CommandLineOptions();
        String method = cmd.getOptionValue(options.PUBLISH_METHOD_FLAG);

        setDatasetID(cmd.getOptionValue(options.DATASET_ID_FLAG));
        setFileToPublish(cmd.getOptionValue(options.FILE_TO_PUBLISH_FLAG));
        if(method != null)
View Full Code Here

Examples of com.socrata.datasync.config.CommandLineOptions

            }
    } else {
        // generate & run job from command line args
            checkVersion();

            CommandLineOptions options = new CommandLineOptions();
            CommandLine cmd = options.getCommandLine(args);
            UserPreferences userPrefs = null;
            try {
                userPrefs = loadUserPreferences(options, cmd);
            } catch (IOException e) {
                System.err.println("Failed to load configuration: " + e.toString());
View Full Code Here

Examples of com.socrata.datasync.config.CommandLineOptions

        return JobStatus.SUCCESS;
    }

    private static boolean validateDestinationDomainArg(CommandLine cmd) {
        CommandLineOptions options = new CommandLineOptions();
        if(cmd.getOptionValue(options.DESTINATION_DOMAIN_FLAG) == null) {
            System.err.println("Missing required argument: -pd2,--" + options.DESTINATION_DOMAIN_FLAG + " is required");
            return false;
        }
        return true;
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.