org.gudy.azureus2.pluginsimpl.remote
Class RPPluginConfig

java.lang.Object
  extended by org.gudy.azureus2.pluginsimpl.remote.RPObject
      extended by org.gudy.azureus2.pluginsimpl.remote.RPPluginConfig
All Implemented Interfaces:
java.io.Serializable, PluginConfig

public class RPPluginConfig
extends RPObject
implements PluginConfig

See Also:
Serialized Form

Field Summary
 java.lang.String[] cached_property_names
           
 java.lang.Object[] cached_property_values
           
protected  PluginConfig delegate
           
protected  java.util.Properties property_cache
           
 
Fields inherited from class org.gudy.azureus2.pluginsimpl.remote.RPObject
__delegate, _dispatcher, _object_id, next_key, object_registry, object_registry_reverse
 
Fields inherited from interface org.gudy.azureus2.plugins.PluginConfig
CORE_PARAM_BOOLEAN_AUTO_SPEED_ON, CORE_PARAM_BOOLEAN_AUTO_SPEED_SEEDING_ON, CORE_PARAM_BOOLEAN_FRIENDLY_HASH_CHECKING, CORE_PARAM_BOOLEAN_MAX_ACTIVE_SEEDING, CORE_PARAM_BOOLEAN_MAX_UPLOAD_SPEED_SEEDING, CORE_PARAM_BOOLEAN_NEW_SEEDS_START_AT_TOP, CORE_PARAM_BOOLEAN_NEW_TORRENTS_START_AS_STOPPED, CORE_PARAM_BOOLEAN_SOCKS_PROXY_NO_INWARD_CONNECTION, CORE_PARAM_INT_INCOMING_TCP_PORT, CORE_PARAM_INT_INCOMING_UDP_PORT, CORE_PARAM_INT_MAX_ACTIVE, CORE_PARAM_INT_MAX_ACTIVE_SEEDING, CORE_PARAM_INT_MAX_CONNECTIONS_GLOBAL, CORE_PARAM_INT_MAX_CONNECTIONS_PER_TORRENT, CORE_PARAM_INT_MAX_DOWNLOAD_SPEED_KBYTES_PER_SEC, CORE_PARAM_INT_MAX_DOWNLOADS, CORE_PARAM_INT_MAX_UPLOAD_SPEED_KBYTES_PER_SEC, CORE_PARAM_INT_MAX_UPLOAD_SPEED_SEEDING_KBYTES_PER_SEC, CORE_PARAM_INT_MAX_UPLOADS, CORE_PARAM_INT_MAX_UPLOADS_SEEDING, CORE_PARAM_STRING_DEFAULT_SAVE_PATH, CORE_PARAM_STRING_LOCAL_BIND_IP, GUI_PARAM_INT_SWT_REFRESH_IN_MS
 
Constructor Summary
protected RPPluginConfig(PluginConfig _delegate)
           
 
Method Summary
 RPReply _process(RPRequest request)
           
protected  void _setDelegate(java.lang.Object _delegate)
           
 java.lang.Object _setLocal()
           
 void _setRemote(RPRequestDispatcher _dispatcher)
           
 void addListener(PluginConfigListener l)
           
