use of com.synopsys.integration.blackduck.api.generated.component.ComponentVersionUpgradeGuidanceShortTermView in project hub-alert by blackducksoftware.
the class BlackDuckMessageComponentVersionUpgradeGuidanceServiceTest method createUpgradeGuidance.
private ComponentVersionUpgradeGuidanceView createUpgradeGuidance(boolean includeShortTerm) {
ComponentVersionUpgradeGuidanceView upgradeGuidanceView = new ComponentVersionUpgradeGuidanceView();
if (includeShortTerm) {
ComponentVersionUpgradeGuidanceShortTermView shortTermView = new ComponentVersionUpgradeGuidanceShortTermView();
ComponentVersionUpgradeGuidanceShortTermVulnerabilityRiskView shortTermRiskView = new ComponentVersionUpgradeGuidanceShortTermVulnerabilityRiskView();
shortTermRiskView.setCritical(BigDecimal.ZERO);
shortTermRiskView.setHigh(BigDecimal.ZERO);
shortTermRiskView.setMedium(BigDecimal.ZERO);
shortTermRiskView.setLow(BigDecimal.ZERO);
shortTermView.setVulnerabilityRisk(shortTermRiskView);
upgradeGuidanceView.setShortTerm(shortTermView);
}
ComponentVersionUpgradeGuidanceLongTermView longTermView = new ComponentVersionUpgradeGuidanceLongTermView();
ComponentVersionUpgradeGuidanceLongTermVulnerabilityRiskView longTermRiskView = new ComponentVersionUpgradeGuidanceLongTermVulnerabilityRiskView();
longTermRiskView.setCritical(BigDecimal.TEN);
longTermRiskView.setHigh(BigDecimal.valueOf(20L));
longTermRiskView.setMedium(BigDecimal.valueOf(30L));
longTermRiskView.setLow(BigDecimal.valueOf(40L));
longTermView.setVulnerabilityRisk(longTermRiskView);
upgradeGuidanceView.setLongTerm(longTermView);
return upgradeGuidanceView;
}
use of com.synopsys.integration.blackduck.api.generated.component.ComponentVersionUpgradeGuidanceShortTermView in project hub-alert by blackducksoftware.
the class VulnerabilityNotificationMessageExtractorTest method createComponentVersionUpgradeGuidanceView.
private ComponentVersionUpgradeGuidanceView createComponentVersionUpgradeGuidanceView() {
ComponentVersionUpgradeGuidanceView componentVersionUpgradeGuidanceView = new ComponentVersionUpgradeGuidanceView();
ComponentVersionUpgradeGuidanceShortTermView shortTermView = new ComponentVersionUpgradeGuidanceShortTermView();
shortTermView.setOrigin("http://upgradeGuidanceOriginUrlShortTerm");
shortTermView.setOriginExternalId("upgradeGuidanceExternalIdShortTerm");
shortTermView.setOriginExternalNamespace("upgradeGuidanceExternalNamespaceShortTerm");
shortTermView.setOriginName("upgradeGuidanceOriginNameShortTerm");
shortTermView.setVersion("http://upgradeGuidanceVersionShorTerm");
shortTermView.setVersionName("upgradeGuidanceVersionNameShortTerm");
ComponentVersionUpgradeGuidanceShortTermVulnerabilityRiskView shortTermRiskView = new ComponentVersionUpgradeGuidanceShortTermVulnerabilityRiskView();
shortTermRiskView.setCritical(BigDecimal.ZERO);
shortTermRiskView.setHigh(BigDecimal.ZERO);
shortTermRiskView.setMedium(BigDecimal.ZERO);
shortTermRiskView.setLow(BigDecimal.ZERO);
shortTermView.setVulnerabilityRisk(shortTermRiskView);
componentVersionUpgradeGuidanceView.setShortTerm(shortTermView);
ComponentVersionUpgradeGuidanceLongTermView longTermView = new ComponentVersionUpgradeGuidanceLongTermView();
longTermView.setOrigin("http://upgradeGuidanceOriginUrlLongTerm");
longTermView.setOriginExternalId("upgradeGuidanceExternalIdLongTerm");
longTermView.setOriginExternalNamespace("upgradeGuidanceExternalNamespaceLongTerm");
longTermView.setOriginName("upgradeGuidanceOriginNameLongTerm");
longTermView.setVersion("http://upgradeGuidanceVersionLongTerm");
longTermView.setVersionName("upgradeGuidanceVersionNameLongTerm");
ComponentVersionUpgradeGuidanceLongTermVulnerabilityRiskView longTermRiskView = new ComponentVersionUpgradeGuidanceLongTermVulnerabilityRiskView();
longTermRiskView.setCritical(BigDecimal.ZERO);
longTermRiskView.setHigh(BigDecimal.ZERO);
longTermRiskView.setMedium(BigDecimal.ZERO);
longTermRiskView.setLow(BigDecimal.ZERO);
longTermView.setVulnerabilityRisk(longTermRiskView);
componentVersionUpgradeGuidanceView.setLongTerm(longTermView);
return componentVersionUpgradeGuidanceView;
}
Aggregations