package rpc;

import java.util.List;

import dto.ExportDataRequest;
import model.FileModel;
import org.springframework.beans.factory.annotation.Autowired;
import service.ConfigExecutorService;

import ru.cg.webbpm.modules.webkit.annotations.RpcCall;
import ru.cg.webbpm.modules.webkit.annotations.RpcService;
import ru.cg.webbpm.modules.webkit.beans.Behavior;

/**
 * @author kochetkov
 */
@RpcService
public class ExportDataRpcService extends Behavior {

  private final ConfigExecutorService configExecutorService;

  public ExportDataRpcService(@Autowired ConfigExecutorService configExecutorService) {
    this.configExecutorService = configExecutorService;
  }

  @RpcCall
  public FileModel exportData(ExportDataRequest request) {
    return configExecutorService.exportData(request);
  }
}
