deleteAll = true;
}
// get server address and run ids from left over arguments
String[] args = line.getArgs();
Server server = getServer(args);
ArrayList<UUID> runs = new ArrayList<UUID>();
for (String arg : args) {
try {
UUID run = UUID.fromString(arg);
runs.add(run);
} catch (IllegalArgumentException e) {
// not a UUID, ignore
}
}
// delete things
if (deleteAll) {
server.deleteAllRuns();
} else {
if (runs.size() == 0) {
showHelpAndExit(1);
}
for (UUID u : runs) {
try {
server.deleteRun(u);
} catch (RunNotFoundException e) {
System.out.println("Run '" + u + "' not found - skipping.");
}
}
}