{
public static void main(String args[])
{
pHtoolsConnectivity Connection = null;
pHtoolsConfig Config = null;
Config = new pHtoolsConfig();
Config.initialize();
Connection = new pHtoolsConnectivity(Config);
if (args.length < 3)
{
System.out.println("Usage: jpHtoolsCustodian command what repos");
throw new RuntimeException("At least three inputs required.");
}
String[] repos = Config.getRepositories();
String command = args[0];
//System.out.println("command:"+command);
String what = args[1];
//System.out.println("what:"+what);
String repo = args[2];
//System.out.println("repo:"+repo);
if (command.equalsIgnoreCase("clean"))
{
int exp_cleaned;
int buff_cleaned;
try
{
if (Config.isEnabled(repo))
{
jpHtoolsMaintenance man = (jpHtoolsMaintenance)Connection.getCustodian(repo);
if (what.equalsIgnoreCase("experiments"))
{
System.out.println("Cleaning experiments...");
exp_cleaned = man.cleanExperiments();
System.out.println("Experiments cleaned:"+exp_cleaned);