if (args.length < 3) {
System.out.flush();
throw new SitesException("Wrong number of args");
}
SiteEntry siteEntry = null;
if (args.length == 4) {
siteEntry = sitesHelper.createSite(args[1], args[2], args[3]);
} else if (args.length == 3) {
siteEntry = sitesHelper.createSite(args[1], args[2]);
}
System.out.println("Created!");
if (siteEntry.getHtmlLink() != null) {
System.out.println("View it at " + siteEntry.getHtmlLink().getHref());
}
} else if (name.equals("copysite")) {
if (args.length < 4) {
System.out.flush();
throw new SitesException("Wrong number of args");
}
SiteEntry siteEntry = siteEntry = sitesHelper.copySite(args[1], args[2], args[3]);
System.out.println("Created!");
if (siteEntry.getHtmlLink() != null) {
System.out.println("View it at " + siteEntry.getHtmlLink().getHref());
}
} else if (name.equals("content")) {
if (args.length == 1) {
sitesHelper.listSiteContents("all");