Class ConfigManager
The ConfigManager that is used for loading mappings and settings aswell as modifying settings.
Inheritance
Inherited Members
Namespace:
Assembly: .dll
Syntax
public class ConfigManager
Constructors
ConfigManager()
Declaration
public ConfigManager()
Fields
CONFIG_PATH_SUFFIX
Declaration
public static final String CONFIG_PATH_SUFFIX
Field Value
Type | Description |
---|---|
java.lang.String |
Methods
getAllowedGames()
Syntactic sugar to wrap the access on the settings object.
Declaration
public ArrayList<String> getAllowedGames()
Returns
Type | Description |
---|---|
java.util.ArrayList<java.lang.String> | The allowedGames. |
getCssPath()
Declaration
public String getCssPath()
Returns
Type | Description |
---|---|
java.lang.String |
getMapping(String game)
Gets the mapping for a given game.
Declaration
public Mapping getMapping(String game)
Parameters
Type | Name | Description |
---|---|---|
java.lang.String | game | The game to get the mapping for |
Returns
Type | Description |
---|---|
Mapping | The mapping if mappings contained it, null else |
getMappings()
Declaration
public List<Mapping> getMappings()
Returns
Type | Description |
---|---|
java.util.List<Mapping> |
getSessionTimeout()
Syntactic sugar to wrap the access on the settings object.
Declaration
public HashMap<String,Integer> getSessionTimeout()
Returns
Type | Description |
---|---|
java.util.HashMap<java.lang.String,java.lang.Integer> | The SessionTimeouts. |
getWebApiPort()
Syntactic sugar to wrap the access on the settings object.
Declaration
public int getWebApiPort()
Returns
Type | Description |
---|---|
int | The webApiPort. |
isDarkModeOn()
Syntactic sugar to wrap the access on the settings object.
Declaration
public boolean isDarkModeOn()
Returns
Type | Description |
---|---|
boolean | the dark mode on value. |
isGameAllowed(String game)
Whether the given game is allowed by VISAB.
Declaration
public boolean isGameAllowed(String game)
Parameters
Type | Name | Description |
---|---|---|
java.lang.String | game | The game to check |
Returns
Type | Description |
---|---|
boolean | True if it is allowed |
restoreDefaultSettings()
Restores the default settings to the file system using the repository.
Declaration
public void restoreDefaultSettings()
saveSettings()
Saves the settings to the file system using the repository.
Declaration
public void saveSettings()
updateAllowedGames(ArrayList<String> games)
Syntactic sugar to wrap the access on the settings object that also provides detailed logging information according to the changes made.
Declaration
public void updateAllowedGames(ArrayList<String> games)
Parameters
Type | Name | Description |
---|---|---|
java.util.ArrayList<java.lang.String> | games | The new allowed games. |
updateDarkMode(boolean darkModeOn)
Syntactic sugar to wrap the access on the settings object that also provides detailed logging information according to the changes made.
Declaration
public void updateDarkMode(boolean darkModeOn)
Parameters
Type | Name | Description |
---|---|---|
boolean | darkModeOn | the value denoting if dark mode shall be on. |
updateSessionTimeout(HashMap<String,Integer> timeouts)
Updates the timeouts from the games. If a single timeout provided is <= 0, the timeouts aren't updated.
Declaration
public boolean updateSessionTimeout(HashMap<String,Integer> timeouts)
Parameters
Type | Name | Description |
---|---|---|
java.util.HashMap<java.lang.String,java.lang.Integer> | timeouts | The timeouts Map. |
Returns
Type | Description |
---|---|
boolean | True if timeouts were updated |
updateWebApiPort(int port)
Syntactic sugar to wrap the access on the settings object that also provides detailed logging information according to the changes made.
Declaration
public void updateWebApiPort(int port)
Parameters
Type | Name | Description |
---|---|---|
int | port | The new port. |