String legacyId = getLegacyId(id);
String effectiveId = legacyId == null ? id : legacyId;
String name = workingRT.getName();
String version = workingRT.getVersion();
DownloadRuntime dr = new DownloadRuntime(effectiveId, name, version, dlUrl);
dr.setDisclaimer(!wtpRT.startsWith(IJBossToolingConstants.EAP_RUNTIME_PREFIX));
dr.setHumanUrl(workingRT.getUrl());
dr.setLicenseURL(license);
dr.setSize(fileSize);
dr.setProperty(PROP_WTP_RUNTIME, wtpRT);
dr.setProperty(LABEL_RUNTIME_CATEGORY, category);
dr.setProperty(LABEL_RUNTIME_TYPE, workingRT.getLabels().getProperty(LABEL_RUNTIME_TYPE));
if(workingRT.getLabels().get(DownloadRuntime.PROPERTY_REQUIRES_CREDENTIALS) != null )
dr.setProperty(DownloadRuntime.PROPERTY_REQUIRES_CREDENTIALS, workingRT.getLabels().get(DownloadRuntime.PROPERTY_REQUIRES_CREDENTIALS));
if( legacyId != null )
dr.setProperty(DownloadRuntime.PROPERTY_ALTERNATE_ID, id);
list.add(dr);
}
}
monitor.worked(100);
}