Session#getLongestWorldPlayed was a violation of Single Responsibility
Principle.
The method was moved to WorldAliasSettings, although still a violation,
it makes more sense there than inside the Session class. It also allows
creation of Session without a WorldAliasSettings dependency.
Most uses of this method were already handled, but database related were
not. Dependency was met by adding a Supplier<UUID> to SQLDB class.
Patch and Table classes have getServerUUID() method that use supplier in
SQLDB.
UserImportDataBuilder required the dependency, and it was provided via
UserImportData#builder(UUID).
ErrorResponse caught an IOException for reading a file from the jar,
but this error should be moved further up stream - thus catching it was
delegated to ResponseFactory, where the error can be parsed into
InternalErrorResponse and dealt with accordingly.
getInstance is not necessary as GeolocationCache can be injected
everywhere where it is required (Mostly at gathering layer)
Discovered old GeolocationCacheTest that was removed.
This method was in use for generating different PluginData related
things: Bans, Analysis page & Inspect page plugins tabs.
- Bans: Removed BanData related analysis objects as it is deprecated.
Plugins will not be asked if a player is banned in the future, and
will rely on server OfflinePlayer#isBanned instead.
- Analysis Page: Generation tool is still static, on the TODO list.
- Inspect Page: Added HookHandler as injected dependency
This method was used in tests, but is not the optimal way of performing
temporary test values as APF supports in memory configuration object.
Old usages were commented in order to preserve assumed temporary values.
Affected issues: none
Some threshold values are needed in mutators and tasks, but they are not
yet available in the classes they are used. TODO was added.
ActivityIndexTest was removed as it does not test proper stuff.
Affected issues: none
This method was dependent on PlanPlugin.getInstance() which is being
removed.
Also removed use of Settings in MiscUtils.close methods.
Affected issues: none
Inject HtmlTables to access the factory.
Abstracted away details of TableContainer creation in the factory.
Each table class is now package private, and present as TableContainers.
Removed MapComparator as it became obsolete.
Affected issues: none
Added instance variables for different Formatter objects with a TODO to
accompany the additions where dagger injection was not yet possible.
Moved formatIP to GeoInfo
Moved getStackTrace to PromptAuthorizationResponse
Affected issues: none
Added instance variables for different Formatter objects with a TODO to
accompany the additions where dagger injection was not yet possible.
Affected issues: none
Inject Graphs to access these factories.
Moved WorldTimes Alias playtime calculations to WorldAliasSettings
Renamed some Graphs to be shorter and unambiguous:
AbstractLineGraph -> LineGraph
AbstractPieChart -> Pie
AbstractPieChartWithDrilldown -> PieWithDrilldown
AbstractStackGraph -> StackGraph
Abstracted away some details and made some graph classes package private
Fixed tests for Line graphs, removed Stack graph test for now
Where possible replaced with PluginLogger or ErrorHandler calls,
some places removed a catch clause and added throws,
some places removed the log or benchmark completely.
Some places still need to be modified so that the required dependencies
can be injected.
Registered pages on ResponseHandler separately
Registered commands in PlanCommand and PlanBungeeCommand separately
Made WebServer Lazy in InfoSystems and ConnectionSystems
Moved Import data objects to system.importing.data
Moved Importer classes to system.importing.importers
Bound ImportSystem instances in SuperClassBindingModules
Added ImportSystem as injected parameter to PlanSystem
Injected ImportSystem to ManageImportCommand
Removed old references to ImporterManager and removed the class
Moved ImportBuilderTest to system.importing.data