package com.xdap.self_development.service;

import com.definesys.mpaas.query.db.PageQueryResult;
import com.xdap.self_development.common.MyResponse;
import com.xdap.self_development.controller.form.*;
import com.xdap.self_development.domain.pojo.ParameterPojo;
import com.xdap.self_development.domain.pojo.TemplatePojo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.NotBlank;
import java.util.List;

public interface TemplateService {
    PageQueryResult<TemplatePojo> getTemplateByCondition(TemplatePageForm form);

	MyResponse importTemplate(MultipartFile file, String templateRowId, String userId);

    void processSheetData(List<ParameterPojo> dataList, String sheetName,
                          String templateRowId, String createBy, MyResponse problems);

	void insertTemplate(InsertTemplateForm form);

	void updateTemplate(UpdateTemplateForm form);

	void exportTemplate(ExportTemplateForm form, HttpServletResponse response);

    void exportMultipleTemplates(HttpServletResponse response);

	List<TemplatePojo> getTemplateVersion(TemplateRowIdForm form);

    TemplatePojo getTemplateById(@NotBlank String templateId);

    void deleteTemplate(@NotBlank String templateId);
}
