Search in sources :

Example 1 with ExcelMultiTemplateRuleByProject

use of com.webank.wedatasphere.qualitis.project.excel.ExcelMultiTemplateRuleByProject in project Qualitis by WeBankFinTech.

the class RuleBatchServiceImpl method downloadRulesReal.

private GeneralResponse<?> downloadRulesReal(List<Rule> rules, HttpServletResponse response, String loginUser) throws IOException, WriteExcelException {
    String fileName = "batch_rules_export_" + FILE_DATE_FORMATTER.format(new Date()) + SUPPORT_EXCEL_SUFFIX_NAME;
    fileName = URLEncoder.encode(fileName, "UTF-8");
    response.setContentType("application/octet-stream");
    response.addHeader("Content-Disposition", "attachment;filename*=UTF-8''" + fileName);
    response.addHeader("Access-Control-Expose-Headers", "Content-Disposition");
    String localeStr = httpServletRequest.getHeader("Content-Language");
    // Write to response.getOutputStream
    OutputStream outputStream = response.getOutputStream();
    List<ExcelCustomRuleByProject> customRules = getCustomRule(rules, localeStr);
    List<ExcelTemplateRuleByProject> templateRules = getTemplateRule(rules, localeStr);
    List<ExcelTemplateFileRuleByProject> templateFileRules = getFileRule(rules, localeStr);
    List<ExcelMultiTemplateRuleByProject> multiTemplateRules = getMultiTemplateRule(rules, localeStr);
    writeExcelToOutput(templateRules, customRules, multiTemplateRules, templateFileRules, outputStream);
    outputStream.flush();
    LOGGER.info("Succeed to download all rules in type of excel");
    // projectEventService.record(rules.iterator().next().getProject().getId(), loginUser, "download", "rules[" + Arrays.toString(rules.stream().map(Rule::getName).toArray()) + "].", EventTypeEnum.MODIFY_PROJECT.getCode());
    return null;
}
Also used : ExcelMultiTemplateRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelMultiTemplateRuleByProject) ExcelCustomRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelCustomRuleByProject) OutputStream(java.io.OutputStream) ExcelTemplateFileRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelTemplateFileRuleByProject) Date(java.util.Date) ExcelTemplateRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelTemplateRuleByProject)

Example 2 with ExcelMultiTemplateRuleByProject

use of com.webank.wedatasphere.qualitis.project.excel.ExcelMultiTemplateRuleByProject in project Qualitis by WeBankFinTech.

the class ProjectBatchServiceImpl method uploadProjectsReal.

