public final class GlobalVariableManager extends Manager implements IMigratable
| Modifier and Type | Class and Description |
|---|---|
static class |
GlobalVariableManager.GlobalVariableAdapter |
| Constructor and Description |
|---|
GlobalVariableManager(TriggerReactorCore plugin) |
GlobalVariableManager(TriggerReactorCore plugin,
IConfigSource configSource) |
| Modifier and Type | Method and Description |
|---|---|
Object |
get(String key)
get value saved with the 'key'
|
HashMap<Object,Object> |
getGlobalVariableAdapter()
Get global variable adapter that will be used by Triggers.
|
boolean |
has(String key)
Check if the key is set
|
boolean |
isMigrationNeeded() |
static boolean |
isValidName(String str)
Check if the string is valid as key.
|
void |
migrate(IMigrationHelper migrationHelper) |
void |
put(String key,
Object value)
Save new value.
|
void |
reload()
Reload all triggers
|
void |
remove(String key)
Remove global variable named 'key.' The 'key' might can contains '.' to indicate the grouping
of yaml.
|
void |
saveAll()
Save all triggers
|
disable, getManagerspublic GlobalVariableManager(TriggerReactorCore plugin)
public GlobalVariableManager(TriggerReactorCore plugin, IConfigSource configSource)
public void reload()
Managerpublic void saveAll()
Managerpublic boolean isMigrationNeeded()
isMigrationNeeded in interface IMigratablepublic void migrate(IMigrationHelper migrationHelper)
migrate in interface IMigratablepublic void remove(String key)
key - the keypublic boolean has(String key)
key - the keypublic void put(String key, Object value)
key - the key. (This can contains '.' to indicate grouping of yaml)value - the value to saveExceptionpublic Object get(String key)
key - the keypublic HashMap<Object,Object> getGlobalVariableAdapter()
public static boolean isValidName(String str)
str - the string to test