Add support for MongoDB and H2 database formats

This commit is contained in:
Luck
2016-08-19 18:21:16 +01:00
Unverified
parent 31cef46b56
commit a15a0752f4
26 changed files with 877 additions and 137 deletions
@@ -22,6 +22,7 @@
package me.lucko.luckperms.api;
import me.lucko.luckperms.api.data.DatastoreConfiguration;
import me.lucko.luckperms.api.data.MySQLConfiguration;
/**
@@ -76,9 +77,17 @@ public interface LPConfiguration {
/**
* @return the database values set in the configuration
* @deprecated use {@link #getDatastoreConfig()}
*/
@SuppressWarnings("deprecation")
@Deprecated
MySQLConfiguration getDatabaseValues();
/**
* @return the values set for data storage in the configuration
*/
DatastoreConfiguration getDatastoreConfig();
/**
* @return the storage method string from the configuration
*/
@@ -0,0 +1,33 @@
/*
* Copyright (c) 2016 Lucko (Luck) <luck@lucko.me>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package me.lucko.luckperms.api.data;
@SuppressWarnings("deprecation")
public interface DatastoreConfiguration extends MySQLConfiguration {
String getAddress();
String getDatabase();
String getUsername();
String getPassword();
}
@@ -22,6 +22,10 @@
package me.lucko.luckperms.api.data;
/**
* @deprecated Use {@link DatastoreConfiguration}. This is now used by multiple datastores, not just MySQL.
*/
@Deprecated
public interface MySQLConfiguration {
String getAddress();