private GeneralResponse<?> uploadProjectsReal(InputStream fileInputStream, String fileName, String userName, boolean aomp) throws IOException, UnExpectedRequestException, PermissionDeniedRequestException, RoleNotFoundException {
    String suffixName = fileName.substring(fileName.lastIndexOf('.'));
    if (!suffixName.equals(SUPPORT_EXCEL_SUFFIX_NAME)) {
        throw new UnExpectedRequestException("{&DO_NOT_SUPPORT_SUFFIX_NAME}: [" + suffixName + "]. {&ONLY_SUPPORT} [" + SUPPORT_EXCEL_SUFFIX_NAME + "]", 422);
    }
    if (userName == null) {
        return new GeneralResponse<>("401", "{&PLEASE_LOGIN}", null);
    }
    User user = userDao.findByUsername(userName);
    Long userId = user.getId();
    // Read file and create project
    ExcelProjectListener listener = readExcel(fileInputStream);
    // Check if excel file is empty
    if (listener.getExcelProjectContent().isEmpty() && listener.getExcelRuleContent().isEmpty() && listener.getExcelCustomRuleContent().isEmpty() && listener.getExcelMultiRuleContent().isEmpty() && listener.getTemplateFileExcelContent().isEmpty() && listener.getExcelMetricContent().isEmpty()) {
        throw new UnExpectedRequestException("{&FILE_CAN_NOT_BE_EMPTY_OR_FILE_CAN_NOT_BE_RECOGNIZED}", 422);
    }
    for (ExcelProject excelProject : listener.getExcelProjectContent()) {
        Project project = projectDao.findByNameAndCreateUser(excelProject.getProjectName(), userName);
        if (project != null) {
            if (!aomp) {
                LOGGER.info("hint for user to decide to override or not.");
            }
            // Means update project.
            LOGGER.info("Start to update project[name={}] with upload project file.", project.getName());
            ModifyProjectDetailRequest request = convertExcelProjectToModifyProjectRequest(excelProject, project, userName);
            projectService.modifyProjectDetail(request, false);
        } else {
            // Check excel project arguments is valid or not
            AddProjectRequest request = convertExcelProjectToAddProjectRequest(excelProject);
            projectService.addProject(request, userId);
        }
    }
    for (ExcelRuleMetric excelRuleMetric : listener.getExcelMetricContent()) {
        RuleMetric ruleMetric = ruleMetricDao.findByName(excelRuleMetric.getName());
        if (ruleMetric != null) {
            if (!aomp) {
                LOGGER.info("hint for user to decide to override or not.");
            }
            LOGGER.info("Start to update rule metric[name={}] with upload rule metric file.", ruleMetric.getName());
            modifyRuleMetric(excelRuleMetric, ruleMetric, userName);
        } else {
            addRuleMetric(excelRuleMetric, userName);
        }
    }
    // Create rules according to excel sheet
    Map<String, Map<String, List<ExcelTemplateRuleByProject>>> excelTemplateRulePartitionedByProject = listener.getExcelRuleContent();
    Map<String, Map<String, List<ExcelCustomRuleByProject>>> excelCustomRulePartitionedByProject = listener.getExcelCustomRuleContent();
    Map<String, Map<String, List<ExcelMultiTemplateRuleByProject>>> excelMultiTemplateRulePartitionedByProject = listener.getExcelMultiRuleContent();
    Map<String, Map<String, List<ExcelTemplateFileRuleByProject>>> excelTemplateFileRulePartitionedByProject = listener.getTemplateFileExcelContent();
    Set<String> allProjects = new HashSet<>();
    allProjects.addAll(excelTemplateRulePartitionedByProject.keySet());
    allProjects.addAll(excelCustomRulePartitionedByProject.keySet());
    allProjects.addAll(excelMultiTemplateRulePartitionedByProject.keySet());
    allProjects.addAll(excelTemplateFileRulePartitionedByProject.keySet());
    for (String projectName : allProjects) {
        try {
            Project projectInDb = projectDao.findByNameAndCreateUser(projectName, userName);
            if (projectInDb == null) {
                throw new UnExpectedRequestException("{&PROJECT}: [" + projectName + "] {&DOES_NOT_EXIST}");
            }
            ruleBatchService.getAndSaveRule(excelTemplateRulePartitionedByProject.get(projectName), excelCustomRulePartitionedByProject.get(projectName), excelMultiTemplateRulePartitionedByProject.get(projectName), excelTemplateFileRulePartitionedByProject.get(projectName), projectInDb, userName, aomp);
        } catch (Exception e) {
            throw new UnExpectedRequestException(e.getMessage());
        }
    }
    fileInputStream.close();
    return new GeneralResponse<>("200", "{&SUCCEED_TO_UPLOAD_FILE}", null);
}
Also used : RuleMetric(com.webank.wedatasphere.qualitis.entity.RuleMetric) UnExpectedRequestException(com.webank.wedatasphere.qualitis.exception.UnExpectedRequestException) ExcelMultiTemplateRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelMultiTemplateRuleByProject) RuleMetricDepartmentUser(com.webank.wedatasphere.qualitis.entity.RuleMetricDepartmentUser) User(com.webank.wedatasphere.qualitis.entity.User) AddProjectRequest(com.webank.wedatasphere.qualitis.project.request.AddProjectRequest) ExcelCustomRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelCustomRuleByProject) ModifyProjectDetailRequest(com.webank.wedatasphere.qualitis.project.request.ModifyProjectDetailRequest) PermissionDeniedRequestException(com.webank.wedatasphere.qualitis.exception.PermissionDeniedRequestException) ZipException(net.lingala.zip4j.exception.ZipException) RoleNotFoundException(javax.management.relation.RoleNotFoundException) UnExpectedRequestException(com.webank.wedatasphere.qualitis.exception.UnExpectedRequestException) IOException(java.io.IOException) WriteExcelException(com.webank.wedatasphere.qualitis.rule.exception.WriteExcelException) GeneralResponse(com.webank.wedatasphere.qualitis.response.GeneralResponse) ExcelMultiTemplateRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelMultiTemplateRuleByProject) ExcelCustomRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelCustomRuleByProject) ExcelTemplateRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelTemplateRuleByProject) Project(com.webank.wedatasphere.qualitis.project.entity.Project) ExcelProjectListener(com.webank.wedatasphere.qualitis.project.excel.ExcelProjectListener) ExcelTemplateRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelTemplateRuleByProject)

