use of com.centurylink.mdw.cli.Discover in project mdw-designer by CenturyLinkCloud.
the class Discoverer method getAssetTopFolder.
public Folder getAssetTopFolder(boolean latestVersionsOnly, IProgressMonitor progressMonitor) throws DiscoveryException, IOException, InterruptedException {
this.latestVersionsOnly = latestVersionsOnly;
this.progressMonitor = progressMonitor;
progressMonitor.worked(10);
CodeTimer timer = new CodeTimer("crawl for assets");
Folder topFolder = new Folder(MdwPlugin.getSettings().getMdwReleasesUrl());
if (groupId != null) {
Discover discover = new Discover(groupId, latestVersionsOnly);
parseJsonPacakges(topFolder, discover.run(new SwtProgressMonitor(progressMonitor)).getPackages().toString());
} else if (url != null) {
topFolder = new Folder(url.toString());
crawlForPackageFiles(topFolder);
removeEmptyFolders(topFolder);
}
timer.stopAndLog();
return topFolder;
}