summaryrefslogtreecommitdiffstats
path: root/openecomp-be
diff options
context:
space:
mode:
authorAbhai Singh <Abhai.Singh@amdocs.com>2018-01-04 17:52:04 +0530
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-01-04 13:56:08 +0000
commita0897881ae1dce8bd78d1a8ea67b6e053f8ca6ae (patch)
tree133811e18226139bd0f4398b4afab71b11355e93 /openecomp-be
parent9a89e32f50e91c7b4c45b3308738d349347b375f (diff)
Fix OrchestrationTemplateDaoZusammenImpl
Fixed reported sonar issues, sonar issue related to exception handling are skipped as they would be fixed later Change-Id: Ib83c69b7b2cfd7fc6e719b3678424c18c3e2cb8a 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/OrchestrationTemplateDaoZusammenImpl.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/OrchestrationTemplateDaoZusammenImpl.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/OrchestrationTemplateDaoZusammenImpl.java
index d02e8541f4..d5e09ac298 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/OrchestrationTemplateDaoZusammenImpl.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/OrchestrationTemplateDaoZusammenImpl.java
@@ -34,7 +34,7 @@ public class OrchestrationTemplateDaoZusammenImpl implements OrchestrationTempla
@Override
public void registerVersioning(String versionableEntityType) {
-
+ // registerVersioning not implemented for OrchestrationTemplateDaoZusammenImpl
}
@Override
@@ -64,9 +64,9 @@ public class OrchestrationTemplateDaoZusammenImpl implements OrchestrationTempla
return orchestrationTemplate;
}
orchestrationTemplate
- .setFileSuffix(element.get().getInfo().getProperty(InfoPropertyName.fileSuffix.name()));
+ .setFileSuffix(element.get().getInfo().getProperty(InfoPropertyName.FILE_SUFFIX.getVal()));
orchestrationTemplate
- .setFileName(element.get().getInfo().getProperty(InfoPropertyName.fileName.name()));
+ .setFileName(element.get().getInfo().getProperty(InfoPropertyName.FILE_NAME.getVal()));
if (!hasEmptyData(element.get().getData())) {
orchestrationTemplate
.setValidationData(new String(FileUtils.toByteArray(element.get().getData())));
@@ -105,9 +105,9 @@ public class OrchestrationTemplateDaoZusammenImpl implements OrchestrationTempla
ElementType.OrchestrationTemplateValidationData.name());
if (validationDataElement.isPresent()) {
orchestrationTemplate.setFileSuffix(validationDataElement.get().getInfo()
- .getProperty(InfoPropertyName.fileSuffix.name()));
+ .getProperty(InfoPropertyName.FILE_SUFFIX.getVal()));
orchestrationTemplate.setFileName(validationDataElement.get().getInfo()
- .getProperty(InfoPropertyName.fileName.name()));
+ .getProperty(InfoPropertyName.FILE_NAME.getVal()));
if (!hasEmptyData(validationDataElement.get().getData())) {
orchestrationTemplate.setValidationData(
new String(FileUtils.toByteArray(validationDataElement.get().getData())));
@@ -127,9 +127,9 @@ public class OrchestrationTemplateDaoZusammenImpl implements OrchestrationTempla
validationData
.setData(new ByteArrayInputStream(orchestrationTemplate.getValidationData().getBytes()));
validationData.getInfo()
- .addProperty(InfoPropertyName.fileSuffix.name(), orchestrationTemplate.getFileSuffix());
+ .addProperty(InfoPropertyName.FILE_SUFFIX.getVal(), orchestrationTemplate.getFileSuffix());
validationData.getInfo()
- .addProperty(InfoPropertyName.fileName.name(), orchestrationTemplate.getFileName());
+ .addProperty(InfoPropertyName.FILE_NAME.getVal(), orchestrationTemplate.getFileName());
ZusammenElement orchestrationTemplateElement =
buildStructuralElement(ElementType.OrchestrationTemplate, Action.UPDATE);
@@ -159,7 +159,17 @@ public class OrchestrationTemplateDaoZusammenImpl implements OrchestrationTempla
}
private enum InfoPropertyName {
- fileSuffix,
- fileName
+ FILE_SUFFIX("fileSuffix"),
+ FILE_NAME("fileName");
+
+ private String val;
+
+ InfoPropertyName(String val){
+ this.val=val;
+ }
+
+ public String getVal() {
+ return val;
+ }
}
}