sandwich get bundles (bundle options, time range etc)
sandwich reprocess bundles (bundle options, time range etc)
sandwich reindex bundles
sandwich reindex facts
Hi Todd,
I think what you are looking for is variable arities.
--
You received this message because you are subscribed to the Google Groups "jcommander" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jcommander+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
program -foo a1 a2 a3 -bar
program -foo a1 -bar
--Cédric
To unsubscribe from this group and stop receiving emails from it, send an email to jcommander+...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to jcommander+unsubscribe@googlegroups.com.
/**
* This class is responsible for listing all bundles and printing them to stdout
*/
@Parameters(commandDescription = "Lists all bundle files in the specified resources")
public final class GetBundlesCommand implements Command
{
@Parameter(names = "bucket", description = "The S3 bucket to list resources from")
String s3Bucket;
@Parameter(names = "region", description = "The region of the s3 bucket")
String s3Region;
}
/**
* This class is responsible for getting all bundles, and re-queueing them. Will re-use GetBundlesCommand
* to ensure compatibility across list + process functionality
*/
@Parameters(commandDescription = "Queues all bundle files in the specified resources")
public final class QueueBundlesCommand
{
@Parameter(names = "dry-run", description = "True if the queue should not be executed")
private boolean dryRun;
}
/**
* The main class that is invoked when the program starts
*/
public final class Main
{
public static void main(final String[] args)
{
final GetBundlesCommand getBundlesCommand = new GetBundlesCommand();
final QueueBundlesCommand queueBundlesCommand = new QueueBundlesCommand();
final JCommander jc = JCommander.newBuilder()
.addCommand("get bundles", getBundlesCommand)
.addCommand("queue bundles", queueBundlesCommand)
.build();
jc.parse(args);
}
}