// Path: src/main/java/com/github/kislayverma/rulette/rest/config/RuleSystemConfigList.java
// @ConfigurationProperties(prefix = "rulesystems")
// public class RuleSystemConfigList {
//     private List<DataProviderConfigDto> dataproviders;
// 
//     public List<DataProviderConfigDto> getDataproviders() {
//         return dataproviders;
//     }
// 
//     public void setDataproviders(List<DataProviderConfigDto> dataproviders) {
//         this.dataproviders = dataproviders;
//     }
// 
//     @Override
//     public String toString() {
//         return "RuleSystemConfigList{" +
//             "dataproviders=" + dataproviders +
//             '}';
//     }
// }
// 
// Path: src/main/java/com/github/kislayverma/rulette/rest/exception/BadClientException.java
// @ResponseStatus(value=HttpStatus.BAD_REQUEST, reason="Invalid request")
// public class BadClientException extends RuntimeException {
// 
//     public BadClientException(String msg) {
//         super(msg);
//     }
// 
//     public BadClientException(Throwable e) {
//         super(e);
//     }
// 
//     public BadClientException(String msg, Throwable e) {
//         super(msg, e);
//     }
// }
// 
// Path: src/main/java/com/github/kislayverma/rulette/rest/exception/BadServerException.java
// @ResponseStatus(value= HttpStatus.INTERNAL_SERVER_ERROR, reason="Internal Server Error")
// public class BadServerException extends RuntimeException {
// 
//     public BadServerException(String msg) {
//         super(msg);
//     }
// 
//     public BadServerException(Throwable e) {
//         super(e);
//     }
// 
//     public BadServerException(String msg, Throwable e) {
//         super(msg, e);
//     }
// }
// 
// Path: src/main/java/com/github/kislayverma/rulette/rest/exception/ProviderNotFoundException.java
// @ResponseStatus(value= HttpStatus.NOT_FOUND, reason="No data provider for the given input")
// public class ProviderNotFoundException extends RuntimeException {
// 
//     public ProviderNotFoundException(String msg) {
//         super(msg);
//     }
// 
//     public ProviderNotFoundException(Throwable e) {
//         super(e);
//     }
// 
//     public ProviderNotFoundException(String msg, Throwable e) {
//         super(msg, e);
//     }
// }


import com.github.kislayverma.rulette.core.data.IDataProvider;
import com.github.kislayverma.rulette.mysql.MysqlDataProvider;
import com.github.kislayverma.rulette.rest.config.RuleSystemConfigList;
import com.github.kislayverma.rulette.rest.exception.BadClientException;
import com.github.kislayverma.rulette.rest.exception.BadServerException;
import com.github.kislayverma.rulette.rest.exception.ProviderNotFoundException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.io.IOException;
import java.sql.SQLException;
import java.util.*;
package com.github.kislayverma.rulette.rest.api.provider;



@Component
public class DataProviderFactory {

// Path: src/main/java/com/github/kislayverma/rulette/rest/config/RuleSystemConfigList.java
// @ConfigurationProperties(prefix = "rulesystems")
// public class RuleSystemConfigList {
//     private List<DataProviderConfigDto> dataproviders;
// 
//     public List<DataProviderConfigDto> getDataproviders() {
//         return dataproviders;
//     }
// 
//     public void setDataproviders(List<DataProviderConfigDto> dataproviders) {
//         this.dataproviders = dataproviders;
//     }
// 
//     @Override
//     public String toString() {
//         return "RuleSystemConfigList{" +
//             "dataproviders=" + dataproviders +
//             '}';
//     }
// }
// 
// Path: src/main/java/com/github/kislayverma/rulette/rest/exception/BadClientException.java
// @ResponseStatus(value=HttpStatus.BAD_REQUEST, reason="Invalid request")
// public class BadClientException extends RuntimeException {
// 
//     public BadClientException(String msg) {
//         super(msg);
//     }
// 
//     public BadClientException(Throwable e) {
//         super(e);
//     }
// 
//     public BadClientException(String msg, Throwable e) {
//         super(msg, e);
//     }
// }
// 
// Path: src/main/java/com/github/kislayverma/rulette/rest/exception/BadServerException.java
// @ResponseStatus(value= HttpStatus.INTERNAL_SERVER_ERROR, reason="Internal Server Error")
// public class BadServerException extends RuntimeException {
// 
//     public BadServerException(String msg) {
//         super(msg);
//     }
// 
//     public BadServerException(Throwable e) {
//         super(e);
//     }
// 
//     public BadServerException(String msg, Throwable e) {
//         super(msg, e);
//     }
// }
// 
// Path: src/main/java/com/github/kislayverma/rulette/rest/exception/ProviderNotFoundException.java
// @ResponseStatus(value= HttpStatus.NOT_FOUND, reason="No data provider for the given input")
// public class ProviderNotFoundException extends RuntimeException {
// 
//     public ProviderNotFoundException(String msg) {
//         super(msg);
//     }
// 
//     public ProviderNotFoundException(Throwable e) {
//         super(e);
//     }
// 
//     public ProviderNotFoundException(String msg, Throwable e) {
//         super(msg, e);
//     }
// }


// Path: src/main/java/com/github/kislayverma/rulette/rest/api/provider/DataProviderFactory.java
import com.github.kislayverma.rulette.core.data.IDataProvider;
import com.github.kislayverma.rulette.mysql.MysqlDataProvider;
import com.github.kislayverma.rulette.rest.config.RuleSystemConfigList;
import com.github.kislayverma.rulette.rest.exception.BadClientException;
import com.github.kislayverma.rulette.rest.exception.BadServerException;
import com.github.kislayverma.rulette.rest.exception.ProviderNotFoundException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.io.IOException;
import java.sql.SQLException;
import java.util.*;

package com.github.kislayverma.rulette.rest.api.provider;



@Component
public class DataProviderFactory {

    private  static final Logger LOGGER = LoggerFactory.getLogger(DataProviderFactory.class);