summaryrefslogtreecommitdiffstats
path: root/openecomp-be
diff options
context:
space:
mode:
authorAbhai Singh <Abhai.Singh@amdocs.com>2018-01-04 17:24:20 +0530
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-01-04 13:16:12 +0000
commit9a89e32f50e91c7b4c45b3308738d349347b375f (patch)
treee0fbd17711ca22205575b4474c0a4abda955261d /openecomp-be
parent1965d1663135b880b9774bca2630260e6f28d198 (diff)
Fix OrchestrationTemplateCandidateDaoZusammenImpl
Fixed reported sonar issues, sonar issue related to exception handling are skipped as they would be fixed later Change-Id: Ifc28fe4358eb542bcbf666a07bc37d5488df14c7 Issue-ID: SDC-343 Signed-off-by: Abhai Singh <Abhai.Singh@amdocs.com>
Diffstat (limited to 'openecomp-be')
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateCandidateDaoZusammenImpl.java28
1 files changed, 19 insertions, 9 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateCandidateDaoZusammenImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateCandidateDaoZusammenImpl.java
index 5d1ef125fd..a0c3fd4032 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateCandidateDaoZusammenImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateCandidateDaoZusammenImpl.java
@@ -42,7 +42,7 @@ public class OrchestrationTemplateCandidateDaoZusammenImpl
@Override
public void registerVersioning(String versionableEntityType) {
-
+ // registerVersioning not implemented for OrchestrationTemplateCandidateDaoZusammenImpl
}
@Override
@@ -71,9 +71,9 @@ public class OrchestrationTemplateCandidateDaoZusammenImpl
candidateData.setContentData(
ByteBuffer.wrap(FileUtils.toByteArray(candidateContentElement.get().getData())));
candidateData.setFileSuffix(candidateContentElement.get().getInfo()
- .getProperty(InfoPropertyName.fileSuffix.name()));
+ .getProperty(InfoPropertyName.FILE_SUFFIX.getVal()));
candidateData.setFileName(candidateContentElement.get().getInfo()
- .getProperty(InfoPropertyName.fileName.name()));
+ .getProperty(InfoPropertyName.FILE_NAME.getVal()));
}
logger
.info("Finished getting orchestration template for VendorSoftwareProduct id -> " + vspId);
@@ -103,9 +103,9 @@ public class OrchestrationTemplateCandidateDaoZusammenImpl
if (candidateContentElement.isPresent()) {
candidateData.setFileSuffix(candidateContentElement.get().getInfo()
- .getProperty(InfoPropertyName.fileSuffix.name()));
+ .getProperty(InfoPropertyName.FILE_SUFFIX.getVal()));
candidateData.setFileName(candidateContentElement.get().getInfo()
- .getProperty(InfoPropertyName.fileName.name()));
+ .getProperty(InfoPropertyName.FILE_NAME.getVal()));
}
logger.info(
"Finished getting orchestration template info for VendorSoftwareProduct id -> " + vspId);
@@ -132,9 +132,9 @@ public class OrchestrationTemplateCandidateDaoZusammenImpl
candidateContentElement
.setData(new ByteArrayInputStream(candidateData.getContentData().array()));
candidateContentElement.getInfo()
- .addProperty(InfoPropertyName.fileSuffix.name(), candidateData.getFileSuffix());
+ .addProperty(InfoPropertyName.FILE_SUFFIX.getVal(), candidateData.getFileSuffix());
candidateContentElement.getInfo()
- .addProperty(InfoPropertyName.fileName.name(), candidateData.getFileName());
+ .addProperty(InfoPropertyName.FILE_NAME.getVal(), candidateData.getFileName());
candidateElement.addSubElement(candidateContentElement);
SessionContext context = createSessionContext();
@@ -203,7 +203,17 @@ public class OrchestrationTemplateCandidateDaoZusammenImpl
}
public enum InfoPropertyName {
- fileSuffix,
- fileName
+ FILE_SUFFIX("fileSuffix"),
+ FILE_NAME("fileName");
+
+ private String val;
+
+ InfoPropertyName(String val){
+ this.val=val;
+ }
+
+ public String getVal() {
+ return val;
+ }
}
}