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

public class ElementToNicQuestionnaireConvertor extends ElementConvertor <NicEntity>{

  @Override
  public NicEntity convert( Element element) {
    NicEntity nicEntity = new NicEntity();

    nicEntity.setId(element.getElementId().getValue());
    nicEntity.setQuestionnaireData( element.getData() == null
        ? null
        : new String(FileUtils.toByteArray(element.getData())));
    return nicEntity;
  }

}