static PluginConfig create(PluginConfig _delegate)
           
 PluginConfigSource enableExternalConfigSource()
          Enable the plugin to store configuration parameters into a separate external configuration file.
 boolean getBooleanParameter(java.lang.String key)
          Returns the value of a core boolean parameter.
 boolean getBooleanParameter(java.lang.String key, boolean _default)
          Returns the value of a core boolean parameter.
 byte[] getByteParameter(java.lang.String key)
          Returns the value of a core byte array parameter.
 byte[] getByteParameter(java.lang.String name, byte[] _default)
          Returns the value of a core byte array parameter.
 boolean getCoreBooleanParameter(java.lang.String key)
          Returns the value of a core boolean parameter.
 boolean getCoreBooleanParameter(java.lang.String key, boolean default_value)
          Returns the value of a core boolean parameter.
 byte[] getCoreByteParameter(java.lang.String key)
          Returns the value of a core byte array parameter.
 byte[] getCoreByteParameter(java.lang.String key, byte[] default_value)
          Returns the value of a core byte array parameter.
 int[] getCoreColorParameter(java.lang.String key)
          Returns the value of a core color parameter.
 int[] getCoreColorParameter(java.lang.String key, int[] default_value)
          Returns the value of a core color parameter.
 float getCoreFloatParameter(java.lang.String key)
          Returns the value of a core float parameter.
 float getCoreFloatParameter(java.lang.String key, float default_value)
          Returns the value of a core float parameter.
 int getCoreIntParameter(java.lang.String key)
          Returns the value of a core int parameter.
 int getCoreIntParameter(java.lang.String key, int default_value)
          Returns the value of a core int parameter.
 long getCoreLongParameter(java.lang.String key)
          Returns the value of a core long parameter.
 long getCoreLongParameter(java.lang.String key, long default_value)
          Returns the value of a core long parameter.
 java.lang.String getCoreStringParameter(java.lang.String key)
          Returns the value of a core string parameter.
 java.lang.String getCoreStringParameter(java.lang.String key, java.lang.String default_value)
          Returns the value of a core string parameter.
 float getFloatParameter(java.lang.String key)
          Returns the value of a core float parameter.
 float getFloatParameter(java.lang.String key, float default_value)
          Returns the value of a core float parameter.
 int getIntParameter(java.lang.String key)
          Returns the value of a core int parameter.
 int getIntParameter(java.lang.String key, int default_value)
          Returns the value of a core int parameter.
 long getLongParameter(java.lang.String key)
          Returns the value of a core long parameter.
 long getLongParameter(java.lang.String key, long default_value)
          Returns the value of a core long parameter.
 ConfigParameter getParameter(java.lang.String key)
           
 boolean getPluginBooleanParameter(java.lang.String key)
          Returns the value of a plugin boolean parameter.
 boolean getPluginBooleanParameter(java.lang.String key, boolean defaultValue)
          Returns the value of a plugin boolean parameter.
 byte[] getPluginByteParameter(java.lang.String key)
          Returns the value of a plugin byte array parameter.
 byte[] getPluginByteParameter(java.lang.String key, byte[] defaultValue)
          Returns the value of a plugin byte array parameter.
 int[] getPluginColorParameter(java.lang.String key)
          Returns the value of a plugin color parameter.
 int[] getPluginColorParameter(java.lang.String key, int[] default_value)
          Returns the value of a plugin color parameter.
 int[] getPluginColorParameter(java.lang.String key, int[] default_value, boolean override)
           
 java.lang.String getPluginConfigKeyPrefix()
           
 PluginConfigSource getPluginConfigSource()
          Returns the PluginConfigSource object used for this plugin configuration (or null if an external configuration object isn't used).
 float getPluginFloatParameter(java.lang.String key)
          Returns the value of a plugin float parameter.
 float getPluginFloatParameter(java.lang.String key, float default_value)
          Returns the value of a plugin float parameter.
 int getPluginIntParameter(java.lang.String key)
          Returns the value of a plugin int parameter.
 int getPluginIntParameter(java.lang.String key, int defaultValue)
          Returns the value of a plugin int parameter.
 java.util.List getPluginListParameter(java.lang.String key, java.util.List default_value)
          Returns the value of a plugin list parameter.
 long getPluginLongParameter(java.lang.String key)
          Returns the value of a plugin long parameter.
 long getPluginLongParameter(java.lang.String key, long default_value)
          Returns the value of a plugin long parameter.
 java.util.Map getPluginMapParameter(java.lang.String key, java.util.Map default_value)
          Returns the value of a plugin map parameter.
 ConfigParameter getPluginParameter(java.lang.String key)
           
 java.lang.String[] getPluginStringListParameter(java.lang.String key)
          Returns the value of a plugin string-list parameter.
 java.lang.String getPluginStringParameter(java.lang.String key)
          Returns the value of a plugin string parameter.
 java.lang.String getPluginStringParameter(java.lang.String key, java.lang.String defaultValue)
          Returns the value of a plugin string parameter.
 java.io.File getPluginUserFile(java.lang.String name)
          Returns a file that can be used by the plugin to save user-specific state.
 java.lang.String getStringParameter(java.lang.String key)
          Returns the value of a core string parameter.
 java.lang.String getStringParameter(java.lang.String name, java.lang.String _default)
          Returns the value of a core string parameter.
 boolean getUnsafeBooleanParameter(java.lang.String key)
          Returns the value of a core boolean parameter.
 boolean getUnsafeBooleanParameter(java.lang.String key, boolean default_value)
          Returns the value of a core boolean parameter.
 byte[] getUnsafeByteParameter(java.lang.String key)
          Returns the value of a core byte array parameter.
 byte[] getUnsafeByteParameter(java.lang.String key, byte[] default_value)
          Returns the value of a core byte array parameter.
 int[] getUnsafeColorParameter(java.lang.String key)
          Returns the value of a core color parameter.
 int[] getUnsafeColorParameter(java.lang.String key, int[] default_value)
          Returns the value of a core color parameter.
 float getUnsafeFloatParameter(java.lang.String key)
          Returns the value of a core float parameter.
 float getUnsafeFloatParameter(java.lang.String key, float default_value)
          Returns the value of a core float parameter.
 int getUnsafeIntParameter(java.lang.String key)
          Returns the value of a core int parameter.
 int getUnsafeIntParameter(java.lang.String key, int default_value)
          Returns the value of a core int parameter.
 long getUnsafeLongParameter(java.lang.String key)
          Returns the value of a core long parameter.
 long getUnsafeLongParameter(java.lang.String key, long default_value)
          Returns the value of a core long parameter.
 java.util.Map getUnsafeParameterList()
          Returns a map giving parameter names -> parameter values.
 java.lang.String getUnsafeStringParameter(java.lang.String key)
          Returns the value of a core string parameter.
 java.lang.String getUnsafeStringParameter(java.lang.String key, java.lang.String default_value)
          Returns the value of a core string parameter.
 boolean hasParameter(java.lang.String x)
          Returns true if a core parameter with the given name exists.
 boolean hasPluginParameter(java.lang.String x)
          Returns true if a plugin parameter with the given name exists.
 boolean isNewInstall()
           
 boolean removePluginColorParameter(java.lang.String x)
          Removes the plugin color parameter with the given name.
 boolean removePluginParameter(java.lang.String x)
          Removes the plugin parameter with the given name.
 void save()
          make sure you save it after making changes!
 void setBooleanParameter(java.lang.String key, boolean value)
          Sets the value of a core boolean parameter.
 void setByteParameter(java.lang.String key, byte[] value)
          Sets the value of a core byte array parameter.
 void setCoreBooleanParameter(java.lang.String key, boolean value)
          Sets the value of a core boolean parameter.
 void setCoreByteParameter(java.lang.String key, byte[] value)
          Sets the value of a core byte array parameter.
 void setCoreColorParameter(java.lang.String key, int[] value)
          Sets the value of a core byte array parameter.
 void setCoreColorParameter(java.lang.String key, int[] value, boolean override)
          Sets the value of a core byte array parameter.
 void setCoreFloatParameter(java.lang.String key, float value)
          Sets the value of a core float parameter.
 void setCoreIntParameter(java.lang.String key, int value)
          Sets the value of a core int parameter.
 void setCoreLongParameter(java.lang.String key, long value)
          Sets the value of a core long parameter.
 void setCoreStringParameter(java.lang.String key, java.lang.String value)
          Sets the value of a core string parameter.
 void setFloatParameter(java.lang.String key, float value)
          Sets the value of a core float parameter.
 void setIntParameter(java.lang.String key, int value)
          Sets the value of a core int parameter.
 void setLongParameter(java.lang.String key, long value)
          Sets the value of a core long parameter.
 void setPluginColorParameter(java.lang.String key, int[] value)
          Sets the value of a plugin color parameter.
 void setPluginColorParameter(java.lang.String key, int[] value, boolean override)
          Sets the value of a plugin color parameter.
 void setPluginConfigKeyPrefix(java.lang.String _key)
           
 void setPluginConfigSource(PluginConfigSource source)
          Sets the plugin configuration source object to use for storing parameters for this plugin config object.
 void setPluginListParameter(java.lang.String key, java.util.List value)
          Sets the value of a plugin list parameter.
 void setPluginMapParameter(java.lang.String key, java.util.Map value)
          Sets the value of a plugin map parameter.
 void setPluginParameter(java.lang.String key, boolean value)
          Sets the value of a plugin boolean parameter.
 void setPluginParameter(java.lang.String key, byte[] value)
          Sets the value of a plugin byte array parameter.
 void setPluginParameter(java.lang.String key, float value)
          Sets the value of a plugin float parameter.
 void setPluginParameter(java.lang.String key, int value)
          Sets the value of a plugin int parameter.
 void setPluginParameter(java.lang.String key, int value, boolean global)
          Sets the value of a plugin int parameter.
 void setPluginParameter(java.lang.String key, long value)
          Sets the value of a plugin long parameter.
 void setPluginParameter(java.lang.String key, java.lang.String value)
          Sets the value of a plugin string parameter.
 void setPluginStringListParameter(java.lang.String key, java.lang.String[] value)
          Sets the value of a plugin string-list parameter.
 void setStringParameter(java.lang.String key, java.lang.String value)
          Sets the value of a core string parameter.
 void setUnsafeBooleanParameter(java.lang.String key, boolean value)
          Sets the value of a core boolean parameter.
 void setUnsafeByteParameter(java.lang.String key, byte[] value)
          Sets the value of a core byte array parameter.
 void setUnsafeColorParameter(java.lang.String key, int[] default_value)
          Returns the value of a core color parameter.
 void setUnsafeColorParameter(java.lang.String key, int[] default_value, boolean override)
          Returns the value of a core color parameter.
 void setUnsafeFloatParameter(java.lang.String key, float value)
          Sets the value of a core float parameter.
 void setUnsafeIntParameter(java.lang.String key, int value)
          Sets the value of a core int parameter.
 void setUnsafeLongParameter(java.lang.String key, long value)
          Sets the value of a core long parameter.
 void setUnsafeStringParameter(java.lang.String key, java.lang.String value)
          Sets the value of a core string parameter.
 
Methods inherited from class org.gudy.azureus2.pluginsimpl.remote.RPObject
_fixupLocal, _getDelegate, _getName, _getOID, _lookupLocal, _lookupLocal, _refresh, getDispatcher, notSupported, notSupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delegate

protected transient PluginConfig delegate

property_cache

protected transient java.util.Properties property_cache

cached_property_names

public java.lang.String[] cached_property_names

cached_property_values

public java.lang.Object[] cached_property_values
Constructor Detail

RPPluginConfig

protected RPPluginConfig(PluginConfig _delegate)
Method Detail

create

public static PluginConfig create(PluginConfig _delegate)

_setDelegate

protected void _setDelegate(java.lang.Object _delegate)
Overrides:
_setDelegate in class RPObject

_setLocal

public java.lang.Object _setLocal()
                           throws RPException
Overrides:
_setLocal in class RPObject
Throws:
RPException

_setRemote

public void _setRemote(RPRequestDispatcher _dispatcher)
Overrides:
_setRemote in class RPObject

_process

public RPReply _process(RPRequest request)
Overrides:
_process in class RPObject

isNewInstall

public boolean isNewInstall()
Specified by:
isNewInstall in interface PluginConfig

getPluginConfigKeyPrefix

public java.lang.String getPluginConfigKeyPrefix()
Specified by:
getPluginConfigKeyPrefix in interface PluginConfig
Returns:
the prefix used when storing configuration values in the config file for this plugin's config parameters

getFloatParameter

public float getFloatParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core float parameter.

Specified by:
getFloatParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getIntParameter

public int getIntParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core int parameter.

Specified by:
getIntParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getIntParameter

public int getIntParameter(java.lang.String key,
                           int default_value)
Description copied from interface: PluginConfig
Returns the value of a core int parameter.

Specified by:
getIntParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

setIntParameter

public void setIntParameter(java.lang.String key,
                            int value)
Description copied from interface: PluginConfig
Sets the value of a core int parameter.

Specified by:
setIntParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.

getStringParameter

public java.lang.String getStringParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core string parameter.

Specified by:
getStringParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getStringParameter

public java.lang.String getStringParameter(java.lang.String name,
                                           java.lang.String _default)
Description copied from interface: PluginConfig
Returns the value of a core string parameter.

Specified by:
getStringParameter in interface PluginConfig
Parameters:
name - The parameter name.
_default - The default value to return if one is not defined.
Returns:
The value of the parameter.

getBooleanParameter

public boolean getBooleanParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core boolean parameter.

Specified by:
getBooleanParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getBooleanParameter

public boolean getBooleanParameter(java.lang.String key,
                                   boolean _default)
Description copied from interface: PluginConfig
Returns the value of a core boolean parameter.

Specified by:
getBooleanParameter in interface PluginConfig
Parameters:
key - The parameter name.
_default - The default value to return if one is not defined.
Returns:
The value of the parameter.

setBooleanParameter

public void setBooleanParameter(java.lang.String key,
                                boolean value)
Description copied from interface: PluginConfig
Sets the value of a core boolean parameter.

Specified by:
setBooleanParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.

getByteParameter

public byte[] getByteParameter(java.lang.String name,
                               byte[] _default)
Description copied from interface: PluginConfig
Returns the value of a core byte array parameter.

Specified by:
getByteParameter in interface PluginConfig
Parameters:
name - The parameter name.
_default - The default value to return if one is not defined.
Returns:
The value of the parameter.

getPluginListParameter

public java.util.List getPluginListParameter(java.lang.String key,
                                             java.util.List default_value)
Description copied from interface: PluginConfig
Returns the value of a plugin list parameter. The contents of the list must conform to bencodable rules (e.g. Map, Long, byte[], List)

Specified by:
getPluginListParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

setPluginListParameter

public void setPluginListParameter(java.lang.String key,
                                   java.util.List value)
Description copied from interface: PluginConfig
Sets the value of a plugin list parameter. The contents of the list must conform to bencodable rules (e.g. Map, Long, byte[], List)

Specified by:
setPluginListParameter in interface PluginConfig
Parameters:
key - The parameter name.
value - The new value for the parameter.

getPluginMapParameter

public java.util.Map getPluginMapParameter(java.lang.String key,
                                           java.util.Map default_value)
Description copied from interface: PluginConfig
Returns the value of a plugin map parameter. The contents of the map must conform to bencodable rules (e.g. Map, Long, byte[], List)

Specified by:
getPluginMapParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

setPluginMapParameter

public void setPluginMapParameter(java.lang.String key,
                                  java.util.Map value)
Description copied from interface: PluginConfig
Sets the value of a plugin map parameter. The contents of the map must conform to bencodable rules (e.g. Map, Long, byte[], List)

Specified by:
setPluginMapParameter in interface PluginConfig
Parameters:
key - The parameter name.
value - The new value for the parameter.

getPluginIntParameter

public int getPluginIntParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a plugin int parameter.

Specified by:
getPluginIntParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getPluginIntParameter

public int getPluginIntParameter(java.lang.String key,
                                 int defaultValue)
Description copied from interface: PluginConfig
Returns the value of a plugin int parameter.

Specified by:
getPluginIntParameter in interface PluginConfig
Parameters:
key - The parameter name.
defaultValue - The default value to return if one is not defined.
Returns:
The value of the parameter.

getPluginStringParameter

public java.lang.String getPluginStringParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a plugin string parameter.

Specified by:
getPluginStringParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getPluginStringParameter

public java.lang.String getPluginStringParameter(java.lang.String key,
                                                 java.lang.String defaultValue)
Description copied from interface: PluginConfig
Returns the value of a plugin string parameter.

Specified by:
getPluginStringParameter in interface PluginConfig
Parameters:
key - The parameter name.
defaultValue - The default value to return if one is not defined.
Returns:
The value of the parameter.

getPluginBooleanParameter

public boolean getPluginBooleanParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a plugin boolean parameter.

Specified by:
getPluginBooleanParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getPluginByteParameter

public byte[] getPluginByteParameter(java.lang.String key,
                                     byte[] defaultValue)
Description copied from interface: PluginConfig
Returns the value of a plugin byte array parameter.

Specified by:
getPluginByteParameter in interface PluginConfig
Parameters:
key - The parameter name.
defaultValue - The default value to return if one is not defined.
Returns:
The value of the parameter.

getPluginBooleanParameter

public boolean getPluginBooleanParameter(java.lang.String key,
                                         boolean defaultValue)
Description copied from interface: PluginConfig
Returns the value of a plugin boolean parameter.

Specified by:
getPluginBooleanParameter in interface PluginConfig
Parameters:
key - The parameter name.
defaultValue - The default value to return if one is not defined.
Returns:
The value of the parameter.

setPluginParameter

public void setPluginParameter(java.lang.String key,
                               int value)
Description copied from interface: PluginConfig
Sets the value of a plugin int parameter.

Specified by:
setPluginParameter in interface PluginConfig
Parameters:
key - The parameter name.
value - The new value for the parameter.

setPluginParameter

public void setPluginParameter(java.lang.String key,
                               int value,
                               boolean global)
Description copied from interface: PluginConfig
Sets the value of a plugin int parameter.

Specified by:
setPluginParameter in interface PluginConfig
Parameters:
key - The parameter name.
value - The new value for the parameter.
global - Whether or not this parameter should be made externally accessible.

setPluginParameter

public void setPluginParameter(java.lang.String key,
                               java.lang.String value)
Description copied from interface: PluginConfig
Sets the value of a plugin string parameter.

Specified by:
setPluginParameter in interface PluginConfig
Parameters:
key - The parameter name.
value - The new value for the parameter.

setPluginParameter

public void setPluginParameter(java.lang.String key,
                               boolean value)
Description copied from interface: PluginConfig
Sets the value of a plugin boolean parameter.

Specified by:
setPluginParameter in interface PluginConfig
Parameters:
key - The parameter name.
value - The new value for the parameter.

setPluginParameter

public void setPluginParameter(java.lang.String key,
                               byte[] value)
Description copied from interface: PluginConfig
Sets the value of a plugin byte array parameter.

Specified by:
setPluginParameter in interface PluginConfig
Parameters:
key - The parameter name.
value - The new value for the parameter.

getParameter

public ConfigParameter getParameter(java.lang.String key)
Specified by:
getParameter in interface PluginConfig

getPluginParameter

public ConfigParameter getPluginParameter(java.lang.String key)
Specified by:
getPluginParameter in interface PluginConfig

getUnsafeBooleanParameter

public boolean getUnsafeBooleanParameter(java.lang.String key,
                                         boolean default_value)
Description copied from interface: PluginConfig
Returns the value of a core boolean parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

Specified by:
getUnsafeBooleanParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

setUnsafeBooleanParameter

public void setUnsafeBooleanParameter(java.lang.String key,
                                      boolean value)
Description copied from interface: PluginConfig
Sets the value of a core boolean parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

Specified by:
setUnsafeBooleanParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.

getUnsafeIntParameter

public int getUnsafeIntParameter(java.lang.String key,
                                 int default_value)
Description copied from interface: PluginConfig
Returns the value of a core int parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

Specified by:
getUnsafeIntParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

setUnsafeIntParameter

public void setUnsafeIntParameter(java.lang.String key,
                                  int value)
Description copied from interface: PluginConfig
Sets the value of a core int parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

Specified by:
setUnsafeIntParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.

getUnsafeLongParameter

public long getUnsafeLongParameter(java.lang.String key,
                                   long default_value)
Description copied from interface: PluginConfig
Returns the value of a core long parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

Specified by:
getUnsafeLongParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

setUnsafeLongParameter

public void setUnsafeLongParameter(java.lang.String key,
                                   long value)
Description copied from interface: PluginConfig
Sets the value of a core long parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

Specified by:
setUnsafeLongParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.

getUnsafeFloatParameter

public float getUnsafeFloatParameter(java.lang.String key,
                                     float default_value)
Description copied from interface: PluginConfig
Returns the value of a core float parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

Specified by:
getUnsafeFloatParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

setUnsafeFloatParameter

public void setUnsafeFloatParameter(java.lang.String key,
                                    float value)
Description copied from interface: PluginConfig
Sets the value of a core float parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

Specified by:
setUnsafeFloatParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.

getUnsafeStringParameter

public java.lang.String getUnsafeStringParameter(java.lang.String key,
                                                 java.lang.String default_value)
Description copied from interface: PluginConfig
Returns the value of a core string parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

Specified by:
getUnsafeStringParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

setUnsafeStringParameter

public void setUnsafeStringParameter(java.lang.String key,
                                     java.lang.String value)
Description copied from interface: PluginConfig
Sets the value of a core string parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

Specified by:
setUnsafeStringParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.

getUnsafeParameterList

public java.util.Map getUnsafeParameterList()
Description copied from interface: PluginConfig
Returns a map giving parameter names -> parameter values. Value can be Long or String as the type is actually not known by the core (might fix one day). Therefore, float values are actually represented by their String format: boolean - Long 0 or 1 int - Long.intValue float - String value String - String Unsafe methods - existence/semantics of parameters not guaranteed to be maintained across versions If something changes and breaks your plugin, don't come complaining to me

Specified by:
getUnsafeParameterList in interface PluginConfig

save

public void save()
          throws PluginException
Description copied from interface: PluginConfig
make sure you save it after making changes!

Specified by:
save in interface PluginConfig
Throws:
PluginException

getPluginUserFile

public java.io.File getPluginUserFile(java.lang.String name)
Description copied from interface: PluginConfig
Returns a file that can be used by the plugin to save user-specific state.

This will be azureus-user-dir/plugins/plugin-name/name.

Specified by:
getPluginUserFile in interface PluginConfig
Returns:

addListener

public void addListener(PluginConfigListener l)
Specified by:
addListener in interface PluginConfig

setPluginConfigKeyPrefix

public void setPluginConfigKeyPrefix(java.lang.String _key)
Specified by:
setPluginConfigKeyPrefix in interface PluginConfig

hasParameter

public boolean hasParameter(java.lang.String x)
Description copied from interface: PluginConfig
Returns true if a core parameter with the given name exists.

Specified by:
hasParameter in interface PluginConfig

hasPluginParameter

public boolean hasPluginParameter(java.lang.String x)
Description copied from interface: PluginConfig
Returns true if a plugin parameter with the given name exists.

Specified by:
hasPluginParameter in interface PluginConfig

removePluginParameter

public boolean removePluginParameter(java.lang.String x)
Description copied from interface: PluginConfig
Removes the plugin parameter with the given name.

Specified by:
removePluginParameter in interface PluginConfig
Parameters:
x - Name of the parameter.
Returns:
true if the parameter was found and removed.

removePluginColorParameter

public boolean removePluginColorParameter(java.lang.String x)
Description copied from interface: PluginConfig
Removes the plugin color parameter with the given name.

Specified by:
removePluginColorParameter in interface PluginConfig
Parameters:
x - Name of the parameter.
Returns:
true if the parameter was found and removed.

getByteParameter

public byte[] getByteParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core byte array parameter.

Specified by:
getByteParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getFloatParameter

public float getFloatParameter(java.lang.String key,
                               float default_value)
Description copied from interface: PluginConfig
Returns the value of a core float parameter.

Specified by:
getFloatParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

getLongParameter

public long getLongParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core long parameter.

Specified by:
getLongParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getLongParameter

public long getLongParameter(java.lang.String key,
                             long default_value)
Description copied from interface: PluginConfig
Returns the value of a core long parameter.

Specified by:
getLongParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

setByteParameter

public void setByteParameter(java.lang.String key,
                             byte[] value)
Description copied from interface: PluginConfig
Sets the value of a core byte array parameter.

Specified by:
setByteParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.

setFloatParameter

public void setFloatParameter(java.lang.String key,
                              float value)
Description copied from interface: PluginConfig
Sets the value of a core float parameter.

Specified by:
setFloatParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.

setLongParameter

public void setLongParameter(java.lang.String key,
                             long value)
Description copied from interface: PluginConfig
Sets the value of a core long parameter.

Specified by:
setLongParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.

setStringParameter

public void setStringParameter(java.lang.String key,
                               java.lang.String value)
Description copied from interface: PluginConfig
Sets the value of a core string parameter.

Specified by:
setStringParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.

getPluginByteParameter

public byte[] getPluginByteParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a plugin byte array parameter.

Specified by:
getPluginByteParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getPluginFloatParameter

public float getPluginFloatParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a plugin float parameter.

Specified by:
getPluginFloatParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getPluginFloatParameter

public float getPluginFloatParameter(java.lang.String key,
                                     float default_value)
Description copied from interface: PluginConfig
Returns the value of a plugin float parameter.

Specified by:
getPluginFloatParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

getPluginLongParameter

public long getPluginLongParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a plugin long parameter.

Specified by:
getPluginLongParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getPluginLongParameter

public long getPluginLongParameter(java.lang.String key,
                                   long default_value)
Description copied from interface: PluginConfig
Returns the value of a plugin long parameter.

Specified by:
getPluginLongParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

setPluginParameter

public void setPluginParameter(java.lang.String key,
                               float value)
Description copied from interface: PluginConfig
Sets the value of a plugin float parameter.

Specified by:
setPluginParameter in interface PluginConfig
Parameters:
key - The parameter name.
value - The new value for the parameter.

setPluginParameter

public void setPluginParameter(java.lang.String key,
                               long value)
Description copied from interface: PluginConfig
Sets the value of a plugin long parameter.

Specified by:
setPluginParameter in interface PluginConfig
Parameters:
key - The parameter name.
value - The new value for the parameter.

getUnsafeBooleanParameter

public boolean getUnsafeBooleanParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core boolean parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

Specified by:
getUnsafeBooleanParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getUnsafeByteParameter

public byte[] getUnsafeByteParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core byte array parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

Specified by:
getUnsafeByteParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getUnsafeByteParameter

public byte[] getUnsafeByteParameter(java.lang.String key,
                                     byte[] default_value)
Description copied from interface: PluginConfig
Returns the value of a core byte array parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

Specified by:
getUnsafeByteParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

getUnsafeFloatParameter

public float getUnsafeFloatParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core float parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

Specified by:
getUnsafeFloatParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getUnsafeIntParameter

public int getUnsafeIntParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core int parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

Specified by:
getUnsafeIntParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getUnsafeLongParameter

public long getUnsafeLongParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core long parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

Specified by:
getUnsafeLongParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getUnsafeStringParameter

public java.lang.String getUnsafeStringParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core string parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

Specified by:
getUnsafeStringParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

setUnsafeByteParameter

public void setUnsafeByteParameter(java.lang.String key,
                                   byte[] value)
Description copied from interface: PluginConfig
Sets the value of a core byte array parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

Specified by:
setUnsafeByteParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.

getCoreBooleanParameter

public boolean getCoreBooleanParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core boolean parameter.

Specified by:
getCoreBooleanParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getCoreBooleanParameter

public boolean getCoreBooleanParameter(java.lang.String key,
                                       boolean default_value)
Description copied from interface: PluginConfig
Returns the value of a core boolean parameter.

Specified by:
getCoreBooleanParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

getCoreByteParameter

public byte[] getCoreByteParameter(java.lang.String key,
                                   byte[] default_value)
Description copied from interface: PluginConfig
Returns the value of a core byte array parameter.

Specified by:
getCoreByteParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

getCoreByteParameter

public byte[] getCoreByteParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core byte array parameter.

Specified by:
getCoreByteParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getCoreFloatParameter

public float getCoreFloatParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core float parameter.

Specified by:
getCoreFloatParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getCoreFloatParameter

public float getCoreFloatParameter(java.lang.String key,
                                   float default_value)
Description copied from interface: PluginConfig
Returns the value of a core float parameter.

Specified by:
getCoreFloatParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

getCoreIntParameter

public int getCoreIntParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core int parameter.

Specified by:
getCoreIntParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getCoreIntParameter

public int getCoreIntParameter(java.lang.String key,
                               int default_value)
Description copied from interface: PluginConfig
Returns the value of a core int parameter.

Specified by:
getCoreIntParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

getCoreStringParameter

public java.lang.String getCoreStringParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core string parameter.

Specified by:
getCoreStringParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getCoreStringParameter

public java.lang.String getCoreStringParameter(java.lang.String key,
                                               java.lang.String default_value)
Description copied from interface: PluginConfig
Returns the value of a core string parameter.

Specified by:
getCoreStringParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

getCoreLongParameter

public long getCoreLongParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core long parameter.

Specified by:
getCoreLongParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getCoreLongParameter

public long getCoreLongParameter(java.lang.String key,
                                 long default_value)
Description copied from interface: PluginConfig
Returns the value of a core long parameter.

Specified by:
getCoreLongParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

setCoreBooleanParameter

public void setCoreBooleanParameter(java.lang.String key,
                                    boolean value)
Description copied from interface: PluginConfig
Sets the value of a core boolean parameter.

Specified by:
setCoreBooleanParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.

setCoreByteParameter

public void setCoreByteParameter(java.lang.String key,
                                 byte[] value)
Description copied from interface: PluginConfig
Sets the value of a core byte array parameter.

Specified by:
setCoreByteParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.

setCoreFloatParameter

public void setCoreFloatParameter(java.lang.String key,
                                  float value)
Description copied from interface: PluginConfig
Sets the value of a core float parameter.

Specified by:
setCoreFloatParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.

setCoreIntParameter

public void setCoreIntParameter(java.lang.String key,
                                int value)
Description copied from interface: PluginConfig
Sets the value of a core int parameter.

Specified by:
setCoreIntParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.

setCoreLongParameter

public void setCoreLongParameter(java.lang.String key,
                                 long value)
Description copied from interface: PluginConfig
Sets the value of a core long parameter.

Specified by:
setCoreLongParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.

setCoreStringParameter

public void setCoreStringParameter(java.lang.String key,
                                   java.lang.String value)
Description copied from interface: PluginConfig
Sets the value of a core string parameter.

Specified by:
setCoreStringParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.

getCoreColorParameter

public int[] getCoreColorParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core color parameter.

It will return null if no color parameter is stored, or an integer array of size 4 representing the red, green and blue values, and a flag indicating if the color is an override of the default or not (0 indicates no override, 1 means it is overridden).

In many cases, the override flag can just be ignored.

Specified by:
getCoreColorParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getCoreColorParameter

public int[] getCoreColorParameter(java.lang.String key,
                                   int[] default_value)
Description copied from interface: PluginConfig
Returns the value of a core color parameter.

It will return null if no color parameter is stored, or an integer array of size 4 representing the red, green and blue values, and a flag indicating if the color is an override of the default or not (0 indicates no override, 1 means it is overridden).

In many cases, the override flag can just be ignored.

Specified by:
getCoreColorParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

setCoreColorParameter

public void setCoreColorParameter(java.lang.String key,
                                  int[] value)
Description copied from interface: PluginConfig
Sets the value of a core byte array parameter.

The value should be an integer array of size 3 representing the red, green and blue values - or null to disable it.

Specified by:
setCoreColorParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.

setCoreColorParameter

public void setCoreColorParameter(java.lang.String key,
                                  int[] value,
                                  boolean override)
Description copied from interface: PluginConfig
Sets the value of a core byte array parameter.

The value should be an integer array of size 3 representing the red, green and blue values - or null to disable it.

The override flag is used to indicate if the value being set is overriding the default value. This is mainly used for interface purposes.

Specified by:
setCoreColorParameter in interface PluginConfig
Parameters:
key - The parameter name, which must be one defined from the above core constants.
value - The new value for the parameter.
override - true if the value is overridden from the default.

getPluginColorParameter

public int[] getPluginColorParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a plugin color parameter.

It will return null if no color parameter is stored, or an integer array of size 4 representing the red, green and blue values, and a flag indicating if the color is an override of the default or not (0 indicates no override, 1 means it is overridden).

In many cases, the override flag can just be ignored.

Specified by:
getPluginColorParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getPluginColorParameter

public int[] getPluginColorParameter(java.lang.String key,
                                     int[] default_value)
Description copied from interface: PluginConfig
Returns the value of a plugin color parameter.

It will return null if no color parameter is stored, or an integer array of size 4 representing the red, green and blue values, and a flag indicating if the color is an override of the default or not (0 indicates no override, 1 means it is overridden).

In many cases, the override flag can just be ignored.

Specified by:
getPluginColorParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

getPluginColorParameter

public int[] getPluginColorParameter(java.lang.String key,
                                     int[] default_value,
                                     boolean override)

setPluginColorParameter

public void setPluginColorParameter(java.lang.String key,
                                    int[] value)
Description copied from interface: PluginConfig
Sets the value of a plugin color parameter.

The value should be an integer array of size 3 representing the red, green and blue values - or null to disable it.

Specified by:
setPluginColorParameter in interface PluginConfig
Parameters:
key - The parameter name.
value - The new value for the parameter.

setPluginColorParameter

public void setPluginColorParameter(java.lang.String key,
                                    int[] value,
                                    boolean override)
Description copied from interface: PluginConfig
Sets the value of a plugin color parameter.

The value should be an integer array of size 3 representing the red, green and blue values - or null to disable it.

The override flag is used to indicate if the value being set is overriding the default value. This is mainly used for interface purposes.

Specified by:
setPluginColorParameter in interface PluginConfig
Parameters:
key - The parameter name.
value - The new value for the parameter.
override - true if the value is overridden from the default.

getUnsafeColorParameter

public int[] getUnsafeColorParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a core color parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

It will return null if no color parameter is stored, or an integer array of size 4 representing the red, green and blue values, and a flag indicating if the color is an override of the default or not (0 indicates no override, 1 means it is overridden).

In many cases, the override flag can just be ignored.

Specified by:
getUnsafeColorParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.

getUnsafeColorParameter

public int[] getUnsafeColorParameter(java.lang.String key,
                                     int[] default_value)
Description copied from interface: PluginConfig
Returns the value of a core color parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

It will return null if no color parameter is stored, or an integer array of size 4 representing the red, green and blue values, and a flag indicating if the color is an override of the default or not (0 indicates no override, 1 means it is overridden).

In many cases, the override flag can just be ignored.

Specified by:
getUnsafeColorParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
Returns:
The value of the parameter.

setUnsafeColorParameter

public void setUnsafeColorParameter(java.lang.String key,
                                    int[] default_value)
Description copied from interface: PluginConfig
Returns the value of a core color parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

The value should be an integer array of size 3 representing the red, green and blue values - or null to disable it.

Specified by:
setUnsafeColorParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The new value for the parameter.

setUnsafeColorParameter

public void setUnsafeColorParameter(java.lang.String key,
                                    int[] default_value,
                                    boolean override)
Description copied from interface: PluginConfig
Returns the value of a core color parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.

The value should be an integer array of size 3 representing the red, green and blue values - or null to disable it.

The override flag is used to indicate if the value being set is overriding the default value. This is mainly used for interface purposes.

Specified by:
setUnsafeColorParameter in interface PluginConfig
Parameters:
key - The parameter name.
default_value - The default value to return if one is not defined.
override - true if the value is overridden from the default.

getPluginConfigSource

public PluginConfigSource getPluginConfigSource()
Description copied from interface: PluginConfig
Returns the PluginConfigSource object used for this plugin configuration (or null if an external configuration object isn't used).

Specified by:
getPluginConfigSource in interface PluginConfig
Returns:
The PluginConfigSource object.

setPluginConfigSource

public void setPluginConfigSource(PluginConfigSource source)
Description copied from interface: PluginConfig
Sets the plugin configuration source object to use for storing parameters for this plugin config object.

This method should only be used as an alternative to PluginConfig.enableExternalConfigSource(). You will only need to use this method if you use the getLocalPluginInterface method to store data in a separate namespace, but want to use the same configuration file to store data in.

Specified by:
setPluginConfigSource in interface PluginConfig
Parameters:
source - The PluginConfigSource object to use.

enableExternalConfigSource

public PluginConfigSource enableExternalConfigSource()
Description copied from interface: PluginConfig
Enable the plugin to store configuration parameters into a separate external configuration file. Note: once this method is called, you need to invoke PluginConfigSource.initialize() for the external configuration file to be properly integrated with Azureus.

When a plugin is first initialised, it should call this method as soon as possible during the initialization stage. This then configures the PluginConfig object to store any parameter values into an external configuration file (rather than storing it directly with the main configuration file used by Azureus).

When this method is invoked, it will return an object which allows the filename to be chosen - it allows a limited amount of manipulation of the configuration file. This method only needs to be invoked once.

All methods which get and set plugin parameters on this object will store data in the external configuration file. The use of classes like BasicPluginConfigModel will automatically integrate parameters to the external configuration source.

However, if you use any other mechanism to store parameter data, you may need to call the registerParameter to integrate the parameter properly.

Specified by:
enableExternalConfigSource in interface PluginConfig
Returns:
The PluginConfigSource object representing the external configuration file.

setPluginStringListParameter

public void setPluginStringListParameter(java.lang.String key,
                                         java.lang.String[] value)
Description copied from interface: PluginConfig
Sets the value of a plugin string-list parameter.

Specified by:
setPluginStringListParameter in interface PluginConfig
Parameters:
key - The parameter name.
value - The new value of the parameter.

getPluginStringListParameter

public java.lang.String[] getPluginStringListParameter(java.lang.String key)
Description copied from interface: PluginConfig
Returns the value of a plugin string-list parameter. If no value is set, an empty string array will be returned.

Specified by:
getPluginStringListParameter in interface PluginConfig
Parameters:
key - The parameter name.
Returns:
The value of the parameter.