package com.salpa.subject.service;

import com.salpa.subject.domain.MonitorDataSource;
import com.salpa.subject.domain.MonitorOperationLog;
import com.salpa.subject.domain.MonitorProject;
import com.salpa.subject.domain.vo.MonitorDataSourceVo;
import com.salpa.subject.domain.vo.OperationLogVo;

import java.sql.Connection;
import java.util.List;
import java.util.Map;

/**
 * @author zhuff
 */
public interface ProjectService {

    List<Map<String , Object>> getList(MonitorDataSourceVo monitorDataSourceVo);

    String checkProjectNameUnique(String projectName);

    int addProject(MonitorProject monitorProject);

    MonitorProject getProjectById(Integer id);

    String checkDatabaseNameUnique(String databaseName);

    MonitorProject getById(Integer id);

    MonitorDataSource getDataSource(Integer id);

    int updateProject(MonitorProject monitorProject);

    int deleteProject(Integer id);

    int testConnection(MonitorDataSource monitorDataSource);

    List<MonitorOperationLog> getLogList(OperationLogVo operationLogVo);

    Connection create(MonitorDataSource dataSource, List<Map<String, Object>> properties);

    void addDataSource(MonitorDataSource monitorDataSource);
}