Example 3 with ExcelMultiTemplateRuleByProject

use of com.webank.wedatasphere.qualitis.project.excel.ExcelMultiTemplateRuleByProject in project Qualitis by WeBankFinTech.

the class ProjectBatchServiceImpl method writeProjectAndRules.

private GeneralResponse<?> writeProjectAndRules(List<Project> projects, HttpServletResponse response) throws IOException, WriteExcelException {
    String fileName = "batch_project_export_" + FILE_DATE_FORMATTER.format(new Date()) + SUPPORT_EXCEL_SUFFIX_NAME;
    fileName = URLEncoder.encode(fileName, "UTF-8");
    response.setContentType("application/octet-stream");
    response.addHeader("Content-Disposition", "attachment;filename*=UTF-8''" + fileName);
    response.addHeader("Access-Control-Expose-Headers", "Content-Disposition");
    String localeStr = httpServletRequest.getHeader("Content-Language");
    OutputStream outputStream = response.getOutputStream();
    List<ExcelProject> excelProject = getExcelProject(projects);
    List<ExcelTemplateRuleByProject> excelTemplateRuleByProject = getExcelRuleByProject(projects, localeStr);
    List<ExcelCustomRuleByProject> excelCustomRuleByProject = getExcelCustomRuleByProject(projects, localeStr);
    List<ExcelTemplateFileRuleByProject> excelTemplateFileRuleByProject = getExcelTemplateFileRuleByProject(projects, localeStr);
    List<ExcelMultiTemplateRuleByProject> excelMultiTemplateRuleByProject = getExcelMultiTemplateRuleByProject(projects, localeStr);
    writeExcelToOutput(excelProject, excelTemplateRuleByProject, excelCustomRuleByProject, excelMultiTemplateRuleByProject, excelTemplateFileRuleByProject, outputStream);
    outputStream.flush();
    LOGGER.info("Succeed to download all projects in type of excel");
    return null;
}
Also used : ExcelMultiTemplateRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelMultiTemplateRuleByProject) ExcelCustomRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelCustomRuleByProject) OutputStream(java.io.OutputStream) FileOutputStream(java.io.FileOutputStream) ExcelTemplateRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelTemplateRuleByProject)

Example 4 with ExcelMultiTemplateRuleByProject

use of com.webank.wedatasphere.qualitis.project.excel.ExcelMultiTemplateRuleByProject in project Qualitis by WeBankFinTech.

the class ProjectBatchServiceImpl method getExcelMultiTemplateRuleByProject.

private List<ExcelMultiTemplateRuleByProject> getExcelMultiTemplateRuleByProject(List<Project> projects, String localeStr) {
    List<ExcelMultiTemplateRuleByProject> excelMultiTemplateRuleByProjects = new ArrayList<>();
    for (Project project : projects) {
        List<Rule> rules = ruleDao.findByProject(project);
        List<ExcelMultiTemplateRuleByProject> excelMultiTemplateRules = ruleBatchService.getMultiTemplateRule(rules, localeStr);
        for (ExcelMultiTemplateRuleByProject excelMultiTemplateRule : excelMultiTemplateRules) {
            ExcelMultiTemplateRuleByProject excelMultiTemplateRuleByProject = new ExcelMultiTemplateRuleByProject();
            BeanUtils.copyProperties(excelMultiTemplateRule, excelMultiTemplateRuleByProject);
            excelMultiTemplateRuleByProject.setProjectName(project.getName());
            LOGGER.info("Collect excel line of custom rule: {}", excelMultiTemplateRuleByProject);
            excelMultiTemplateRuleByProjects.add(excelMultiTemplateRuleByProject);
        }
    }
    return excelMultiTemplateRuleByProjects;
}
Also used : ExcelMultiTemplateRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelMultiTemplateRuleByProject) ExcelCustomRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelCustomRuleByProject) ExcelTemplateRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelTemplateRuleByProject) Project(com.webank.wedatasphere.qualitis.project.entity.Project) ExcelMultiTemplateRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelMultiTemplateRuleByProject) Rule(com.webank.wedatasphere.qualitis.rule.entity.Rule)

