public interface IConfigurationHandler
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
convertToString(java.lang.Object config)
Converts the config into a string
|
java.io.File |
getConfigFile(java.lang.String fileName,
java.lang.Object config)
Called to get the config file
|
java.lang.Object |
getValue(java.lang.String configValue,
java.lang.String category,
java.lang.Object config)
Called when a value is requested
|
boolean |
hasValue(java.lang.String configValue,
java.lang.String category)
Returns whether the config contains the specified value
|
void |
loadFile(java.lang.String fileName,
java.lang.Object config,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.reflect.Field>> hint)
Called to load/create a config file
|
void |
loadFromString(java.lang.String string,
java.lang.Object config,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.reflect.Field>> hint)
Called to load/create a config from a string
|
void |
setValue(java.lang.String configValue,
java.lang.String category,
java.lang.Object value,
java.lang.Object config)
Called when a value is set/changed for a config, same as
setValue(String, String, Object, Object, boolean) but saveToFile is assumed true |
void |
setValue(java.lang.String configValue,
java.lang.String category,
java.lang.Object value,
java.lang.Object config,
boolean saveToFile)
Called when a value is set/changed for a config
|
void setValue(java.lang.String configValue,
java.lang.String category,
java.lang.Object value,
java.lang.Object config)
setValue(String, String, Object, Object, boolean) but saveToFile is assumed trueconfigValue - The value being modifiedcategory - The category the value is invalue - The new valueconfig - The config objectvoid setValue(java.lang.String configValue,
java.lang.String category,
java.lang.Object value,
java.lang.Object config,
boolean saveToFile)
configValue - The value being modifiedcategory - The category the value is invalue - The new valueconfig - The config objectsaveToFile - Whether to save the new value to the filejava.lang.Object getValue(java.lang.String configValue,
java.lang.String category,
java.lang.Object config)
configValue - The value being modifiedcategory - The category the value is inconfig - The config objectvoid loadFile(java.lang.String fileName,
java.lang.Object config,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.reflect.Field>> hint)
fileName - The file name for the configconfig - The config objecthint - A map full of field data (feel free to ignore this);
Outer map has the key = the category
Inner map has the key = the field name and the value = the actual fieldvoid loadFromString(java.lang.String string,
java.lang.Object config,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.reflect.Field>> hint)
string - The string containing all the dataconfig - The config objecthint - A map full of field data (feel free to ignore this);
Outer map has the key = the category
Inner map has the key = the field name and the value = the actual fieldjava.io.File getConfigFile(java.lang.String fileName,
java.lang.Object config)
fileName - The file name for the configconfig - The config objectboolean hasValue(java.lang.String configValue,
java.lang.String category)
configValue - The valuecategory - The category the value is injava.lang.String convertToString(java.lang.Object config)