summaryrefslogtreecommitdiffstats
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/ElementToVSPQuestionnaireConvertor.java
blob: d51b8b23b38168bd2897e016fb3a50fda85dae35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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;
  }

}