Example 5 with ExcelMultiTemplateRuleByProject

use of com.webank.wedatasphere.qualitis.project.excel.ExcelMultiTemplateRuleByProject in project Qualitis by WeBankFinTech.

the class RuleBatchServiceImpl method getMultiTemplateRule.

@Override
public List<ExcelMultiTemplateRuleByProject> getMultiTemplateRule(Iterable<Rule> rules, String localeStr) {
    List<ExcelMultiTemplateRuleByProject> lines = new ArrayList<>();
    for (Rule rule : rules) {
        if (!rule.getRuleType().equals(RuleTypeEnum.MULTI_TEMPLATE_RULE.getCode())) {
            continue;
        }
        ExcelMultiTemplateRuleByProject ruleLinePrefix = new ExcelMultiTemplateRuleByProject();
        // Rule basic info.
        String clusterName = rule.getRuleDataSources().iterator().next().getClusterName();
        basicInfoToExcel(ruleLinePrefix, rule, clusterName);
        List<RuleVariable> filterRuleVariable = rule.getRuleVariables().stream().filter(ruleVariable -> ruleVariable.getTemplateMidTableInputMeta().getInputType().equals(TemplateInputTypeEnum.CONDITION.getCode())).collect(Collectors.toList());
        if (filterRuleVariable != null && filterRuleVariable.size() != 0) {
            ruleLinePrefix.setWhereFilter(filterRuleVariable.iterator().next().getValue());
        }
        Boolean sourceAddedFlag = false;
        Boolean targetAddedFlag = false;
        lines.add(ruleLinePrefix);
        ExcelMultiTemplateRuleByProject datasourceExcelRule = new ExcelMultiTemplateRuleByProject(rule.getName());
        for (RuleDataSource ruleDataSource : rule.getRuleDataSources()) {
            String databaseName = ruleDataSource.getDbName();
            String tableName = ruleDataSource.getTableName();
            String filter = ruleDataSource.getFilter();
            Integer datasourceIndex = ruleDataSource.getDatasourceIndex();
            if (datasourceIndex == 0) {
                datasourceExcelRule.setLeftDbName(databaseName);
                datasourceExcelRule.setLeftTableName(tableName);
                datasourceExcelRule.setLeftFilter(filter);
                datasourceExcelRule.setLeftProxyUser(ruleDataSource.getProxyUser());
                if (ruleDataSource.getLinkisDataSourceId() != null) {
                    datasourceExcelRule.setLeftLinkisDataSourceType(TemplateDataSourceTypeEnum.getMessage(ruleDataSource.getDatasourceType()));
                    datasourceExcelRule.setLeftLinkisDataSourceId(String.valueOf(ruleDataSource.getLinkisDataSourceId()));
                    datasourceExcelRule.setLeftLinkisDataSourceName(ruleDataSource.getLinkisDataSourceName());
                }
                sourceAddedFlag = true;
            } else {
                datasourceExcelRule.setRightDbName(databaseName);
                datasourceExcelRule.setRightTableName(tableName);
                datasourceExcelRule.setRightFilter(filter);
                datasourceExcelRule.setRightProxyUser(ruleDataSource.getProxyUser());
                if (ruleDataSource.getLinkisDataSourceId() != null) {
                    datasourceExcelRule.setRightLlinkisDataSourceType(TemplateDataSourceTypeEnum.getMessage(ruleDataSource.getDatasourceType()));
                    datasourceExcelRule.setRightLinkisDataSourceId(String.valueOf(ruleDataSource.getLinkisDataSourceId()));
                    datasourceExcelRule.setRightLlinkisDataSourceName(ruleDataSource.getLinkisDataSourceName());
                }
                targetAddedFlag = true;
            }
            if (sourceAddedFlag && targetAddedFlag) {
                LOGGER.info("Collect excel line: {}", datasourceExcelRule);
                lines.add(datasourceExcelRule);
            }
        }
        // Get mapping and alarm info to excel.
        getMappingInfoAndAlarm(rule.getRuleDataSourceMappings(), rule.getAlarmConfigs(), lines, ruleLinePrefix, localeStr);
    }
    return lines;
}
Also used : StringUtils(org.apache.commons.lang.StringUtils) ClusterInfoNotConfigException(com.webank.wedatasphere.qualitis.exception.ClusterInfoNotConfigException) FormDataContentDisposition(org.glassfish.jersey.media.multipart.FormDataContentDisposition) Autowired(org.springframework.beans.factory.annotation.Autowired) ExcelRuleListener(com.webank.wedatasphere.qualitis.rule.excel.ExcelRuleListener) GeneralResponse(com.webank.wedatasphere.qualitis.response.GeneralResponse) AlarmConfig(com.webank.wedatasphere.qualitis.rule.entity.AlarmConfig) RuleMetricDao(com.webank.wedatasphere.qualitis.dao.RuleMetricDao) HttpUtils(com.webank.wedatasphere.qualitis.util.HttpUtils) Map(java.util.Map) LocaleParser(com.webank.wedatasphere.qualitis.parser.LocaleParser) MultiDataSourceConfigRequest(com.webank.wedatasphere.qualitis.rule.request.multi.MultiDataSourceConfigRequest) ModifyCustomRuleRequest(com.webank.wedatasphere.qualitis.rule.request.ModifyCustomRuleRequest) FileOutputUnitEnum(com.webank.wedatasphere.qualitis.rule.constant.FileOutputUnitEnum) TemplateMidTableInputMeta(com.webank.wedatasphere.qualitis.rule.entity.TemplateMidTableInputMeta) AddMultiSourceRuleRequest(com.webank.wedatasphere.qualitis.rule.request.multi.AddMultiSourceRuleRequest) ExcelCustomRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelCustomRuleByProject) ExcelReader(com.alibaba.excel.ExcelReader) ProjectUserPermissionEnum(com.webank.wedatasphere.qualitis.project.constant.ProjectUserPermissionEnum) Set(java.util.Set) DataSourceRequest(com.webank.wedatasphere.qualitis.rule.request.DataSourceRequest) FileAlarmConfigRequest(com.webank.wedatasphere.qualitis.rule.request.FileAlarmConfigRequest) TemplateArgumentRequest(com.webank.wedatasphere.qualitis.rule.request.TemplateArgumentRequest) Project(com.webank.wedatasphere.qualitis.project.entity.Project) FastDateFormat(org.apache.commons.lang.time.FastDateFormat) Rule(com.webank.wedatasphere.qualitis.rule.entity.Rule) TemplateMidTableInputMetaDao(com.webank.wedatasphere.qualitis.rule.dao.TemplateMidTableInputMetaDao) ProjectDao(com.webank.wedatasphere.qualitis.project.dao.ProjectDao) ArrayList(java.util.ArrayList) ExcelWriter(com.alibaba.excel.ExcelWriter) HttpServletRequest(javax.servlet.http.HttpServletRequest) CheckTemplateEnum(com.webank.wedatasphere.qualitis.rule.constant.CheckTemplateEnum) Service(org.springframework.stereotype.Service) RuleBatchService(com.webank.wedatasphere.qualitis.rule.service.RuleBatchService) DataSourceColumnRequest(com.webank.wedatasphere.qualitis.rule.request.DataSourceColumnRequest) CustomAlarmConfigRequest(com.webank.wedatasphere.qualitis.rule.request.CustomAlarmConfigRequest) IOException(java.io.IOException) FileRuleService(com.webank.wedatasphere.qualitis.rule.service.FileRuleService) TemplateInputTypeEnum(com.webank.wedatasphere.qualitis.rule.constant.TemplateInputTypeEnum) MultiSourceRuleService(com.webank.wedatasphere.qualitis.rule.service.MultiSourceRuleService) TemplateDataSourceTypeEnum(com.webank.wedatasphere.qualitis.rule.constant.TemplateDataSourceTypeEnum) UserDao(com.webank.wedatasphere.qualitis.dao.UserDao) ModifyFileRuleRequest(com.webank.wedatasphere.qualitis.rule.request.ModifyFileRuleRequest) WriteExcelException(com.webank.wedatasphere.qualitis.rule.exception.WriteExcelException) Date(java.util.Date) LoggerFactory(org.slf4j.LoggerFactory) TaskNotExistException(com.webank.wedatasphere.qualitis.exception.TaskNotExistException) TemplateMidTableUtil(com.webank.wedatasphere.qualitis.rule.util.TemplateMidTableUtil) SemanticException(org.apache.hadoop.hive.ql.parse.SemanticException) PermissionDeniedRequestException(com.webank.wedatasphere.qualitis.exception.PermissionDeniedRequestException) RuleDataSource(com.webank.wedatasphere.qualitis.rule.entity.RuleDataSource) ParseException(org.apache.hadoop.hive.ql.parse.ParseException) RuleGroupDao(com.webank.wedatasphere.qualitis.rule.dao.RuleGroupDao) AddProjectRequest(com.webank.wedatasphere.qualitis.project.request.AddProjectRequest) ProjectService(com.webank.wedatasphere.qualitis.project.service.ProjectService) AddCustomRuleRequest(com.webank.wedatasphere.qualitis.rule.request.AddCustomRuleRequest) AlarmConfigRequest(com.webank.wedatasphere.qualitis.rule.request.AlarmConfigRequest) ProjectEventService(com.webank.wedatasphere.qualitis.project.service.ProjectEventService) ExcelMultiTemplateRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelMultiTemplateRuleByProject) TemplateOutputMetaDao(com.webank.wedatasphere.qualitis.rule.dao.TemplateOutputMetaDao) MappingOperationEnum(com.webank.wedatasphere.qualitis.rule.constant.MappingOperationEnum) Context(javax.ws.rs.core.Context) InputActionStepEnum(com.webank.wedatasphere.qualitis.rule.constant.InputActionStepEnum) CustomRuleService(com.webank.wedatasphere.qualitis.rule.service.CustomRuleService) Collectors(java.util.stream.Collectors) RuleDataSourceMapping(com.webank.wedatasphere.qualitis.rule.entity.RuleDataSourceMapping) MetaDataAcquireFailedException(com.webank.wedatasphere.qualitis.metadata.exception.MetaDataAcquireFailedException) ExcelTypeEnum(com.alibaba.excel.support.ExcelTypeEnum) RuleService(com.webank.wedatasphere.qualitis.rule.service.RuleService) List(java.util.List) Sheet(com.alibaba.excel.metadata.Sheet) UnExpectedRequestException(com.webank.wedatasphere.qualitis.exception.UnExpectedRequestException) ExcelTemplateRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelTemplateRuleByProject) BeanUtils(org.springframework.beans.BeanUtils) RuleGroup(com.webank.wedatasphere.qualitis.rule.entity.RuleGroup) SpecCharEnum(com.webank.wedatasphere.qualitis.constant.SpecCharEnum) RuleVariable(com.webank.wedatasphere.qualitis.rule.entity.RuleVariable) DownloadRuleRequest(com.webank.wedatasphere.qualitis.rule.request.DownloadRuleRequest) HashMap(java.util.HashMap) AddFileRuleRequest(com.webank.wedatasphere.qualitis.rule.request.AddFileRuleRequest) User(com.webank.wedatasphere.qualitis.entity.User) CollectionUtils(org.apache.commons.collections.CollectionUtils) Propagation(org.springframework.transaction.annotation.Propagation) RuleTemplateDao(com.webank.wedatasphere.qualitis.rule.dao.RuleTemplateDao) TemplateOutputMeta(com.webank.wedatasphere.qualitis.rule.entity.TemplateOutputMeta) CompareTypeEnum(com.webank.wedatasphere.qualitis.rule.constant.CompareTypeEnum) MultiDataSourceJoinColumnRequest(com.webank.wedatasphere.qualitis.rule.request.multi.MultiDataSourceJoinColumnRequest) AddRuleRequest(com.webank.wedatasphere.qualitis.rule.request.AddRuleRequest) OutputStream(java.io.OutputStream) Logger(org.slf4j.Logger) ExcelTemplateFileRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelTemplateFileRuleByProject) Iterator(java.util.Iterator) RuleMetric(com.webank.wedatasphere.qualitis.entity.RuleMetric) Template(com.webank.wedatasphere.qualitis.rule.entity.Template) HttpServletResponse(javax.servlet.http.HttpServletResponse) FunctionTypeEnum(com.webank.wedatasphere.qualitis.rule.constant.FunctionTypeEnum) ModifyMultiSourceRequest(com.webank.wedatasphere.qualitis.rule.request.multi.ModifyMultiSourceRequest) FileOutputNameEnum(com.webank.wedatasphere.qualitis.rule.constant.FileOutputNameEnum) RuleTypeEnum(com.webank.wedatasphere.qualitis.rule.constant.RuleTypeEnum) URLEncoder(java.net.URLEncoder) ExcelSheetName(com.webank.wedatasphere.qualitis.project.constant.ExcelSheetName) RuleDao(com.webank.wedatasphere.qualitis.rule.dao.RuleDao) MultiDataSourceJoinConfigRequest(com.webank.wedatasphere.qualitis.rule.request.multi.MultiDataSourceJoinConfigRequest) ModifyRuleRequest(com.webank.wedatasphere.qualitis.rule.request.ModifyRuleRequest) StringEscapeUtils(org.apache.commons.lang.StringEscapeUtils) InputStream(java.io.InputStream) Transactional(org.springframework.transaction.annotation.Transactional) ExcelMultiTemplateRuleByProject(com.webank.wedatasphere.qualitis.project.excel.ExcelMultiTemplateRuleByProject) RuleDataSource(com.webank.wedatasphere.qualitis.rule.entity.RuleDataSource) ArrayList(java.util.ArrayList) Rule(com.webank.wedatasphere.qualitis.rule.entity.Rule) RuleVariable(com.webank.wedatasphere.qualitis.rule.entity.RuleVariable)

