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/ElementToOrchestrationTemplateCandidateMapConvertor.java
blob: b07df95ecc8b53fc84d74697afafad78a881ed6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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.core.utilities.json.JsonUtil;
import org.openecomp.sdc.vendorsoftwareproduct.types.candidateheat.FilesDataStructure;

/**
 * Created by ayalaben on 9/6/2017
 */
public class ElementToOrchestrationTemplateCandidateMapConvertor
    extends ElementConvertor<FilesDataStructure> {

  @Override
  public FilesDataStructure convert(Element element) {
    return JsonUtil.json2Object(new String(FileUtils.toByteArray(element.getData())),
        FilesDataStructure.class);
  }
}