aboutsummaryrefslogtreecommitdiffstats
path: root/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/convertor/ElementToComponentQuestionnnaireConvertor.java
diff options
context:
space:
mode:
Diffstat (limited to '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/convertor/ElementToComponentQuestionnnaireConvertor.java')
-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/convertor/ElementToComponentQuestionnnaireConvertor.java21
1 files changed, 21 insertions, 0 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/convertor/ElementToComponentQuestionnnaireConvertor.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/convertor/ElementToComponentQuestionnnaireConvertor.java
new file mode 100644
index 0000000000..1554a1cc10
--- /dev/null
+++ 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/convertor/ElementToComponentQuestionnnaireConvertor.java
@@ -0,0 +1,21 @@
+package org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.convertor;
+
+import com.amdocs.zusammen.adaptor.inbound.api.types.item.Element;
+import org.openecomp.convertor.ElementConvertor;
+import org.openecomp.core.utilities.file.FileUtils;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
+
+
+/**
+ * Created by ayalaben on 9/27/2017
+ */
+public class ElementToComponentQuestionnnaireConvertor extends ElementConvertor<ComponentEntity> {
+ @Override
+ public ComponentEntity convert( Element element) {
+ ComponentEntity componentEntity = new ComponentEntity();
+
+ componentEntity.setId(element.getElementId().getValue());
+ componentEntity.setQuestionnaireData(new String(FileUtils.toByteArray(element.getData())));
+ return componentEntity;
+ }
+}