Aggregations

ExcelMultiTemplateRuleByProject (com.webank.wedatasphere.qualitis.project.excel.ExcelMultiTemplateRuleByProject)8 ExcelCustomRuleByProject (com.webank.wedatasphere.qualitis.project.excel.ExcelCustomRuleByProject)6 ExcelTemplateRuleByProject (com.webank.wedatasphere.qualitis.project.excel.ExcelTemplateRuleByProject)6 RuleMetric (com.webank.wedatasphere.qualitis.entity.RuleMetric)3 UnExpectedRequestException (com.webank.wedatasphere.qualitis.exception.UnExpectedRequestException)3 Project (com.webank.wedatasphere.qualitis.project.entity.Project)3 ExcelTemplateFileRuleByProject (com.webank.wedatasphere.qualitis.project.excel.ExcelTemplateFileRuleByProject)3 OutputStream (java.io.OutputStream)3 ArrayList (java.util.ArrayList)3 User (com.webank.wedatasphere.qualitis.entity.User)2 PermissionDeniedRequestException (com.webank.wedatasphere.qualitis.exception.PermissionDeniedRequestException)2 AddProjectRequest (com.webank.wedatasphere.qualitis.project.request.AddProjectRequest)2 AlarmConfig (com.webank.wedatasphere.qualitis.rule.entity.AlarmConfig)2 Rule (com.webank.wedatasphere.qualitis.rule.entity.Rule)2 RuleDataSourceMapping (com.webank.wedatasphere.qualitis.rule.entity.RuleDataSourceMapping)2 RuleGroup (com.webank.wedatasphere.qualitis.rule.entity.RuleGroup)2 Template (com.webank.wedatasphere.qualitis.rule.entity.Template)2 AlarmConfigRequest (com.webank.wedatasphere.qualitis.rule.request.AlarmConfigRequest)2 CustomAlarmConfigRequest (com.webank.wedatasphere.qualitis.rule.request.CustomAlarmConfigRequest)2 FileAlarmConfigRequest (com.webank.wedatasphere.qualitis.rule.request.FileAlarmConfigRequest)2