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>
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 d02e854..d5e09ac 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 @@
@Override
public void registerVersioning(String versionableEntityType) {
-
+ // registerVersioning not implemented for OrchestrationTemplateDaoZusammenImpl
}
@Override
@@ -64,9 +64,9 @@
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 @@
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 @@
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 @@
}
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;
+ }
}
}