Search in sources :

Example 1 with Discover

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;
}
Also used : Discover(com.centurylink.mdw.cli.Discover) Folder(com.centurylink.mdw.plugin.designer.model.Folder) CodeTimer(com.centurylink.mdw.plugin.CodeTimer)

Aggregations

Discover (com.centurylink.mdw.cli.Discover)1 CodeTimer (com.centurylink.mdw.plugin.CodeTimer)1 Folder (com.centurylink.mdw.plugin.designer.model.Folder)1