Commit Graph

2155 Commits

Author SHA1 Message Date
Rsl1122
81be032ccf [Debt] Updated Network page updating
This moves the network page servers tab generation and removes need for
network page updates on Bukkit servers, so it was removed.
2018-10-07 21:51:01 +03:00
Rsl1122
d448e7f868 [V] Dropped SNAPSHOT from APF version
Abstract Plugin Framework 3.3.0 is now available in central.
2018-10-07 16:46:50 +03:00
Rsl1122
ade810ca8c [Fix] Fix Command registration
Issue was caused by no call to registerCommands was made at runtime.
2018-10-07 16:17:06 +03:00
Rsl1122
7f9146fcf4 [Debt] Refactored Server Boxes to network page generation
Some features could not be implemented or will have reduced precision:
- Server type
- Players Online is deduced from TPS data
- Analysis Refresh date is now a true/false based on cache value
2018-10-06 21:38:59 +03:00
Rsl1122
add18feb83 [Debt] Removed deprecated APF usage leftovers
Removed deprecated:
* Benchmark usage
* TimeAmount usage
* StaticHolder usage
* Log usage
* ErrorManager
2018-10-03 21:33:46 +03:00
Rsl1122
51e2d6fe91 [Debt] Added thresholds to ActivityIndex methods
This required addition of PlanConfig in some places to obtain the values
2018-10-03 20:59:17 +03:00
Rsl1122
6bb24c3903 [New] Set DebugLogger in ConfigSystem
Old Abstract Plugin Framework functionality did this differently,
but now this falls on the hands of developers to not limit the settings.
2018-10-03 20:43:20 +03:00
Rsl1122
c4bf9a500f [Fix] Fixed compile issues
Compile issues were caused by recent changes in APF:
* ISender -> Sender rename
* BukkitCMDSender was in use in test, but was made package private.

Fixes:
* Replaced ISender -> Sender
* Replaced BukkitCMDSender use in MiscUtilsTest
* Moved two database tests out from MiscUtilsTest
2018-10-03 20:26:12 +03:00
Rsl1122
6ca86b8c76 [Debug] Improved debug channel usage 2018-09-29 14:44:23 +03:00
Rsl1122
bd636892d6 [Debt] Fixed Plugin Enable Sequence
Removed PlanPlugin.getInstance()
Temporarily disabled Plugin Bridge hooking
2018-09-29 14:19:29 +03:00
Rsl1122
e60e1abe9a [Fix] Fixed cyclic dependency - WorldAliasSettings 2018-09-29 13:47:19 +03:00
Rsl1122
ea9a8b8812 [Debt] Sorted up some Analysis refresh code
Split AnalysisPage#getRefreshingHtml into new RefreshingAnalysisResponse
class. Moved AnalysisPageResponse.refreshNow to ServerPageHandler.
2018-09-29 13:43:56 +03:00
Rsl1122
3625156b36 [Debt] Moved SRP violation in Session
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.
2018-09-29 13:32:59 +03:00
Rsl1122
e12f258a33 [Debt] PlanAPI getInstance uses a static holder.
This is close to a Singleton pattern, but not quite. Testing required
to know impact of using static here. - Is it possible to set null?
2018-09-29 13:21:54 +03:00
Rsl1122
32044ed016 [Debt] Removed easy use of PlanPlugin.getInstance
This removed easy to remove usages of PlanPlugin.getInstance method.
2018-09-29 12:55:22 +03:00
Rsl1122
aeec459ee9 [Debt] Added PlanFiles to FileResponse constructor
ResponseFactory provides the Response objects this dependency.
Renamed all occurrences of "planFiles" -> "files"
2018-09-29 12:44:56 +03:00
Rsl1122
9b9443adf4 [Debt] Removed ServerInfo.getServerUUID() method
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).
2018-09-29 12:40:58 +03:00
Rsl1122
a48b660a05 [Debt] Delegated Exception logs to ResponseFactory
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.
2018-09-24 20:39:36 +03:00
Rsl1122
7f53fb4c80 [Debt] Moved LogsFolderCleanTask out of PlanFiles
This had to be done in order for a call to settings to be made without
a dependency cycle, since PlanConfig depends on PlanFiles.
2018-09-24 19:53:03 +03:00
Rsl1122
b972c26fe8 [Smell] Renamed FileSystem to PlanFiles 2018-09-24 19:41:11 +03:00
Rsl1122
594e9b4072 [Debt] Removed FileUtil.getStringFromResource
Because of PlanPlugin dependency this code needed to be moved elsewhere.
New method to use is FileSystem#readCustomizableResourceFlat
2018-09-24 19:38:39 +03:00
Rsl1122
e7cbf10ee3 [Debt] AnalysisPluginsTabContentCreator non-static 2018-09-19 20:04:58 +03:00
Rsl1122
7a817d3463 [Test] Added TestAPFModule
This dagger module can be used in the future when creating full test
components for system wide testing.
2018-09-19 13:45:36 +03:00
Rsl1122
1a638ca4c9 [Test] Removed some unnecessary test utilities
ConsoleSenders can be mocked on the spot, so a concrete implementation
is not required.
2018-09-19 13:44:54 +03:00
Rsl1122
5fc5494da9 [Debt] Created factory for Accordion objects.
SessionAccordion and ServerAccordion are now constructed with a factory.
Renamed: AbstractAccordion -> Accordion, as class was not abstract.
2018-09-19 13:22:38 +03:00
Rsl1122
ad5837b519 [Debt] Removed CacheSystem.getInstance() method
This deprecated method was no longer in use.
2018-09-19 13:01:31 +03:00
Rsl1122
eb91fbc990 [Debt] ActivityIndex#getFormattedValue(Formatter) 2018-09-18 18:43:58 +03:00
Rsl1122
062ecc86a7 [Debt] Removed getServerUUID usage in Tests and Processors 2018-09-18 18:38:42 +03:00
Rsl1122
f398c2a2c2 [Debt] Removed getServerUUID usage in Session 2018-09-18 18:30:31 +03:00
Rsl1122
b80198ef51 [Debt] Removed some static ServerInfo methods
serverUUID method will require a separate working, as it has 40 usages.
2018-09-18 18:25:12 +03:00
Rsl1122
57377ece82 [Debt] RecentLoginList construction, add Formatter
Added Formatter<Long> to RecentLoginList constructor.
2018-09-18 18:21:23 +03:00
Rsl1122
f26294d9dd [Debt] Turned GeolocationCache methods non-static
getInstance is not necessary as GeolocationCache can be injected
everywhere where it is required (Mostly at gathering layer)
Discovered old GeolocationCacheTest that was removed.
2018-09-18 18:18:52 +03:00
Rsl1122
654d7ca03c [Debt] Removed static methods WorldAliasSettings
Usage in Session is in a deprecated method, needs to be sorted - TODO
Other usages injected WorldAliasSettings
2018-09-18 18:04:22 +03:00
Rsl1122
aff935bfc1 [Debt] Removed HookHandler.getInstance() method.
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
2018-09-18 17:58:01 +03:00
Rsl1122
2b4e6fe9cb [Debt] Removed SessionCache.getInstance() method 2018-09-18 17:34:42 +03:00
Rsl1122
7b09f588fe [Debt] Removed ConfigSystem.getInstance method
Related methods (getConfig_Old, getThemeSystem) were also removed.

