Planned Changes (More Deprecation)

This commit is contained in:
Rsl1122 2017-08-20 13:27:03 +03:00
parent 8b550a2349
commit 7161781378
25 changed files with 52 additions and 20 deletions

View File

@ -105,6 +105,7 @@ public class API {
* @param processor Object implementing DBCallableProcessor, which
* process (UserData data) method will be called.
*/
@Deprecated
public void scheduleForGet(UUID uuid, DBCallableProcessor processor) {
plugin.getHandler().getUserDataForProcessing(processor, uuid, false);
}
@ -117,6 +118,7 @@ public class API {
*
* @param info object that extends HandlingInfo.
*/
@Deprecated
public void scheduleEventHandlingInfo(HandlingInfo info) {
plugin.getHandler().addToPool(info);
}
@ -129,6 +131,7 @@ public class API {
* @param data UserData object. Will be placed to the data.getUuid() key in
* the cache.
*/
@Deprecated
public void placeDataToCache(UserData data) {
plugin.getHandler().cache(data);
}
@ -138,6 +141,7 @@ public class API {
* <p>
* Should be only called from an Asynchronous thread.
*/
@Deprecated
public void saveCachedData() {
plugin.getHandler().saveCachedUserData();
}
@ -148,6 +152,7 @@ public class API {
* @param uuid UUID of the player.
* @return true/false
*/
@Deprecated
public boolean isPlayersDataInspectCached(UUID uuid) {
return plugin.getInspectCache().isCached(uuid);
}
@ -160,6 +165,7 @@ public class API {
*
* @param uuid UUID of the player.
*/
@Deprecated
public void cacheUserDataToInspectCache(UUID uuid) {
plugin.getInspectCache().cache(uuid);
}

View File

@ -23,6 +23,7 @@ import main.java.com.djrapitops.plan.utilities.MiscUtils;
* @author Rsl1122
* @since 3.0.0
*/
@Deprecated
public class QuickAnalyzeCommand extends SubCommand {
private final Plan plugin;

View File

@ -27,6 +27,7 @@ import java.util.UUID;
* @author Rsl1122
* @since 3.0.0
*/
@Deprecated
public class QuickInspectCommand extends SubCommand {
private final Plan plugin;

View File

@ -1,5 +1,7 @@
package main.java.com.djrapitops.plan.data;
import main.java.com.djrapitops.plan.data.time.WorldTimes;
/**
* This class is used for storing start and end of a play session inside UserData
* object.
@ -8,6 +10,7 @@ package main.java.com.djrapitops.plan.data;
*/
public class SessionData {
private WorldTimes worldTimes; // TODO add World Times to SessionData
private final long sessionStart;
private long sessionEnd;

View File

@ -11,6 +11,7 @@ import org.bukkit.configuration.file.FileConfiguration;
* @author Rsl1122
* @since 3.5.0
*/
// TODO Move the auto generation to the correct location (Customization.Plugins -> Plugins)
public class PluginConfigSectionHandler {
private final Plan plan;

View File

@ -25,6 +25,7 @@ import java.util.UUID;
* @author Rsl1122
* @since 2.0.0
*/
@Deprecated
public class AnalysisCacheHandler {
private final Plan plugin;

View File

@ -12,6 +12,7 @@ import main.java.com.djrapitops.plan.data.UserData;
* @author Rsl1122
* @since 2.6.0
*/
@Deprecated
public interface DBCallableProcessor {
/**

View File

@ -20,6 +20,7 @@ import java.util.*;
* @author Rsl1122
* @since 2.0.0
*/
@Deprecated
public class InspectCacheHandler {
private final DataCacheHandler handler;

View File

@ -16,13 +16,13 @@ import java.util.UUID;
*/
public class SessionCache {
private final HashMap<UUID, SessionData> activeSessions;
private static final Map<UUID, SessionData> activeSessions = new HashMap<>();
/**
* Class Constructor.
*/
public SessionCache() {
this.activeSessions = new HashMap<>();
}
/**

View File

@ -20,6 +20,7 @@ import java.util.stream.Collectors;
* @author Rsl1122
* @since 3.0.0
*/
@Deprecated
public class DataCacheClearQueue extends Queue<UUID> {
/**
@ -58,7 +59,7 @@ public class DataCacheClearQueue extends Queue<UUID> {
}
}
}
@Deprecated
class ClearConsumer extends Consumer<UUID> implements Runnable {
private DataCacheHandler handler;
@ -93,7 +94,7 @@ class ClearConsumer extends Consumer<UUID> implements Runnable {
}
}
}
@Deprecated
class ClearSetup extends Setup<UUID> {
ClearSetup(BlockingQueue<UUID> q, DataCacheHandler handler) {

View File

@ -19,6 +19,7 @@ import java.util.concurrent.BlockingQueue;
* @author Rsl1122
* @since 3.0.0
*/
@Deprecated
public class DataCacheGetQueue extends Queue<Map<UUID, List<DBCallableProcessor>>> {
/**
@ -56,7 +57,7 @@ public class DataCacheGetQueue extends Queue<Map<UUID, List<DBCallableProcessor>
.anyMatch(list -> list.size() >= 2);
}
}
@Deprecated
class GetConsumer extends Consumer<Map<UUID, List<DBCallableProcessor>>> {
private Database db;
@ -94,7 +95,7 @@ class GetConsumer extends Consumer<Map<UUID, List<DBCallableProcessor>>> {
}
}
}
@Deprecated
class GetSetup extends Setup<Map<UUID, List<DBCallableProcessor>>> {
GetSetup(BlockingQueue<Map<UUID, List<DBCallableProcessor>>> q, Database db) {

View File

@ -17,6 +17,9 @@ import java.util.concurrent.BlockingQueue;
* @author Rsl1122
* @since 3.0.0
*/
// TODO Change Processing Queue to use more generic object as processing.
// GOAL: Processing queue can be used to process query results from the database
// & for processing events into statements.
public class DataCacheProcessQueue extends Queue<HandlingInfo> {
/**

View File

@ -21,6 +21,7 @@ import java.util.concurrent.BlockingQueue;
* @author Rsl1122
* @since 3.0.0
*/
@Deprecated
public class DataCacheSaveQueue extends Queue<UserData> {
/**
@ -68,7 +69,7 @@ public class DataCacheSaveQueue extends Queue<UserData> {
return uuid != null && queue.stream().anyMatch(d -> d.getUuid().equals(uuid));
}
}
@Deprecated
class SaveConsumer extends Consumer<UserData> {
private Database db;
@ -115,7 +116,7 @@ class SaveConsumer extends Consumer<UserData> {
}
}
}
@Deprecated
class SaveSetup extends Setup<UserData> {
SaveSetup(BlockingQueue<UserData> q, DataCacheHandler handler, Database db) {

View File

@ -14,6 +14,7 @@ import static org.bukkit.Bukkit.getPluginManager;
* @author Rsl1122
* @since 3.2.0
*/
@Deprecated
public class ImportUtils {
/**

View File

@ -25,6 +25,7 @@ import java.util.stream.IntStream;
* @author Rsl1122
* @since 3.2.0
*/
@Deprecated
public abstract class Importer {
private String info;

View File

@ -10,6 +10,7 @@ import java.util.UUID;
* @author Rsl1122
* @since 3.5.0
*/
@Deprecated
public class OfflinePlayerImporter extends Importer {
public OfflinePlayerImporter() {

View File

@ -5,6 +5,7 @@ import main.java.com.djrapitops.plan.data.handling.PlaytimeHandling;
import java.util.UUID;
@Deprecated //Sessions will take care of the stuff in the future.
public class PlaytimeDependentInfo extends HandlingInfo {
private final String gamemode;

View File

@ -8,6 +8,7 @@ import java.util.Map;
* @author Rsl1122
* @since 3.6.0
*/
// TODO Change WorldTimes to use GMTimes per world.
public class WorldTimes extends TimeKeeper {
public WorldTimes(Map<String, Long> times, String lastState, long lastStateChange) {

View File

@ -2,6 +2,7 @@ package main.java.com.djrapitops.plan.database.sql;
import main.java.com.djrapitops.plan.Log;
@Deprecated
public class Select extends SqlParser {
private int conditions = 0;

View File

@ -36,9 +36,9 @@ public class UsersTable extends Table {
@Deprecated private final String columnDeaths;
@Deprecated private final String columnMobKills;
private final String columnRegistered;
private final String columnName;
//TODO Server Specific Table (Also has registered on it)
@Deprecated private final String columnOP;
@Deprecated private final String columnName;
@Deprecated private final String columnBanned;
//
@Deprecated private final String columnContainsBukkitData;

View File

@ -13,6 +13,7 @@ import java.util.UUID;
/**
* @author Rsl1122
*/
@Deprecated //TODO Make an utility class for parsing files to give to the page cache.
public class DataRequestHandler {
private final InspectCacheHandler inspectCache;

View File

@ -7,6 +7,7 @@ import java.io.Serializable;
/**
* @author Rsl1122
*/
// TODO Start using StrSubstitute with REPLACE variables
public enum Html {
COLOR_0("<span class=\"black\">"),
@ -27,7 +28,7 @@ public enum Html {
COLOR_F("<span class=\"white\">"),
//
FONT_AWESOME_ICON("<i class=\"fa fa-REPLACE0\" aria-hidden=\"true\"></i>"),
MINOTAR_SMALL_IMG("<img style=\"float: left; padding: 2px 2px 0px 2px\" alt=\"REPLACE0\" src=\"https://minotar.net/avatar/REPLACE0/19\">"),
@Deprecated MINOTAR_SMALL_IMG("<img style=\"float: left; padding: 2px 2px 0px 2px\" alt=\"REPLACE0\" src=\"https://minotar.net/avatar/REPLACE0/19\">"),
SPAN("REPLACE0</span>"),
BUTTON("<a class=\"button\" href=\"REPLACE0\">REPLACE1</a>"),
BUTTON_CLASS("class=\"button\""),
@ -35,26 +36,26 @@ public enum Html {
LINK_EXTERNAL("<a class=\"link\" target=\"_blank\" href=\"REPLACE0\">REPLACE1</a>"),
LINK_CLASS("class=\"link\""),
IMG("<img src=\"REPLACE0\">"),
COLUMNS_DIV_WRAPPER("<div class=\"columns\">REPLACE0</div>"),
COLUMN_DIV_WRAPPER("<div class=\"about box column\">REPLACE0</div>"),
HEADER("<div class=\"headerbox\" style=\"width: 95%;\"><div class=\"header-icon\"><div class=\"header-label\"><i class=\"fa fa-cube\" aria-hidden=\"true\"></i><span class=\"header-text\"> REPLACE0</span></div></div></div>"),
PLUGIN_DATA_WRAPPER("<div class=\"plugin-data\">REPLACE0</div>"),
PLUGIN_CONTAINER_START("<div class=\"plugin-container\">"),
@Deprecated COLUMNS_DIV_WRAPPER("<div class=\"columns\">REPLACE0</div>"),
@Deprecated COLUMN_DIV_WRAPPER("<div class=\"about box column\">REPLACE0</div>"),
@Deprecated HEADER("<div class=\"headerbox\" style=\"width: 95%;\"><div class=\"header-icon\"><div class=\"header-label\"><i class=\"fa fa-cube\" aria-hidden=\"true\"></i><span class=\"header-text\"> REPLACE0</span></div></div></div>"),
@Deprecated PLUGIN_DATA_WRAPPER("<div class=\"plugin-data\">REPLACE0</div>"),
@Deprecated PLUGIN_CONTAINER_START("<div class=\"plugin-container\">"),
//
TABLE_START_2("<table class=\"sortable table\"><thead><tr><th>REPLACE0</th><th>REPLACE1</th></tr></thead><tbody>"),
TABLE_START_3("<table class=\"sortable table\"><thead><tr><th>REPLACE0</th><th>REPLACE1</th><th>REPLACE2</th></tr></thead><tbody>"),
TABLE_START_4("<table class=\"sortable table\"><thead><tr><th>REPLACE0</th><th>REPLACE1</th><th>REPLACE2</th><th>REPLACE3</th></tr></thead><tbody>"),
TABLE_SESSIONS_START(TABLE_START_3.parse("Session Started", "Session Ended", "Session Length")),
TABLE_KILLS_START(TABLE_START_3.parse("Date", "Killed", "With")),
TABLE_FACTIONS_START(TABLE_START_4.parse(FONT_AWESOME_ICON.parse("flag") + " Faction", FONT_AWESOME_ICON.parse("bolt") + " Power", FONT_AWESOME_ICON.parse("map-o") + " Land", FONT_AWESOME_ICON.parse("user") + " Leader")),
TABLE_TOWNS_START(TABLE_START_4.parse(FONT_AWESOME_ICON.parse("bank") + " Town", FONT_AWESOME_ICON.parse("users") + " Residents", FONT_AWESOME_ICON.parse("map-o") + " Land", FONT_AWESOME_ICON.parse("user") + " Mayor")),
@Deprecated TABLE_SESSIONS_START(TABLE_START_3.parse("Session Started", "Session Ended", "Session Length")),
@Deprecated TABLE_KILLS_START(TABLE_START_3.parse("Date", "Killed", "With")),
@Deprecated TABLE_FACTIONS_START(TABLE_START_4.parse(FONT_AWESOME_ICON.parse("flag") + " Faction", FONT_AWESOME_ICON.parse("bolt") + " Power", FONT_AWESOME_ICON.parse("map-o") + " Land", FONT_AWESOME_ICON.parse("user") + " Leader")),
@Deprecated TABLE_TOWNS_START(TABLE_START_4.parse(FONT_AWESOME_ICON.parse("bank") + " Town", FONT_AWESOME_ICON.parse("users") + " Residents", FONT_AWESOME_ICON.parse("map-o") + " Land", FONT_AWESOME_ICON.parse("user") + " Mayor")),
TABLELINE_2("<tr><td><b>REPLACE0</b></td><td>REPLACE1</td></tr>"),
TABLELINE_3("<tr><td><b>REPLACE0</b></td><td>REPLACE1</td><td>REPLACE2</td></tr>"),
TABLELINE_4("<tr><td><b>REPLACE0</b></td><td>REPLACE1</td><td>REPLACE2</td><td>REPLACE3</td></tr>"),
TABLELINE_PLAYERS("<tr><td>REPLACE0</td><td>REPLACE1</td><td sorttable_customkey=\"REPLACE2\">REPLACE3</td><td>REPLACE4</td><td sorttable_customkey=\"REPLACE5\">REPLACE6</td>" + "<td sorttable_customkey=\"REPLACE7\">REPLACE8</td><td>REPLACE9</td></tr>"),
TABLELINE_3_CUSTOMKEY("<tr><td sorttable_customkey=\"REPLACE0\">REPLACE1</td><td sorttable_customkey=\"REPLACE2\">REPLACE3</td><td sorttable_customkey=\"REPLACE4\">REPLACE5</td></tr>"),
TABLELINE_3_CUSTOMKEY_1("<tr><td sorttable_customkey=\"REPLACE0\">REPLACE1</td><td>REPLACE2</td><td>REPLACE3</td></tr>"),
ERROR_TABLE_2(TABLELINE_2.parse("No data", "No data")),
@Deprecated ERROR_TABLE_2(TABLELINE_2.parse("No data", "No data")),
TABLE_END("</tbody></table>"); // KILLDATA_NONE("No Kills"),
private String html;

View File

@ -7,6 +7,7 @@ import java.util.List;
/**
* @author Rsl1122
*/
@Deprecated
public class RecentPlayersButtonsCreator {
/**

View File

@ -19,6 +19,7 @@ import java.util.UUID;
/**
* @author Rsl1122
*/
@Deprecated // Too much work to create bungee support for this
public class TextUI {
/**

View File

@ -12,6 +12,7 @@ import java.util.Comparator;
/**
* @author Rsl1122
*/
@Deprecated
public class HandlingInfoTimeComparator implements Comparator<HandlingInfo> {
@Override