Search in sources :

Example 11 with FlaggedOption

use of com.martiansoftware.jsap.FlaggedOption in project repairnator by Spirals-Team.

the class LauncherUtils method defineArgOutput.

public static FlaggedOption defineArgOutput(LauncherType launcherType, String helpMessage) {
    FlaggedOption opt = new FlaggedOption("output");
    opt.setShortFlag('o');
    opt.setLongFlag("output");
    FileStringParser fileStringParser = FileStringParser.getParser();
    if (launcherType == LauncherType.SCANNER || launcherType == LauncherType.CHECKBRANCHES) {
        fileStringParser.setMustBeFile(true);
    } else {
        fileStringParser.setMustBeDirectory(true).setMustExist(true);
    }
    opt.setStringParser(fileStringParser);
    if (launcherType == LauncherType.DOCKERPOOL || launcherType == LauncherType.REALTIME || launcherType == LauncherType.CHECKBRANCHES) {
        opt.setRequired(true);
    }
    opt.setHelp(helpMessage);
    return opt;
}
Also used : FlaggedOption(com.martiansoftware.jsap.FlaggedOption) FileStringParser(com.martiansoftware.jsap.stringparsers.FileStringParser)

Example 12 with FlaggedOption

use of com.martiansoftware.jsap.FlaggedOption in project repairnator by Spirals-Team.

the class LauncherUtils method defineArgMongoDBHost.

public static FlaggedOption defineArgMongoDBHost() {
    FlaggedOption opt = new FlaggedOption("mongoDBHost");
    opt.setLongFlag("dbhost");
    opt.setStringParser(JSAP.STRING_PARSER);
    opt.setHelp("Specify mongodb host.");
    return opt;
}
Also used : FlaggedOption(com.martiansoftware.jsap.FlaggedOption)

Example 13 with FlaggedOption

use of com.martiansoftware.jsap.FlaggedOption in project repairnator by Spirals-Team.

the class LauncherUtils method defineArgNotifyto.

public static FlaggedOption defineArgNotifyto() {
    FlaggedOption opt = new FlaggedOption("notifyto");
    opt.setLongFlag("notifyto");
    opt.setList(true);
    opt.setListSeparator(',');
    opt.setStringParser(JSAP.STRING_PARSER);
    opt.setHelp("Specify email addresses to notify");
    return opt;
}
Also used : FlaggedOption(com.martiansoftware.jsap.FlaggedOption)

Example 14 with FlaggedOption

use of com.martiansoftware.jsap.FlaggedOption in project repairnator by Spirals-Team.

the class LauncherUtils method defineArgSmtpServer.

public static FlaggedOption defineArgSmtpServer() {
    FlaggedOption opt = new FlaggedOption("smtpServer");
    opt.setLongFlag("smtpServer");
    opt.setStringParser(JSAP.STRING_PARSER);
    opt.setHelp("Specify SMTP server to use for Email notification");
    return opt;
}
Also used : FlaggedOption(com.martiansoftware.jsap.FlaggedOption)

Example 15 with FlaggedOption

use of com.martiansoftware.jsap.FlaggedOption in project repairnator by Spirals-Team.

the class LauncherUtils method defineArgLogDirectory.

public static FlaggedOption defineArgLogDirectory() {
    FlaggedOption opt = new FlaggedOption("logDirectory");
    opt.setShortFlag('l');
    opt.setLongFlag("logDirectory");
    opt.setStringParser(JSAP.STRING_PARSER);
    opt.setRequired(true);
    opt.setHelp("Specify where to put logs and serialized files created by docker machines.");
    return opt;
}
Also used : FlaggedOption(com.martiansoftware.jsap.FlaggedOption)

Aggregations

FlaggedOption (com.martiansoftware.jsap.FlaggedOption)19 JSAP (com.martiansoftware.jsap.JSAP)3 Switch (com.martiansoftware.jsap.Switch)2 JSAPException (com.martiansoftware.jsap.JSAPException)1 FileStringParser (com.martiansoftware.jsap.stringparsers.FileStringParser)1 LauncherMode (fr.inria.spirals.repairnator.states.LauncherMode)1