Affected issues: none
2018-09-18 17:33:22 +03:00
Rsl1122
fca93578af [Debt] Removed Settings#setTemporaryValue method.
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
2018-09-18 17:30:57 +03:00
Rsl1122
2b1cf4b3cb [Debt] Removed Settings getNumber method
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
2018-09-18 16:01:06 +03:00
Rsl1122
b6cc713c01 [Debt] Removed Settings isTrue method.
Moved MiscUtils.getTimeZoneOffsetHours to PlanConfig as non static.

Affected issues: none
2018-09-18 15:46:41 +03:00
Rsl1122
bff365de20 [Debt] Removed MiscUtils.getPlanVersion() method.
This method was dependent on PlanPlugin.getInstance() which is being
removed.
Also removed use of Settings in MiscUtils.close methods.

Affected issues: none
2018-09-18 15:39:50 +03:00
Rsl1122
54e3528a59 [Debt] Removed Theme replaceColors method.
All static methods removed now from Theme.
Delegated Theme and Locale html modifications to Response#send method.

Affected issues: none
2018-09-18 15:16:00 +03:00
Rsl1122
35be0a2afb [Debt] Removed static Theme getValue method
Theme depends on a configuration file, so it should not be static.

Affected issues: none
2018-09-18 14:55:09 +03:00
Rsl1122
275bfe64b4 [Debt] Removed some deprecated Settings methods.
Removed methods: toString(), getStringList() & set(Object).

Affected issues: none
2018-09-18 12:18:55 +03:00
Rsl1122
f92c9e2b89 [Docs] Added javadoc titles for Formatter classes
Affected issues: none
2018-09-18 12:07:38 +03:00
Rsl1122
b4f7053936 [Debt] Created HtmlTable factory for Table creation
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
2018-09-18 11:53:07 +03:00
Rsl1122
fac06e7d80 [Debt] Removed FormatUtils class.
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
2018-09-17 23:39:21 +03:00
Rsl1122
8d36b08acb [Debt] Removed static methods in Formatters class.
Added instance variables for different Formatter objects with a TODO to
accompany the additions where dagger injection was not yet possible.

Affected issues: none
2018-09-17 23:12:27 +03:00
Rsl1122
b104e8ca03 Made Graph Factories that use Dagger to initialize new Graphs.
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
2018-09-16 17:23:21 +03:00
Rsl1122
cb351c80f1 Removed many deprecated Log & BenchMark usages
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.
2018-09-13 19:44:45 +03:00
Rsl1122
c67f0475a0 Removed DataCache#getInstance method 2018-09-13 19:18:33 +03:00