diff options
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/ElementToVSPQuestionnaireConvertor.java')
1 files changed, 17 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/ElementToVSPQuestionnaireConvertor.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/ElementToVSPQuestionnaireConvertor.java new file mode 100644 index 0000000000..d51b8b23b3 --- /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/ElementToVSPQuestionnaireConvertor.java @@ -0,0 +1,17 @@ +package org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.convertor; + +import com.amdocs.zusammen.adaptor.inbound.api.types.item.Element; +import com.amdocs.zusammen.utils.fileutils.FileUtils; +import org.openecomp.convertor.ElementConvertor; +import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspQuestionnaireEntity; + +public class ElementToVSPQuestionnaireConvertor extends ElementConvertor { + @Override + public VspQuestionnaireEntity convert( Element element) { + if(element == null) return null; + VspQuestionnaireEntity entity = new VspQuestionnaireEntity(); + entity.setQuestionnaireData(new String(FileUtils.toByteArray(element.getData()))); + return entity; + } + +} |