import org.openecomp.sdc.enrichment.inter.ExternalArtifactEnricherInterface;
import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductConstants;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.OrchestrationTemplateDao;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.OrchestrationTemplateDaoFactory;
import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDaoFactory;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
EnrichedServiceModelDaoFactory.getInstance().createInterface();
private VendorSoftwareProductInfoDao vspInfoDao = VendorSoftwareProductInfoDaoFactory
.getInstance().createInterface();
- private OrchestrationTemplateDao orchestrationTemplateDataDao =
- OrchestrationTemplateDaoFactory.getInstance().createInterface();
public VspInformationArtifactEnricher() {
}
throws IOException {
- mdcDataDebugMessage.debugEntryMessage(null, null);
+ mdcDataDebugMessage.debugEntryMessage(null);
Map<String, List<ErrorMessage>> errors = new HashMap<>();
ByteBuffer infoArtifactByteBuffer = ByteBuffer.wrap(informationArtifactGenerator.generate(
vspId, version.toString())));
//TODO: add error to map (what is the key?)
- mdcDataDebugMessage.debugExitMessage(null, null);
+ mdcDataDebugMessage.debugExitMessage(null);
return errors;
}
enrichInformationArtifact(vspId, version, infoArtifactByteBuffer);
- mdcDataDebugMessage.debugExitMessage(null, null);
+ mdcDataDebugMessage.debugExitMessage(null);
return errors;
}
ByteBuffer infoArtifactByteBuffer) {
ServiceArtifact infoArtifactServiceArtifact = new ServiceArtifact();
- VspDetails vspDetails = getVspDetails(vspId, version);
-
- String vspName = vspDetails.getName();
-
+ String vspName = vspInfoDao.get(new VspDetails(vspId, version)).getName();
infoArtifactServiceArtifact.setVspId(vspId);
infoArtifactServiceArtifact.setVersion(version);
enrichedServiceModelDao.storeExternalArtifact(infoArtifactServiceArtifact);
}
- public VspDetails getVspDetails(String vspId,Version version){
- VspDetails vspDetails = vspInfoDao.get(new VspDetails(vspId,version));
- vspDetails.setValidationData(orchestrationTemplateDataDao.getValidationData(vspId,version));
- return vspDetails;
- }
+
}