|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.pluginsimpl.local.config.PluginConfigSourceImpl
public class PluginConfigSourceImpl
Constructor Summary | |
---|---|
PluginConfigSourceImpl(PluginConfig plugin_config,
String plugin_id)
|
Method Summary | |
---|---|
void |
configurationSaved()
|
void |
forceSettingsMigration()
If your plugin previously used to store data in the main configuration file, you can call this method (which needs to be done soon after initialization) which will move all monitored parameters over to this object. |
File |
getConfigFile()
Returns a file object which represents the location of the configuration file that this object interacts with. |
String |
getUsedKeyPrefix()
|
void |
initialize()
This initializes this configuration object and gets the external configuration file integrated with Azureus. |
void |
parameterChanged(String full_param)
Called, when a parameter has changed. |
void |
registerParameter(String full_param)
|
void |
save(boolean force)
Manually saves the configuration settings recorded by this object to disk. |
void |
setConfigFilename(String filename)
This method sets the filename for the configuration file that this object links to - this must be done before the PluginConfigSource.initialize()
method is called. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PluginConfigSourceImpl(PluginConfig plugin_config, String plugin_id)
Method Detail |
---|
public void initialize()
PluginConfigSource
It performs the following steps:
initialize
in interface PluginConfigSource
public File getConfigFile()
PluginConfigSource
getConfigFile
in interface PluginConfigSource
public void setConfigFilename(String filename)
PluginConfigSource
PluginConfigSource.initialize()
method is called.
setConfigFilename
in interface PluginConfigSource
filename
- The filename to use.public void save(boolean force)
PluginConfigSource
save
in interface PluginConfigSource
force
- true if you want the file to be written to
regardless of whether there are any changes, false if
you only want to save the file if there are unsaved changes.public void configurationSaved()
configurationSaved
in interface COConfigurationListener
public void parameterChanged(String full_param)
ParameterListener
parameterChanged
in interface ParameterListener
full_param
- the name of the parameter that has changedpublic void registerParameter(String full_param)
public String getUsedKeyPrefix()
public void forceSettingsMigration()
PluginConfigSource
You have to call this method before you initialize the object. It's also
recommended that if you call this method, that you call PluginConfigSource.save(boolean)
to save any settings copied across - probably best to be done as the last thing
of the Plugin.initialize(PluginInterface)
method.
forceSettingsMigration
in interface PluginConfigSource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |