Renamed some Service related classes

This commit is contained in:
Rsl1122 2020-02-12 18:16:30 +02:00 committed by Risto Lahtela
parent 96837dbcd0
commit 9c74c40f72
24 changed files with 104 additions and 88 deletions

View File

@ -39,7 +39,7 @@ public interface CapabilityService {
* @throws IllegalStateException If Plan is installed, but not enabled. * @throws IllegalStateException If Plan is installed, but not enabled.
*/ */
static CapabilityService getInstance() { static CapabilityService getInstance() {
return Optional.ofNullable(CapabilityServiceHolder.service) return Optional.ofNullable(Holder.service)
.orElseThrow(() -> new IllegalStateException("CapabilityService has not been initialised yet.")); .orElseThrow(() -> new IllegalStateException("CapabilityService has not been initialised yet."));
} }
@ -61,15 +61,15 @@ public interface CapabilityService {
return Capability.getByName(capabilityName).isPresent(); return Capability.getByName(capabilityName).isPresent();
} }
class CapabilityServiceHolder { class Holder {
static CapabilityService service; static CapabilityService service;
private CapabilityServiceHolder() { private Holder() {
/* Static variable holder */ /* Static variable holder */
} }
static void set(CapabilityService service) { static void set(CapabilityService service) {
CapabilityServiceHolder.service = service; Holder.service = service;
} }
} }

View File

@ -32,6 +32,11 @@ import java.util.regex.Pattern;
*/ */
public interface ResolverService { public interface ResolverService {
static ResolverService getInstance() {
return Optional.ofNullable(ResolverService.Holder.service)
.orElseThrow(() -> new IllegalStateException("ResolverService has not been initialised yet."));
}
/** /**
* Register a new resolver. * Register a new resolver.
* *
@ -68,4 +73,16 @@ public interface ResolverService {
* @return Resolver if registered or empty. * @return Resolver if registered or empty.
*/ */
Optional<Resolver> getResolver(String target); Optional<Resolver> getResolver(String target);
class Holder {
static ResolverService service;
private Holder() {
/* Static variable holder */
}
static void set(ResolverService service) {
ResolverService.Holder.service = service;
}
}
} }

View File

@ -44,7 +44,7 @@ public interface ExtensionService {
* @throws IllegalStateException If Plan is installed, but not enabled. * @throws IllegalStateException If Plan is installed, but not enabled.
*/ */
static ExtensionService getInstance() { static ExtensionService getInstance() {
return Optional.ofNullable(ExtensionServiceHolder.service) return Optional.ofNullable(Holder.service)
.orElseThrow(() -> new IllegalStateException("ExtensionService has not been initialised yet.")); .orElseThrow(() -> new IllegalStateException("ExtensionService has not been initialised yet."));
} }
@ -69,15 +69,15 @@ public interface ExtensionService {
*/ */
void unregister(DataExtension extension); void unregister(DataExtension extension);
class ExtensionServiceHolder { class Holder {
static ExtensionService service; static ExtensionService service;
private ExtensionServiceHolder() { private Holder() {
/* Static variable holder */ /* Static variable holder */
} }
static void set(ExtensionService service) { static void set(ExtensionService service) {
ExtensionServiceHolder.service = service; Holder.service = service;
} }
} }

View File

@ -40,7 +40,7 @@ public interface QueryService {
* @throws IllegalStateException If Plan is installed, but not enabled. * @throws IllegalStateException If Plan is installed, but not enabled.
*/ */
static QueryService getInstance() { static QueryService getInstance() {
return Optional.ofNullable(QueryService.QueryServiceHolder.service) return Optional.ofNullable(Holder.service)
.orElseThrow(() -> new IllegalStateException("QueryService has not been initialised yet.")); .orElseThrow(() -> new IllegalStateException("QueryService has not been initialised yet."));
} }
@ -148,15 +148,15 @@ public interface QueryService {
void apply(); void apply();
} }
class QueryServiceHolder { class Holder {
static QueryService service; static QueryService service;
private QueryServiceHolder() { private Holder() {
/* Static variable holder */ /* Static variable holder */
} }
static void set(QueryService service) { static void set(QueryService service) {
QueryService.QueryServiceHolder.service = service; Holder.service = service;
} }
} }

View File

@ -19,7 +19,7 @@ package com.djrapitops.plan.gathering.listeners;
import com.djrapitops.plan.Plan; import com.djrapitops.plan.Plan;
import com.djrapitops.plan.PlanPlugin; import com.djrapitops.plan.PlanPlugin;
import com.djrapitops.plan.api.events.PlanBukkitEnableEvent; import com.djrapitops.plan.api.events.PlanBukkitEnableEvent;
import com.djrapitops.plan.capability.CapabilityServiceImplementation; import com.djrapitops.plan.capability.CapabilitySvc;
import com.djrapitops.plan.gathering.listeners.bukkit.*; import com.djrapitops.plan.gathering.listeners.bukkit.*;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
@ -82,6 +82,6 @@ public class BukkitListenerSystem extends ListenerSystem {
boolean isEnabled = plugin.isSystemEnabled(); boolean isEnabled = plugin.isSystemEnabled();
PlanBukkitEnableEvent event = new PlanBukkitEnableEvent(isEnabled); PlanBukkitEnableEvent event = new PlanBukkitEnableEvent(isEnabled);
Bukkit.getServer().getPluginManager().callEvent(event); Bukkit.getServer().getPluginManager().callEvent(event);
CapabilityServiceImplementation.notifyAboutEnable(isEnabled); CapabilitySvc.notifyAboutEnable(isEnabled);
} }
} }

View File

@ -22,7 +22,7 @@ import com.djrapitops.plan.delivery.export.Exporter;
import com.djrapitops.plan.delivery.webserver.cache.DataID; import com.djrapitops.plan.delivery.webserver.cache.DataID;
import com.djrapitops.plan.delivery.webserver.cache.JSONCache; import com.djrapitops.plan.delivery.webserver.cache.JSONCache;
import com.djrapitops.plan.extension.CallEvents; import com.djrapitops.plan.extension.CallEvents;
import com.djrapitops.plan.extension.ExtensionServiceImplementation; import com.djrapitops.plan.extension.ExtensionSvc;
import com.djrapitops.plan.gathering.cache.NicknameCache; import com.djrapitops.plan.gathering.cache.NicknameCache;
import com.djrapitops.plan.gathering.cache.SessionCache; import com.djrapitops.plan.gathering.cache.SessionCache;
import com.djrapitops.plan.gathering.domain.Session; import com.djrapitops.plan.gathering.domain.Session;
@ -62,7 +62,7 @@ public class PlayerOnlineListener implements Listener {
private final Processing processing; private final Processing processing;
private final ServerInfo serverInfo; private final ServerInfo serverInfo;
private final DBSystem dbSystem; private final DBSystem dbSystem;
private final ExtensionServiceImplementation extensionService; private final ExtensionSvc extensionService;
private final Exporter exporter; private final Exporter exporter;
private final GeolocationCache geolocationCache; private final GeolocationCache geolocationCache;
private final NicknameCache nicknameCache; private final NicknameCache nicknameCache;
@ -76,7 +76,7 @@ public class PlayerOnlineListener implements Listener {
Processing processing, Processing processing,
ServerInfo serverInfo, ServerInfo serverInfo,
DBSystem dbSystem, DBSystem dbSystem,
ExtensionServiceImplementation extensionService, ExtensionSvc extensionService,
Exporter exporter, Exporter exporter,
GeolocationCache geolocationCache, GeolocationCache geolocationCache,
NicknameCache nicknameCache, NicknameCache nicknameCache,

View File

@ -19,7 +19,7 @@ package com.djrapitops.plan.gathering.listeners;
import com.djrapitops.plan.PlanBungee; import com.djrapitops.plan.PlanBungee;
import com.djrapitops.plan.PlanPlugin; import com.djrapitops.plan.PlanPlugin;
import com.djrapitops.plan.api.events.PlanBungeeEnableEvent; import com.djrapitops.plan.api.events.PlanBungeeEnableEvent;
import com.djrapitops.plan.capability.CapabilityServiceImplementation; import com.djrapitops.plan.capability.CapabilitySvc;
import com.djrapitops.plan.gathering.listeners.bungee.PlayerOnlineListener; import com.djrapitops.plan.gathering.listeners.bungee.PlayerOnlineListener;
import javax.inject.Inject; import javax.inject.Inject;
@ -50,6 +50,6 @@ public class BungeeListenerSystem extends ListenerSystem {
boolean isEnabled = plugin.isSystemEnabled(); boolean isEnabled = plugin.isSystemEnabled();
PlanBungeeEnableEvent event = new PlanBungeeEnableEvent(isEnabled); PlanBungeeEnableEvent event = new PlanBungeeEnableEvent(isEnabled);
((PlanBungee) plugin).getProxy().getPluginManager().callEvent(event); ((PlanBungee) plugin).getProxy().getPluginManager().callEvent(event);
CapabilityServiceImplementation.notifyAboutEnable(isEnabled); CapabilitySvc.notifyAboutEnable(isEnabled);
} }
} }

View File

@ -21,7 +21,7 @@ import com.djrapitops.plan.delivery.export.Exporter;
import com.djrapitops.plan.delivery.webserver.cache.DataID; import com.djrapitops.plan.delivery.webserver.cache.DataID;
import com.djrapitops.plan.delivery.webserver.cache.JSONCache; import com.djrapitops.plan.delivery.webserver.cache.JSONCache;
import com.djrapitops.plan.extension.CallEvents; import com.djrapitops.plan.extension.CallEvents;
import com.djrapitops.plan.extension.ExtensionServiceImplementation; import com.djrapitops.plan.extension.ExtensionSvc;
import com.djrapitops.plan.gathering.cache.SessionCache; import com.djrapitops.plan.gathering.cache.SessionCache;
import com.djrapitops.plan.gathering.domain.Session; import com.djrapitops.plan.gathering.domain.Session;
import com.djrapitops.plan.gathering.geolocation.GeolocationCache; import com.djrapitops.plan.gathering.geolocation.GeolocationCache;
@ -58,7 +58,7 @@ public class PlayerOnlineListener implements Listener {
private final PlanConfig config; private final PlanConfig config;
private final Processing processing; private final Processing processing;
private final DBSystem dbSystem; private final DBSystem dbSystem;
private final ExtensionServiceImplementation extensionService; private final ExtensionSvc extensionService;
private final Exporter exporter; private final Exporter exporter;
private final GeolocationCache geolocationCache; private final GeolocationCache geolocationCache;
private final SessionCache sessionCache; private final SessionCache sessionCache;
@ -70,7 +70,7 @@ public class PlayerOnlineListener implements Listener {
PlanConfig config, PlanConfig config,
Processing processing, Processing processing,
DBSystem dbSystem, DBSystem dbSystem,
ExtensionServiceImplementation extensionService, ExtensionSvc extensionService,
Exporter exporter, GeolocationCache geolocationCache, Exporter exporter, GeolocationCache geolocationCache,
SessionCache sessionCache, SessionCache sessionCache,
ServerInfo serverInfo, ServerInfo serverInfo,

View File

@ -17,7 +17,7 @@
package com.djrapitops.plan; package com.djrapitops.plan;
import com.djrapitops.plan.api.PlanAPI; import com.djrapitops.plan.api.PlanAPI;
import com.djrapitops.plan.capability.CapabilityServiceImplementation; import com.djrapitops.plan.capability.CapabilitySvc;
import com.djrapitops.plan.delivery.DeliveryUtilities; import com.djrapitops.plan.delivery.DeliveryUtilities;
import com.djrapitops.plan.delivery.export.ExportSystem; import com.djrapitops.plan.delivery.export.ExportSystem;
import com.djrapitops.plan.delivery.webserver.NonProxyWebserverDisableChecker; import com.djrapitops.plan.delivery.webserver.NonProxyWebserverDisableChecker;
@ -25,16 +25,16 @@ import com.djrapitops.plan.delivery.webserver.WebServer;
import com.djrapitops.plan.delivery.webserver.WebServerSystem; import com.djrapitops.plan.delivery.webserver.WebServerSystem;
import com.djrapitops.plan.exceptions.EnableException; import com.djrapitops.plan.exceptions.EnableException;
import com.djrapitops.plan.extension.ExtensionService; import com.djrapitops.plan.extension.ExtensionService;
import com.djrapitops.plan.extension.ExtensionServiceImplementation; import com.djrapitops.plan.extension.ExtensionSvc;
import com.djrapitops.plan.gathering.cache.CacheSystem; import com.djrapitops.plan.gathering.cache.CacheSystem;
import com.djrapitops.plan.gathering.importing.ImportSystem; import com.djrapitops.plan.gathering.importing.ImportSystem;
import com.djrapitops.plan.gathering.listeners.ListenerSystem; import com.djrapitops.plan.gathering.listeners.ListenerSystem;
import com.djrapitops.plan.identification.Server; import com.djrapitops.plan.identification.Server;
import com.djrapitops.plan.identification.ServerInfo; import com.djrapitops.plan.identification.ServerInfo;
import com.djrapitops.plan.processing.Processing; import com.djrapitops.plan.processing.Processing;
import com.djrapitops.plan.query.QueryServiceImplementation; import com.djrapitops.plan.query.QuerySvc;
import com.djrapitops.plan.settings.ConfigSystem; import com.djrapitops.plan.settings.ConfigSystem;
import com.djrapitops.plan.settings.SettingsServiceImplementation; import com.djrapitops.plan.settings.SettingsSvc;
import com.djrapitops.plan.settings.locale.LocaleSystem; import com.djrapitops.plan.settings.locale.LocaleSystem;
import com.djrapitops.plan.storage.database.DBSystem; import com.djrapitops.plan.storage.database.DBSystem;
import com.djrapitops.plan.storage.database.queries.objects.ServerQueries; import com.djrapitops.plan.storage.database.queries.objects.ServerQueries;
@ -77,9 +77,9 @@ public class PlanSystem implements SubSystem {
private final ImportSystem importSystem; private final ImportSystem importSystem;
private final ExportSystem exportSystem; private final ExportSystem exportSystem;
private final DeliveryUtilities deliveryUtilities; private final DeliveryUtilities deliveryUtilities;
private final ExtensionServiceImplementation extensionService; private final ExtensionSvc extensionService;
private final QueryServiceImplementation queryService; private final QuerySvc queryService;
private final SettingsServiceImplementation settingsService; private final SettingsSvc settingsService;
private final PluginLogger logger; private final PluginLogger logger;
private final Timings timings; private final Timings timings;
private final ErrorHandler errorHandler; private final ErrorHandler errorHandler;
@ -100,9 +100,9 @@ public class PlanSystem implements SubSystem {
ImportSystem importSystem, ImportSystem importSystem,
ExportSystem exportSystem, ExportSystem exportSystem,
DeliveryUtilities deliveryUtilities, DeliveryUtilities deliveryUtilities,
ExtensionServiceImplementation extensionService, ExtensionSvc extensionService,
QueryServiceImplementation queryService, QuerySvc queryService,
SettingsServiceImplementation settingsService, SettingsSvc settingsService,
PluginLogger logger, PluginLogger logger,
Timings timings, Timings timings,
ErrorHandler errorHandler, ErrorHandler errorHandler,
@ -151,7 +151,7 @@ public class PlanSystem implements SubSystem {
@Override @Override
public void enable() throws EnableException { public void enable() throws EnableException {
CapabilityServiceImplementation.initialize(); CapabilitySvc.initialize();
enableSystems( enableSystems(
files, files,

View File

@ -27,21 +27,20 @@ import java.util.function.Consumer;
* *
* @author Rsl1122 * @author Rsl1122
*/ */
public class CapabilityServiceImplementation implements CapabilityService { public class CapabilitySvc implements CapabilityService {
private final List<Consumer<Boolean>> enableListeners; private final List<Consumer<Boolean>> enableListeners;
private CapabilityServiceImplementation() { private CapabilitySvc() {
/* Inject required for dagger */ Holder.set(this);
CapabilityServiceHolder.set(this);
enableListeners = new ArrayList<>(); enableListeners = new ArrayList<>();
} }
private static CapabilityServiceImplementation get() { private static CapabilitySvc get() {
if (CapabilityServiceHolder.service == null) { if (Holder.service == null) {
return new CapabilityServiceImplementation(); return new CapabilitySvc();
} }
return (CapabilityServiceImplementation) CapabilityServiceHolder.service; return (CapabilitySvc) Holder.service;
} }
public static void initialize() { public static void initialize() {

View File

@ -20,7 +20,7 @@ import com.djrapitops.plan.PlanPlugin;
import com.djrapitops.plan.exceptions.database.DBInitException; import com.djrapitops.plan.exceptions.database.DBInitException;
import com.djrapitops.plan.exceptions.database.DBOpException; import com.djrapitops.plan.exceptions.database.DBOpException;
import com.djrapitops.plan.processing.Processing; import com.djrapitops.plan.processing.Processing;
import com.djrapitops.plan.query.QueryServiceImplementation; import com.djrapitops.plan.query.QuerySvc;
import com.djrapitops.plan.settings.Permissions; import com.djrapitops.plan.settings.Permissions;
import com.djrapitops.plan.settings.locale.Locale; import com.djrapitops.plan.settings.locale.Locale;
import com.djrapitops.plan.settings.locale.lang.CmdHelpLang; import com.djrapitops.plan.settings.locale.lang.CmdHelpLang;
@ -55,7 +55,7 @@ public class ManageClearCommand extends CommandNode {
private final Locale locale; private final Locale locale;
private final Processing processing; private final Processing processing;
private final DBSystem dbSystem; private final DBSystem dbSystem;
private final QueryServiceImplementation queryService; private final QuerySvc queryService;
private final ErrorHandler errorHandler; private final ErrorHandler errorHandler;
@Inject @Inject
@ -64,7 +64,7 @@ public class ManageClearCommand extends CommandNode {
Locale locale, Locale locale,
Processing processing, Processing processing,
DBSystem dbSystem, DBSystem dbSystem,
QueryServiceImplementation queryService, QuerySvc queryService,
ErrorHandler errorHandler ErrorHandler errorHandler
) { ) {
super("clear", Permissions.MANAGE.getPermission(), CommandType.PLAYER_OR_ARGS); super("clear", Permissions.MANAGE.getPermission(), CommandType.PLAYER_OR_ARGS);

View File

@ -19,7 +19,7 @@ package com.djrapitops.plan.commands.subcommands.manage;
import com.djrapitops.plan.exceptions.database.DBOpException; import com.djrapitops.plan.exceptions.database.DBOpException;
import com.djrapitops.plan.identification.UUIDUtility; import com.djrapitops.plan.identification.UUIDUtility;
import com.djrapitops.plan.processing.Processing; import com.djrapitops.plan.processing.Processing;
import com.djrapitops.plan.query.QueryServiceImplementation; import com.djrapitops.plan.query.QuerySvc;
import com.djrapitops.plan.settings.Permissions; import com.djrapitops.plan.settings.Permissions;
import com.djrapitops.plan.settings.locale.Locale; import com.djrapitops.plan.settings.locale.Locale;
import com.djrapitops.plan.settings.locale.lang.CmdHelpLang; import com.djrapitops.plan.settings.locale.lang.CmdHelpLang;
@ -56,7 +56,7 @@ public class ManageRemoveCommand extends CommandNode {
private final Locale locale; private final Locale locale;
private final Processing processing; private final Processing processing;
private final DBSystem dbSystem; private final DBSystem dbSystem;
private final QueryServiceImplementation queryService; private final QuerySvc queryService;
private final UUIDUtility uuidUtility; private final UUIDUtility uuidUtility;
private final ErrorHandler errorHandler; private final ErrorHandler errorHandler;
@ -65,7 +65,7 @@ public class ManageRemoveCommand extends CommandNode {
Locale locale, Locale locale,
Processing processing, Processing processing,
DBSystem dbSystem, DBSystem dbSystem,
QueryServiceImplementation queryService, QuerySvc queryService,
UUIDUtility uuidUtility, UUIDUtility uuidUtility,
ErrorHandler errorHandler ErrorHandler errorHandler
) { ) {

View File

@ -29,15 +29,15 @@ import javax.inject.Singleton;
@Singleton @Singleton
public class ExtensionServerMethodCallerTask extends AbsRunnable { public class ExtensionServerMethodCallerTask extends AbsRunnable {
private final ExtensionServiceImplementation extensionServiceImplementation; private final ExtensionSvc service;
@Inject @Inject
public ExtensionServerMethodCallerTask(ExtensionServiceImplementation extensionServiceImplementation) { public ExtensionServerMethodCallerTask(ExtensionSvc service) {
this.extensionServiceImplementation = extensionServiceImplementation; this.service = service;
} }
@Override @Override
public void run() { public void run() {
extensionServiceImplementation.updateServerValues(CallEvents.SERVER_PERIODICAL); service.updateServerValues(CallEvents.SERVER_PERIODICAL);
} }
} }

View File

@ -47,7 +47,7 @@ import java.util.UUID;
* @author Rsl1122 * @author Rsl1122
*/ */
@Singleton @Singleton
public class ExtensionServiceImplementation implements ExtensionService { public class ExtensionSvc implements ExtensionService {
private final PlanConfig config; private final PlanConfig config;
private final DBSystem dbSystem; private final DBSystem dbSystem;
@ -60,7 +60,7 @@ public class ExtensionServiceImplementation implements ExtensionService {
private final Map<String, ProviderValueGatherer> extensionGatherers; private final Map<String, ProviderValueGatherer> extensionGatherers;
@Inject @Inject
public ExtensionServiceImplementation( public ExtensionSvc(
PlanConfig config, PlanConfig config,
DBSystem dbSystem, DBSystem dbSystem,
ServerInfo serverInfo, ServerInfo serverInfo,
@ -79,7 +79,7 @@ public class ExtensionServiceImplementation implements ExtensionService {
extensionGatherers = new HashMap<>(); extensionGatherers = new HashMap<>();
ExtensionService.ExtensionServiceHolder.set(this); Holder.set(this);
} }
public void register() { public void register() {

View File

@ -18,7 +18,7 @@ package com.djrapitops.plan.extension.implementation;
import com.djrapitops.plan.extension.CallEvents; import com.djrapitops.plan.extension.CallEvents;
import com.djrapitops.plan.extension.Caller; import com.djrapitops.plan.extension.Caller;
import com.djrapitops.plan.extension.ExtensionServiceImplementation; import com.djrapitops.plan.extension.ExtensionSvc;
import com.djrapitops.plan.extension.implementation.providers.gathering.ProviderValueGatherer; import com.djrapitops.plan.extension.implementation.providers.gathering.ProviderValueGatherer;
import com.djrapitops.plan.processing.Processing; import com.djrapitops.plan.processing.Processing;
@ -32,12 +32,12 @@ import java.util.UUID;
public class CallerImplementation implements Caller { public class CallerImplementation implements Caller {
private final ProviderValueGatherer gatherer; private final ProviderValueGatherer gatherer;
private final ExtensionServiceImplementation extensionService; private final ExtensionSvc extensionService;
private final Processing processing; private final Processing processing;
public CallerImplementation( public CallerImplementation(
ProviderValueGatherer gatherer, ProviderValueGatherer gatherer,
ExtensionServiceImplementation extensionService, ExtensionSvc extensionService,
Processing processing Processing processing
) { ) {
this.gatherer = gatherer; this.gatherer = gatherer;

View File

@ -38,7 +38,7 @@ import java.util.concurrent.Future;
import java.util.function.Consumer; import java.util.function.Consumer;
@Singleton @Singleton
public class QueryServiceImplementation implements QueryService { public class QuerySvc implements QueryService {
private final DBSystem dbSystem; private final DBSystem dbSystem;
private final ServerInfo serverInfo; private final ServerInfo serverInfo;
@ -49,7 +49,7 @@ public class QueryServiceImplementation implements QueryService {
private final Set<VoidFunction> clearSubscribers; private final Set<VoidFunction> clearSubscribers;
@Inject @Inject
public QueryServiceImplementation( public QuerySvc(
DBSystem dbSystem, DBSystem dbSystem,
ServerInfo serverInfo, ServerInfo serverInfo,
PluginLogger logger, PluginLogger logger,
@ -65,7 +65,7 @@ public class QueryServiceImplementation implements QueryService {
} }
public void register() { public void register() {
QueryService.QueryServiceHolder.set(this); Holder.set(this);
} }
@Override @Override

View File

@ -34,13 +34,13 @@ import java.util.function.Supplier;
* @author Rsl1122 * @author Rsl1122
*/ */
@Singleton @Singleton
public class SettingsServiceImplementation implements SettingsService { public class SettingsSvc implements SettingsService {
private final PlanConfig config; private final PlanConfig config;
private final ErrorHandler errorHandler; private final ErrorHandler errorHandler;
@Inject @Inject
public SettingsServiceImplementation( public SettingsSvc(
PlanConfig config, PlanConfig config,
ErrorHandler errorHandler ErrorHandler errorHandler
) { ) {

View File

@ -20,7 +20,7 @@ import com.djrapitops.plan.exceptions.database.DBOpException;
import com.djrapitops.plan.extension.implementation.storage.transactions.results.RemoveUnsatisfiedConditionalPlayerResultsTransaction; import com.djrapitops.plan.extension.implementation.storage.transactions.results.RemoveUnsatisfiedConditionalPlayerResultsTransaction;
import com.djrapitops.plan.extension.implementation.storage.transactions.results.RemoveUnsatisfiedConditionalServerResultsTransaction; import com.djrapitops.plan.extension.implementation.storage.transactions.results.RemoveUnsatisfiedConditionalServerResultsTransaction;
import com.djrapitops.plan.identification.ServerInfo; import com.djrapitops.plan.identification.ServerInfo;
import com.djrapitops.plan.query.QueryServiceImplementation; import com.djrapitops.plan.query.QuerySvc;
import com.djrapitops.plan.settings.config.PlanConfig; import com.djrapitops.plan.settings.config.PlanConfig;
import com.djrapitops.plan.settings.config.paths.TimeSettings; import com.djrapitops.plan.settings.config.paths.TimeSettings;
import com.djrapitops.plan.settings.locale.Locale; import com.djrapitops.plan.settings.locale.Locale;
@ -61,7 +61,7 @@ public class DBCleanTask extends AbsRunnable {
private final Locale locale; private final Locale locale;
private final DBSystem dbSystem; private final DBSystem dbSystem;
private final PlanConfig config; private final PlanConfig config;
private final QueryServiceImplementation queryService; private final QuerySvc queryService;
private final ServerInfo serverInfo; private final ServerInfo serverInfo;
private final PluginLogger logger; private final PluginLogger logger;
private final ErrorHandler errorHandler; private final ErrorHandler errorHandler;
@ -75,7 +75,7 @@ public class DBCleanTask extends AbsRunnable {
PlanConfig config, PlanConfig config,
Locale locale, Locale locale,
DBSystem dbSystem, DBSystem dbSystem,
QueryServiceImplementation queryService, QuerySvc queryService,
ServerInfo serverInfo, ServerInfo serverInfo,
PluginLogger logger, PluginLogger logger,
ErrorHandler errorHandler ErrorHandler errorHandler

View File

@ -33,7 +33,7 @@ import com.djrapitops.plan.delivery.domain.mutators.SessionsMutator;
import com.djrapitops.plan.extension.CallEvents; import com.djrapitops.plan.extension.CallEvents;
import com.djrapitops.plan.extension.DataExtension; import com.djrapitops.plan.extension.DataExtension;
import com.djrapitops.plan.extension.ExtensionService; import com.djrapitops.plan.extension.ExtensionService;
import com.djrapitops.plan.extension.ExtensionServiceImplementation; import com.djrapitops.plan.extension.ExtensionSvc;
import com.djrapitops.plan.extension.annotation.*; import com.djrapitops.plan.extension.annotation.*;
import com.djrapitops.plan.extension.icon.Color; import com.djrapitops.plan.extension.icon.Color;
import com.djrapitops.plan.extension.icon.Icon; import com.djrapitops.plan.extension.icon.Icon;
@ -46,7 +46,7 @@ import com.djrapitops.plan.extension.implementation.storage.transactions.results
import com.djrapitops.plan.extension.table.Table; import com.djrapitops.plan.extension.table.Table;
import com.djrapitops.plan.gathering.domain.*; import com.djrapitops.plan.gathering.domain.*;
import com.djrapitops.plan.identification.Server; import com.djrapitops.plan.identification.Server;
import com.djrapitops.plan.query.QueryServiceImplementation; import com.djrapitops.plan.query.QuerySvc;
import com.djrapitops.plan.settings.config.Config; import com.djrapitops.plan.settings.config.Config;
import com.djrapitops.plan.settings.config.PlanConfig; import com.djrapitops.plan.settings.config.PlanConfig;
import com.djrapitops.plan.settings.locale.Locale; import com.djrapitops.plan.settings.locale.Locale;
@ -546,7 +546,7 @@ public interface DatabaseTest {
system().getConfigSystem().getConfig(), system().getConfigSystem().getConfig(),
new Locale(), new Locale(),
system().getDatabaseSystem(), system().getDatabaseSystem(),
new QueryServiceImplementation(system().getDatabaseSystem(), system().getServerInfo(), logger, errorHandler), new QuerySvc(system().getDatabaseSystem(), system().getServerInfo(), logger, errorHandler),
system().getServerInfo(), system().getServerInfo(),
logger, logger,
errorHandler errorHandler
@ -1225,7 +1225,7 @@ public interface DatabaseTest {
@Test @Test
default void extensionPlayerValuesAreStored() { default void extensionPlayerValuesAreStored() {
ExtensionServiceImplementation extensionService = (ExtensionServiceImplementation) system().getExtensionService(); ExtensionSvc extensionService = (ExtensionSvc) system().getExtensionService();
extensionService.register(new PlayerExtension()); extensionService.register(new PlayerExtension());
extensionService.updatePlayerValues(playerUUID, TestConstants.PLAYER_ONE_NAME, CallEvents.MANUAL); extensionService.updatePlayerValues(playerUUID, TestConstants.PLAYER_ONE_NAME, CallEvents.MANUAL);
@ -1275,7 +1275,7 @@ public interface DatabaseTest {
@Test @Test
default void extensionServerValuesAreStored() { default void extensionServerValuesAreStored() {
ExtensionServiceImplementation extensionService = (ExtensionServiceImplementation) system().getExtensionService(); ExtensionSvc extensionService = (ExtensionSvc) system().getExtensionService();
extensionService.register(new ServerExtension()); extensionService.register(new ServerExtension());
extensionService.updateServerValues(CallEvents.SERVER_EXTENSION_REGISTER); extensionService.updateServerValues(CallEvents.SERVER_EXTENSION_REGISTER);
@ -1297,7 +1297,7 @@ public interface DatabaseTest {
@Test @Test
default void extensionServerAggregateQueriesWork() { default void extensionServerAggregateQueriesWork() {
ExtensionServiceImplementation extensionService = (ExtensionServiceImplementation) system().getExtensionService(); ExtensionSvc extensionService = (ExtensionSvc) system().getExtensionService();
extensionService.register(new PlayerExtension()); extensionService.register(new PlayerExtension());
extensionService.updatePlayerValues(playerUUID, TestConstants.PLAYER_ONE_NAME, CallEvents.MANUAL); extensionService.updatePlayerValues(playerUUID, TestConstants.PLAYER_ONE_NAME, CallEvents.MANUAL);
@ -1327,7 +1327,7 @@ public interface DatabaseTest {
@Test @Test
default void unsatisfiedPlayerConditionalResultsAreCleaned() { default void unsatisfiedPlayerConditionalResultsAreCleaned() {
ExtensionServiceImplementation extensionService = (ExtensionServiceImplementation) system().getExtensionService(); ExtensionSvc extensionService = (ExtensionSvc) system().getExtensionService();
extensionService.register(new ConditionalExtension()); extensionService.register(new ConditionalExtension());
@ -1381,7 +1381,7 @@ public interface DatabaseTest {
@Test @Test
default void unsatisfiedServerConditionalResultsAreCleaned() { default void unsatisfiedServerConditionalResultsAreCleaned() {
ExtensionServiceImplementation extensionService = (ExtensionServiceImplementation) system().getExtensionService(); ExtensionSvc extensionService = (ExtensionSvc) system().getExtensionService();
ConditionalExtension.condition = true; ConditionalExtension.condition = true;
extensionService.register(new ConditionalExtension()); extensionService.register(new ConditionalExtension());
@ -1432,7 +1432,7 @@ public interface DatabaseTest {
@Test @Test
default void extensionServerTableValuesAreInserted() { default void extensionServerTableValuesAreInserted() {
ExtensionServiceImplementation extensionService = (ExtensionServiceImplementation) system().getExtensionService(); ExtensionSvc extensionService = (ExtensionSvc) system().getExtensionService();
extensionService.register(new TableExtension()); extensionService.register(new TableExtension());
extensionService.updateServerValues(CallEvents.MANUAL); extensionService.updateServerValues(CallEvents.MANUAL);
@ -1463,7 +1463,7 @@ public interface DatabaseTest {
@Test @Test
default void extensionPlayerTableValuesAreInserted() { default void extensionPlayerTableValuesAreInserted() {
ExtensionServiceImplementation extensionService = (ExtensionServiceImplementation) system().getExtensionService(); ExtensionSvc extensionService = (ExtensionSvc) system().getExtensionService();
extensionService.register(new TableExtension()); extensionService.register(new TableExtension());
extensionService.updatePlayerValues(playerUUID, TestConstants.PLAYER_ONE_NAME, CallEvents.MANUAL); extensionService.updatePlayerValues(playerUUID, TestConstants.PLAYER_ONE_NAME, CallEvents.MANUAL);

View File

@ -30,7 +30,7 @@ import com.djrapitops.plan.delivery.export.Exporter;
import com.djrapitops.plan.delivery.webserver.cache.DataID; import com.djrapitops.plan.delivery.webserver.cache.DataID;
import com.djrapitops.plan.delivery.webserver.cache.JSONCache; import com.djrapitops.plan.delivery.webserver.cache.JSONCache;
import com.djrapitops.plan.extension.CallEvents; import com.djrapitops.plan.extension.CallEvents;
import com.djrapitops.plan.extension.ExtensionServiceImplementation; import com.djrapitops.plan.extension.ExtensionSvc;
import com.djrapitops.plan.gathering.cache.NicknameCache; import com.djrapitops.plan.gathering.cache.NicknameCache;
import com.djrapitops.plan.gathering.cache.SessionCache; import com.djrapitops.plan.gathering.cache.SessionCache;
import com.djrapitops.plan.gathering.domain.GMTimes; import com.djrapitops.plan.gathering.domain.GMTimes;
@ -63,7 +63,7 @@ public class PlayerOnlineListener implements Listener {
private final Processing processing; private final Processing processing;
private final ServerInfo serverInfo; private final ServerInfo serverInfo;
private final DBSystem dbSystem; private final DBSystem dbSystem;
private final ExtensionServiceImplementation extensionService; private final ExtensionSvc extensionService;
private final Exporter exporter; private final Exporter exporter;
private final GeolocationCache geolocationCache; private final GeolocationCache geolocationCache;
private final NicknameCache nicknameCache; private final NicknameCache nicknameCache;
@ -77,7 +77,7 @@ public class PlayerOnlineListener implements Listener {
Processing processing, Processing processing,
ServerInfo serverInfo, ServerInfo serverInfo,
DBSystem dbSystem, DBSystem dbSystem,
ExtensionServiceImplementation extensionService, ExtensionSvc extensionService,
Exporter exporter, Exporter exporter,
GeolocationCache geolocationCache, GeolocationCache geolocationCache,
NicknameCache nicknameCache, NicknameCache nicknameCache,

View File

@ -20,7 +20,7 @@ import com.djrapitops.plan.PlanPlugin;
import com.djrapitops.plan.PlanSponge; import com.djrapitops.plan.PlanSponge;
import com.djrapitops.plan.SpongeServerShutdownSave; import com.djrapitops.plan.SpongeServerShutdownSave;
import com.djrapitops.plan.api.events.PlanSpongeEnableEvent; import com.djrapitops.plan.api.events.PlanSpongeEnableEvent;
import com.djrapitops.plan.capability.CapabilityServiceImplementation; import com.djrapitops.plan.capability.CapabilitySvc;
import com.djrapitops.plan.gathering.listeners.sponge.*; import com.djrapitops.plan.gathering.listeners.sponge.*;
import org.spongepowered.api.Sponge; import org.spongepowered.api.Sponge;
import org.spongepowered.api.event.Event; import org.spongepowered.api.event.Event;
@ -91,6 +91,6 @@ public class SpongeListenerSystem extends ListenerSystem {
} catch (IllegalStateException ignore) { } catch (IllegalStateException ignore) {
/* Ignore, Sponge is not initialized */ /* Ignore, Sponge is not initialized */
} }
CapabilityServiceImplementation.notifyAboutEnable(plugin.isSystemEnabled()); CapabilitySvc.notifyAboutEnable(plugin.isSystemEnabled());
} }
} }

View File

@ -22,7 +22,7 @@ import com.djrapitops.plan.delivery.export.Exporter;
import com.djrapitops.plan.delivery.webserver.cache.DataID; import com.djrapitops.plan.delivery.webserver.cache.DataID;
import com.djrapitops.plan.delivery.webserver.cache.JSONCache; import com.djrapitops.plan.delivery.webserver.cache.JSONCache;
import com.djrapitops.plan.extension.CallEvents; import com.djrapitops.plan.extension.CallEvents;
import com.djrapitops.plan.extension.ExtensionServiceImplementation; import com.djrapitops.plan.extension.ExtensionSvc;
import com.djrapitops.plan.gathering.cache.NicknameCache; import com.djrapitops.plan.gathering.cache.NicknameCache;
import com.djrapitops.plan.gathering.cache.SessionCache; import com.djrapitops.plan.gathering.cache.SessionCache;
import com.djrapitops.plan.gathering.domain.Session; import com.djrapitops.plan.gathering.domain.Session;
@ -66,7 +66,7 @@ public class PlayerOnlineListener {
private final Processing processing; private final Processing processing;
private final ServerInfo serverInfo; private final ServerInfo serverInfo;
private final DBSystem dbSystem; private final DBSystem dbSystem;
private final ExtensionServiceImplementation extensionService; private final ExtensionSvc extensionService;
private final Exporter exporter; private final Exporter exporter;
private final GeolocationCache geolocationCache; private final GeolocationCache geolocationCache;
private final NicknameCache nicknameCache; private final NicknameCache nicknameCache;
@ -80,7 +80,7 @@ public class PlayerOnlineListener {
Processing processing, Processing processing,
ServerInfo serverInfo, ServerInfo serverInfo,
DBSystem dbSystem, DBSystem dbSystem,
ExtensionServiceImplementation extensionService, ExtensionSvc extensionService,
Exporter exporter, GeolocationCache geolocationCache, Exporter exporter, GeolocationCache geolocationCache,
NicknameCache nicknameCache, NicknameCache nicknameCache,
SessionCache sessionCache, SessionCache sessionCache,

View File

@ -19,7 +19,7 @@ package com.djrapitops.plan.gathering.listeners;
import com.djrapitops.plan.PlanPlugin; import com.djrapitops.plan.PlanPlugin;
import com.djrapitops.plan.PlanVelocity; import com.djrapitops.plan.PlanVelocity;
import com.djrapitops.plan.api.events.PlanVelocityEnableEvent; import com.djrapitops.plan.api.events.PlanVelocityEnableEvent;
import com.djrapitops.plan.capability.CapabilityServiceImplementation; import com.djrapitops.plan.capability.CapabilitySvc;
import com.djrapitops.plan.gathering.listeners.velocity.PlayerOnlineListener; import com.djrapitops.plan.gathering.listeners.velocity.PlayerOnlineListener;
import javax.inject.Inject; import javax.inject.Inject;
@ -56,6 +56,6 @@ public class VelocityListenerSystem extends ListenerSystem {
boolean isEnabled = plugin.isSystemEnabled(); boolean isEnabled = plugin.isSystemEnabled();
PlanVelocityEnableEvent event = new PlanVelocityEnableEvent(isEnabled); PlanVelocityEnableEvent event = new PlanVelocityEnableEvent(isEnabled);
((PlanVelocity) plugin).getProxy().getEventManager().fireAndForget(event); ((PlanVelocity) plugin).getProxy().getEventManager().fireAndForget(event);
CapabilityServiceImplementation.notifyAboutEnable(isEnabled); CapabilitySvc.notifyAboutEnable(isEnabled);
} }
} }

View File

@ -21,7 +21,7 @@ import com.djrapitops.plan.delivery.export.Exporter;
import com.djrapitops.plan.delivery.webserver.cache.DataID; import com.djrapitops.plan.delivery.webserver.cache.DataID;
import com.djrapitops.plan.delivery.webserver.cache.JSONCache; import com.djrapitops.plan.delivery.webserver.cache.JSONCache;
import com.djrapitops.plan.extension.CallEvents; import com.djrapitops.plan.extension.CallEvents;
import com.djrapitops.plan.extension.ExtensionServiceImplementation; import com.djrapitops.plan.extension.ExtensionSvc;
import com.djrapitops.plan.gathering.cache.SessionCache; import com.djrapitops.plan.gathering.cache.SessionCache;
import com.djrapitops.plan.gathering.domain.Session; import com.djrapitops.plan.gathering.domain.Session;
import com.djrapitops.plan.gathering.geolocation.GeolocationCache; import com.djrapitops.plan.gathering.geolocation.GeolocationCache;
@ -61,7 +61,7 @@ public class PlayerOnlineListener {
private final PlanConfig config; private final PlanConfig config;
private final Processing processing; private final Processing processing;
private final DBSystem dbSystem; private final DBSystem dbSystem;
private final ExtensionServiceImplementation extensionService; private final ExtensionSvc extensionService;
private final Exporter exporter; private final Exporter exporter;
private final GeolocationCache geolocationCache; private final GeolocationCache geolocationCache;
private final SessionCache sessionCache; private final SessionCache sessionCache;
@ -73,7 +73,7 @@ public class PlayerOnlineListener {
PlanConfig config, PlanConfig config,
Processing processing, Processing processing,
DBSystem dbSystem, DBSystem dbSystem,
ExtensionServiceImplementation extensionService, ExtensionSvc extensionService,
Exporter exporter, GeolocationCache geolocationCache, Exporter exporter, GeolocationCache geolocationCache,
SessionCache sessionCache, SessionCache sessionCache,
ServerInfo serverInfo, ServerInfo serverInfo,