Close #449 Rename NewSetting class to Settings :)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package fr.xephi.authme.datasource;
|
||||
|
||||
import fr.xephi.authme.settings.NewSetting;
|
||||
import fr.xephi.authme.settings.Settings;
|
||||
import fr.xephi.authme.settings.properties.DatabaseSettings;
|
||||
|
||||
/**
|
||||
@@ -23,7 +23,7 @@ public final class Columns {
|
||||
public final String ID;
|
||||
public final String IS_LOGGED;
|
||||
|
||||
public Columns(NewSetting settings) {
|
||||
public Columns(Settings settings) {
|
||||
NAME = settings.getProperty(DatabaseSettings.MYSQL_COL_NAME);
|
||||
REAL_NAME = settings.getProperty(DatabaseSettings.MYSQL_COL_REALNAME);
|
||||
PASSWORD = settings.getProperty(DatabaseSettings.MYSQL_COL_PASSWORD);
|
||||
|
||||
@@ -8,7 +8,7 @@ import fr.xephi.authme.cache.auth.PlayerAuth;
|
||||
import fr.xephi.authme.security.HashAlgorithm;
|
||||
import fr.xephi.authme.security.crypts.HashedPassword;
|
||||
import fr.xephi.authme.security.crypts.XFBCRYPT;
|
||||
import fr.xephi.authme.settings.NewSetting;
|
||||
import fr.xephi.authme.settings.Settings;
|
||||
import fr.xephi.authme.settings.properties.DatabaseSettings;
|
||||
import fr.xephi.authme.settings.properties.HooksSettings;
|
||||
import fr.xephi.authme.settings.properties.SecuritySettings;
|
||||
@@ -45,7 +45,7 @@ public class MySQL implements DataSource {
|
||||
private int phpBbGroup;
|
||||
private String wordpressPrefix;
|
||||
|
||||
public MySQL(NewSetting settings) throws ClassNotFoundException, SQLException, PoolInitializationException {
|
||||
public MySQL(Settings settings) throws ClassNotFoundException, SQLException, PoolInitializationException {
|
||||
setParameters(settings);
|
||||
|
||||
// Set the connection arguments (and check if connection is ok)
|
||||
@@ -76,12 +76,12 @@ public class MySQL implements DataSource {
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
MySQL(NewSetting settings, HikariDataSource hikariDataSource) {
|
||||
MySQL(Settings settings, HikariDataSource hikariDataSource) {
|
||||
ds = hikariDataSource;
|
||||
setParameters(settings);
|
||||
}
|
||||
|
||||
private void setParameters(NewSetting settings) {
|
||||
private void setParameters(Settings settings) {
|
||||
this.host = settings.getProperty(DatabaseSettings.MYSQL_HOST);
|
||||
this.port = settings.getProperty(DatabaseSettings.MYSQL_PORT);
|
||||
this.username = settings.getProperty(DatabaseSettings.MYSQL_USERNAME);
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.google.common.annotations.VisibleForTesting;
|
||||
import fr.xephi.authme.ConsoleLogger;
|
||||
import fr.xephi.authme.cache.auth.PlayerAuth;
|
||||
import fr.xephi.authme.security.crypts.HashedPassword;
|
||||
import fr.xephi.authme.settings.NewSetting;
|
||||
import fr.xephi.authme.settings.Settings;
|
||||
import fr.xephi.authme.settings.properties.DatabaseSettings;
|
||||
import fr.xephi.authme.util.StringUtils;
|
||||
|
||||
@@ -38,7 +38,7 @@ public class SQLite implements DataSource {
|
||||
* @throws ClassNotFoundException if no driver could be found for the datasource
|
||||
* @throws SQLException when initialization of a SQL datasource failed
|
||||
*/
|
||||
public SQLite(NewSetting settings) throws ClassNotFoundException, SQLException {
|
||||
public SQLite(Settings settings) throws ClassNotFoundException, SQLException {
|
||||
this.database = settings.getProperty(DatabaseSettings.MYSQL_DATABASE);
|
||||
this.tableName = settings.getProperty(DatabaseSettings.MYSQL_TABLE);
|
||||
this.col = new Columns(settings);
|
||||
@@ -53,7 +53,7 @@ public class SQLite implements DataSource {
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
SQLite(NewSetting settings, Connection connection) {
|
||||
SQLite(Settings settings, Connection connection) {
|
||||
this.database = settings.getProperty(DatabaseSettings.MYSQL_DATABASE);
|
||||
this.tableName = settings.getProperty(DatabaseSettings.MYSQL_TABLE);
|
||||
this.col = new Columns(settings);
|
||||
|
||||
Reference in New Issue
Block a user