Add collaboration feature
[sdc.git] / 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
1 package org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.convertor;
2
3 import com.amdocs.zusammen.adaptor.inbound.api.types.item.Element;
4 import org.openecomp.convertor.ElementConvertor;
5 import org.openecomp.core.utilities.file.FileUtils;
6 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
7
8
9 /**
10  * Created by ayalaben on 9/27/2017
11  */
12 public class ElementToComponentQuestionnnaireConvertor extends ElementConvertor<ComponentEntity> {
13   @Override
14   public ComponentEntity convert( Element element) {
15     ComponentEntity componentEntity = new ComponentEntity();
16
17     componentEntity.setId(element.getElementId().getValue());
18     componentEntity.setQuestionnaireData(new String(FileUtils.toByteArray(element.getData())));
19     return componentEntity;
20   }
21 }