public interface ConfigManager
Plugins can choose between two places to store their configuration:
plugin_id.conf
.In either case, a "default configuration file" is provided in both scenarios. It is not required that plugins use this, but it does ensure consistency.
Call either getSharedConfig(Object)
or
getPluginConfig(Object)
to get an object that represents one of
the two outlined choices.
Modifier and Type | Method and Description |
---|---|
ConfigRoot |
getPluginConfig(Object instance)
Gets the configuration root for a plugin that utilizes a configuration
folder specific to the plugin, which may also be a
su-directory of the shared configuration folder.
|
ConfigRoot |
getSharedConfig(Object instance)
Gets the configuration root for a plugin that utilizes the shared
configuration folder.
|
ConfigRoot getSharedConfig(Object instance)
The shared configuration folder may refer to "config/" but this may vary between implementations and configurations.
The plugin parameter is used to determine the filename for
ConfigRoot.getConfigPath()
.
instance
- The plugin instanceConfigRoot getPluginConfig(Object instance)
The provided plugin is used to determine the folder name.
instance
- The plugin instance