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/ElementToImageQuestionnaireConvertor.java
blob: 2e9cfa0396940b9ce0de3d033fe73c3a07878bc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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.ImageEntity;

public class ElementToImageQuestionnaireConvertor extends ElementConvertor <ImageEntity>{

  @Override
  public ImageEntity convert( Element element) {
    ImageEntity imageEntity = new ImageEntity();

    imageEntity.setId(element.getElementId().getValue());
    imageEntity.setQuestionnaireData(new String(FileUtils.toByteArray(element.getData())));
    return imageEntity;
  }

}