diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java')
2 files changed, 27 insertions, 10 deletions
diff --git a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ManufacturerReferenceNumberHealer.java b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ManufacturerReferenceNumberHealer.java index 4bb5bc865a..0416cc9479 100644 --- a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ManufacturerReferenceNumberHealer.java +++ b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ManufacturerReferenceNumberHealer.java @@ -33,10 +33,19 @@ import java.util.Set; public class ManufacturerReferenceNumberHealer implements Healer { private static final String MANUFACTURER_REFERENCE_NUMBER = "MRN"; - private VendorLicenseFacade vendorLicenseFacade = VendorLicenseFacadeFactory.getInstance() - .createInterface(); - private static final FeatureGroupDao featureGroupDao = - FeatureGroupDaoFactory.getInstance().createInterface(); + private final VendorLicenseFacade vendorLicenseFacade; + private final FeatureGroupDao featureGroupDao; + + public ManufacturerReferenceNumberHealer() { + this(VendorLicenseFacadeFactory.getInstance().createInterface(), FeatureGroupDaoFactory + .getInstance().createInterface()); + } + + public ManufacturerReferenceNumberHealer(VendorLicenseFacade vendorLicenseFacade, + FeatureGroupDao featureGroupDao) { + this.vendorLicenseFacade = vendorLicenseFacade; + this.featureGroupDao = featureGroupDao; + } @Override public boolean isHealingNeeded(String itemId, Version version) { diff --git a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/NetworkPackageHealer.java b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/NetworkPackageHealer.java index 5ff90ae1c1..e1807bafad 100644 --- a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/NetworkPackageHealer.java +++ b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/NetworkPackageHealer.java @@ -75,14 +75,22 @@ public class NetworkPackageHealer implements Healer { "Vsp with invalid structure: does not contain element OrchestrationTemplateValidationData" + " under OrchestrationTemplate element"; - private VendorSoftwareProductInfoDao vspInfoDao; - private ZusammenAdaptor zusammenAdaptor; - private CandidateService candidateService; + private final VendorSoftwareProductInfoDao vspInfoDao; + private final ZusammenAdaptor zusammenAdaptor; + private final CandidateService candidateService; public NetworkPackageHealer() { - this.vspInfoDao = VendorSoftwareProductInfoDaoFactory.getInstance().createInterface(); - this.zusammenAdaptor = ZusammenAdaptorFactory.getInstance().createInterface(); - this.candidateService = CandidateServiceFactory.getInstance().createInterface(); + this(VendorSoftwareProductInfoDaoFactory.getInstance().createInterface(), + ZusammenAdaptorFactory.getInstance().createInterface(), CandidateServiceFactory + .getInstance().createInterface()); + } + + public NetworkPackageHealer(VendorSoftwareProductInfoDao vspInfoDao, + ZusammenAdaptor zusammenAdaptor, + CandidateService candidateService) { + this.vspInfoDao = vspInfoDao; + this.zusammenAdaptor = zusammenAdaptor; + this.candidateService = candidateService; } @Override |