-
- All Implemented Interfaces:
public class AdminPanelInstaller.Companion
-
-
Field Summary
Fields Modifier and Type Field Description private AdminPanelConfig
currentConfig
private ConfigHandler<AdminPanelConfig>
configHandler
private final HashMap<String, String>
tokens
private final HashMap<String, Instant>
tokenDate
private final Jargon2.Verifier
verifier
private final Jargon2.Hasher
hasher
public final static AdminPanelInstaller.Companion
INSTANCE
-
Method Summary
Modifier and Type Method Description final Unit
install(WebserverManager webserver, Boolean installWebsocketExtension, Boolean installGSONExtension)
Install the s.Admin module in the ConsoleManager nad a WebserverManager. final Unit
loadConfig()
Load the s.Admin config file. final Unit
saveConfig(AdminPanelConfig config)
Save the s.Admin config file. final Ansi
prefix()
Get the default console prefix from s. final Unit
startTimer()
Start the cleanup scheduler. final AdminPanelConfig
getCurrentConfig()
final Unit
setCurrentConfig(AdminPanelConfig currentConfig)
final ConfigHandler<AdminPanelConfig>
getConfigHandler()
final Unit
setConfigHandler(ConfigHandler<AdminPanelConfig> configHandler)
final HashMap<String, String>
getTokens()
final HashMap<String, Instant>
getTokenDate()
final Jargon2.Verifier
getVerifier()
final Jargon2.Hasher
getHasher()
-
-
Method Detail
-
install
final Unit install(WebserverManager webserver, Boolean installWebsocketExtension, Boolean installGSONExtension)
Install the s.Admin module in the ConsoleManager nad a WebserverManager.
- Parameters:
webserver
- The webserver where to install the module.installWebsocketExtension
- Should the ktor websocket extension be installed automatically?
-
loadConfig
final Unit loadConfig()
Load the s.Admin config file. (admin-config.json)
-
saveConfig
final Unit saveConfig(AdminPanelConfig config)
Save the s.Admin config file. (admin-config.json)
-
prefix
final Ansi prefix()
Get the default console prefix from s.Admin as an ansi object
-
startTimer
final Unit startTimer()
Start the cleanup scheduler. This function is useful when starting s.Admin manually.
-
getCurrentConfig
final AdminPanelConfig getCurrentConfig()
-
setCurrentConfig
final Unit setCurrentConfig(AdminPanelConfig currentConfig)
-
getConfigHandler
final ConfigHandler<AdminPanelConfig> getConfigHandler()
-
setConfigHandler
final Unit setConfigHandler(ConfigHandler<AdminPanelConfig> configHandler)
-
getTokenDate
final HashMap<String, Instant> getTokenDate()
-
getVerifier
final Jargon2.Verifier getVerifier()
-
getHasher
final Jargon2.Hasher getHasher()
-
-
-
-