|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.pluginsimpl.remote.RPObject org.gudy.azureus2.pluginsimpl.remote.RPPluginConfig
public class RPPluginConfig
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 |
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 |
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 |
---|
protected transient PluginConfig delegate
protected transient java.util.Properties property_cache
public java.lang.String[] cached_property_names
public java.lang.Object[] cached_property_values
Constructor Detail |
---|
protected RPPluginConfig(PluginConfig _delegate)
Method Detail |
---|
public static PluginConfig create(PluginConfig _delegate)
protected void _setDelegate(java.lang.Object _delegate)
_setDelegate
in class RPObject
public java.lang.Object _setLocal() throws RPException
_setLocal
in class RPObject
RPException
public void _setRemote(RPRequestDispatcher _dispatcher)
_setRemote
in class RPObject
public RPReply _process(RPRequest request)
_process
in class RPObject
public boolean isNewInstall()
isNewInstall
in interface PluginConfig
public java.lang.String getPluginConfigKeyPrefix()
getPluginConfigKeyPrefix
in interface PluginConfig
public float getFloatParameter(java.lang.String key)
PluginConfig
getFloatParameter
in interface PluginConfig
key
- The parameter name.
public int getIntParameter(java.lang.String key)
PluginConfig
getIntParameter
in interface PluginConfig
key
- The parameter name.
public int getIntParameter(java.lang.String key, int default_value)
PluginConfig
getIntParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public void setIntParameter(java.lang.String key, int value)
PluginConfig
setIntParameter
in interface PluginConfig
key
- The parameter name, which must be one defined from the above core constants.value
- The new value for the parameter.public java.lang.String getStringParameter(java.lang.String key)
PluginConfig
getStringParameter
in interface PluginConfig
key
- The parameter name.
public java.lang.String getStringParameter(java.lang.String name, java.lang.String _default)
PluginConfig
getStringParameter
in interface PluginConfig
name
- The parameter name._default
- The default value to return if one is not defined.
public boolean getBooleanParameter(java.lang.String key)
PluginConfig
getBooleanParameter
in interface PluginConfig
key
- The parameter name.
public boolean getBooleanParameter(java.lang.String key, boolean _default)
PluginConfig
getBooleanParameter
in interface PluginConfig
key
- The parameter name._default
- The default value to return if one is not defined.
public void setBooleanParameter(java.lang.String key, boolean value)
PluginConfig
setBooleanParameter
in interface PluginConfig
key
- The parameter name, which must be one defined from the above core constants.value
- The new value for the parameter.public byte[] getByteParameter(java.lang.String name, byte[] _default)
PluginConfig
getByteParameter
in interface PluginConfig
name
- The parameter name._default
- The default value to return if one is not defined.
public java.util.List getPluginListParameter(java.lang.String key, java.util.List default_value)
PluginConfig
getPluginListParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public void setPluginListParameter(java.lang.String key, java.util.List value)
PluginConfig
setPluginListParameter
in interface PluginConfig
key
- The parameter name.value
- The new value for the parameter.public java.util.Map getPluginMapParameter(java.lang.String key, java.util.Map default_value)
PluginConfig
getPluginMapParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public void setPluginMapParameter(java.lang.String key, java.util.Map value)
PluginConfig
setPluginMapParameter
in interface PluginConfig
key
- The parameter name.value
- The new value for the parameter.public int getPluginIntParameter(java.lang.String key)
PluginConfig
getPluginIntParameter
in interface PluginConfig
key
- The parameter name.
public int getPluginIntParameter(java.lang.String key, int defaultValue)
PluginConfig
getPluginIntParameter
in interface PluginConfig
key
- The parameter name.defaultValue
- The default value to return if one is not defined.
public java.lang.String getPluginStringParameter(java.lang.String key)
PluginConfig
getPluginStringParameter
in interface PluginConfig
key
- The parameter name.
public java.lang.String getPluginStringParameter(java.lang.String key, java.lang.String defaultValue)
PluginConfig
getPluginStringParameter
in interface PluginConfig
key
- The parameter name.defaultValue
- The default value to return if one is not defined.
public boolean getPluginBooleanParameter(java.lang.String key)
PluginConfig
getPluginBooleanParameter
in interface PluginConfig
key
- The parameter name.
public byte[] getPluginByteParameter(java.lang.String key, byte[] defaultValue)
PluginConfig
getPluginByteParameter
in interface PluginConfig
key
- The parameter name.defaultValue
- The default value to return if one is not defined.
public boolean getPluginBooleanParameter(java.lang.String key, boolean defaultValue)
PluginConfig
getPluginBooleanParameter
in interface PluginConfig
key
- The parameter name.defaultValue
- The default value to return if one is not defined.
public void setPluginParameter(java.lang.String key, int value)
PluginConfig
setPluginParameter
in interface PluginConfig
key
- The parameter name.value
- The new value for the parameter.public void setPluginParameter(java.lang.String key, int value, boolean global)
PluginConfig
setPluginParameter
in interface PluginConfig
key
- The parameter name.value
- The new value for the parameter.global
- Whether or not this parameter should be made externally accessible.public void setPluginParameter(java.lang.String key, java.lang.String value)
PluginConfig
setPluginParameter
in interface PluginConfig
key
- The parameter name.value
- The new value for the parameter.public void setPluginParameter(java.lang.String key, boolean value)
PluginConfig
setPluginParameter
in interface PluginConfig
key
- The parameter name.value
- The new value for the parameter.public void setPluginParameter(java.lang.String key, byte[] value)
PluginConfig
setPluginParameter
in interface PluginConfig
key
- The parameter name.value
- The new value for the parameter.public ConfigParameter getParameter(java.lang.String key)
getParameter
in interface PluginConfig
public ConfigParameter getPluginParameter(java.lang.String key)
getPluginParameter
in interface PluginConfig
public boolean getUnsafeBooleanParameter(java.lang.String key, boolean default_value)
PluginConfig
getUnsafeBooleanParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public void setUnsafeBooleanParameter(java.lang.String key, boolean value)
PluginConfig
setUnsafeBooleanParameter
in interface PluginConfig
key
- The parameter name, which must be one defined from the above core constants.value
- The new value for the parameter.public int getUnsafeIntParameter(java.lang.String key, int default_value)
PluginConfig
getUnsafeIntParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public void setUnsafeIntParameter(java.lang.String key, int value)
PluginConfig
setUnsafeIntParameter
in interface PluginConfig
key
- The parameter name, which must be one defined from the above core constants.value
- The new value for the parameter.public long getUnsafeLongParameter(java.lang.String key, long default_value)
PluginConfig
getUnsafeLongParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public void setUnsafeLongParameter(java.lang.String key, long value)
PluginConfig
setUnsafeLongParameter
in interface PluginConfig
key
- The parameter name, which must be one defined from the above core constants.value
- The new value for the parameter.public float getUnsafeFloatParameter(java.lang.String key, float default_value)
PluginConfig
getUnsafeFloatParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public void setUnsafeFloatParameter(java.lang.String key, float value)
PluginConfig
setUnsafeFloatParameter
in interface PluginConfig
key
- The parameter name, which must be one defined from the above core constants.value
- The new value for the parameter.public java.lang.String getUnsafeStringParameter(java.lang.String key, java.lang.String default_value)
PluginConfig
getUnsafeStringParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public void setUnsafeStringParameter(java.lang.String key, java.lang.String value)
PluginConfig
setUnsafeStringParameter
in interface PluginConfig
key
- The parameter name, which must be one defined from the above core constants.value
- The new value for the parameter.public java.util.Map getUnsafeParameterList()
PluginConfig
getUnsafeParameterList
in interface PluginConfig
public void save() throws PluginException
PluginConfig
save
in interface PluginConfig
PluginException
public java.io.File getPluginUserFile(java.lang.String name)
PluginConfig
This will be azureus-user-dir/plugins/plugin-name/name.
getPluginUserFile
in interface PluginConfig
public void addListener(PluginConfigListener l)
addListener
in interface PluginConfig
public void setPluginConfigKeyPrefix(java.lang.String _key)
setPluginConfigKeyPrefix
in interface PluginConfig
public boolean hasParameter(java.lang.String x)
PluginConfig
hasParameter
in interface PluginConfig
public boolean hasPluginParameter(java.lang.String x)
PluginConfig
hasPluginParameter
in interface PluginConfig
public boolean removePluginParameter(java.lang.String x)
PluginConfig
removePluginParameter
in interface PluginConfig
x
- Name of the parameter.
public boolean removePluginColorParameter(java.lang.String x)
PluginConfig
removePluginColorParameter
in interface PluginConfig
x
- Name of the parameter.
public byte[] getByteParameter(java.lang.String key)
PluginConfig
getByteParameter
in interface PluginConfig
key
- The parameter name.
public float getFloatParameter(java.lang.String key, float default_value)
PluginConfig
getFloatParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public long getLongParameter(java.lang.String key)
PluginConfig
getLongParameter
in interface PluginConfig
key
- The parameter name.
public long getLongParameter(java.lang.String key, long default_value)
PluginConfig
getLongParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public void setByteParameter(java.lang.String key, byte[] value)
PluginConfig
setByteParameter
in interface PluginConfig
key
- The parameter name, which must be one defined from the above core constants.value
- The new value for the parameter.public void setFloatParameter(java.lang.String key, float value)
PluginConfig
setFloatParameter
in interface PluginConfig
key
- The parameter name, which must be one defined from the above core constants.value
- The new value for the parameter.public void setLongParameter(java.lang.String key, long value)
PluginConfig
setLongParameter
in interface PluginConfig
key
- The parameter name, which must be one defined from the above core constants.value
- The new value for the parameter.public void setStringParameter(java.lang.String key, java.lang.String value)
PluginConfig
setStringParameter
in interface PluginConfig
key
- The parameter name, which must be one defined from the above core constants.value
- The new value for the parameter.public byte[] getPluginByteParameter(java.lang.String key)
PluginConfig
getPluginByteParameter
in interface PluginConfig
key
- The parameter name.
public float getPluginFloatParameter(java.lang.String key)
PluginConfig
getPluginFloatParameter
in interface PluginConfig
key
- The parameter name.
public float getPluginFloatParameter(java.lang.String key, float default_value)
PluginConfig
getPluginFloatParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public long getPluginLongParameter(java.lang.String key)
PluginConfig
getPluginLongParameter
in interface PluginConfig
key
- The parameter name.
public long getPluginLongParameter(java.lang.String key, long default_value)
PluginConfig
getPluginLongParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public void setPluginParameter(java.lang.String key, float value)
PluginConfig
setPluginParameter
in interface PluginConfig
key
- The parameter name.value
- The new value for the parameter.public void setPluginParameter(java.lang.String key, long value)
PluginConfig
setPluginParameter
in interface PluginConfig
key
- The parameter name.value
- The new value for the parameter.public boolean getUnsafeBooleanParameter(java.lang.String key)
PluginConfig
getUnsafeBooleanParameter
in interface PluginConfig
key
- The parameter name.
public byte[] getUnsafeByteParameter(java.lang.String key)
PluginConfig
getUnsafeByteParameter
in interface PluginConfig
key
- The parameter name.
public byte[] getUnsafeByteParameter(java.lang.String key, byte[] default_value)
PluginConfig
getUnsafeByteParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public float getUnsafeFloatParameter(java.lang.String key)
PluginConfig
getUnsafeFloatParameter
in interface PluginConfig
key
- The parameter name.
public int getUnsafeIntParameter(java.lang.String key)
PluginConfig
getUnsafeIntParameter
in interface PluginConfig
key
- The parameter name.
public long getUnsafeLongParameter(java.lang.String key)
PluginConfig
getUnsafeLongParameter
in interface PluginConfig
key
- The parameter name.
public java.lang.String getUnsafeStringParameter(java.lang.String key)
PluginConfig
getUnsafeStringParameter
in interface PluginConfig
key
- The parameter name.
public void setUnsafeByteParameter(java.lang.String key, byte[] value)
PluginConfig
setUnsafeByteParameter
in interface PluginConfig
key
- The parameter name, which must be one defined from the above core constants.value
- The new value for the parameter.public boolean getCoreBooleanParameter(java.lang.String key)
PluginConfig
getCoreBooleanParameter
in interface PluginConfig
key
- The parameter name.
public boolean getCoreBooleanParameter(java.lang.String key, boolean default_value)
PluginConfig
getCoreBooleanParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public byte[] getCoreByteParameter(java.lang.String key, byte[] default_value)
PluginConfig
getCoreByteParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public byte[] getCoreByteParameter(java.lang.String key)
PluginConfig
getCoreByteParameter
in interface PluginConfig
key
- The parameter name.
public float getCoreFloatParameter(java.lang.String key)
PluginConfig
getCoreFloatParameter
in interface PluginConfig
key
- The parameter name.
public float getCoreFloatParameter(java.lang.String key, float default_value)
PluginConfig
getCoreFloatParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public int getCoreIntParameter(java.lang.String key)
PluginConfig
getCoreIntParameter
in interface PluginConfig
key
- The parameter name.
public int getCoreIntParameter(java.lang.String key, int default_value)
PluginConfig
getCoreIntParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public java.lang.String getCoreStringParameter(java.lang.String key)
PluginConfig
getCoreStringParameter
in interface PluginConfig
key
- The parameter name.
public java.lang.String getCoreStringParameter(java.lang.String key, java.lang.String default_value)
PluginConfig
getCoreStringParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public long getCoreLongParameter(java.lang.String key)
PluginConfig
getCoreLongParameter
in interface PluginConfig
key
- The parameter name.
public long getCoreLongParameter(java.lang.String key, long default_value)
PluginConfig
getCoreLongParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public void setCoreBooleanParameter(java.lang.String key, boolean value)
PluginConfig
setCoreBooleanParameter
in interface PluginConfig
key
- The parameter name, which must be one defined from the above core constants.value
- The new value for the parameter.public void setCoreByteParameter(java.lang.String key, byte[] value)
PluginConfig
setCoreByteParameter
in interface PluginConfig
key
- The parameter name, which must be one defined from the above core constants.value
- The new value for the parameter.public void setCoreFloatParameter(java.lang.String key, float value)
PluginConfig
setCoreFloatParameter
in interface PluginConfig
key
- The parameter name, which must be one defined from the above core constants.value
- The new value for the parameter.public void setCoreIntParameter(java.lang.String key, int value)
PluginConfig
setCoreIntParameter
in interface PluginConfig
key
- The parameter name, which must be one defined from the above core constants.value
- The new value for the parameter.public void setCoreLongParameter(java.lang.String key, long value)
PluginConfig
setCoreLongParameter
in interface PluginConfig
key
- The parameter name, which must be one defined from the above core constants.value
- The new value for the parameter.public void setCoreStringParameter(java.lang.String key, java.lang.String value)
PluginConfig
setCoreStringParameter
in interface PluginConfig
key
- The parameter name, which must be one defined from the above core constants.value
- The new value for the parameter.public int[] getCoreColorParameter(java.lang.String key)
PluginConfig
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.
getCoreColorParameter
in interface PluginConfig
key
- The parameter name.
public int[] getCoreColorParameter(java.lang.String key, int[] default_value)
PluginConfig
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.
getCoreColorParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public void setCoreColorParameter(java.lang.String key, int[] value)
PluginConfig
The value should be an integer array of size 3 representing the red, green and blue values - or null to disable it.
setCoreColorParameter
in interface PluginConfig
key
- The parameter name, which must be one defined from the above core constants.value
- The new value for the parameter.public void setCoreColorParameter(java.lang.String key, int[] value, boolean override)
PluginConfig
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.
setCoreColorParameter
in interface PluginConfig
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.public int[] getPluginColorParameter(java.lang.String key)
PluginConfig
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.
getPluginColorParameter
in interface PluginConfig
key
- The parameter name.
public int[] getPluginColorParameter(java.lang.String key, int[] default_value)
PluginConfig
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.
getPluginColorParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public int[] getPluginColorParameter(java.lang.String key, int[] default_value, boolean override)
public void setPluginColorParameter(java.lang.String key, int[] value)
PluginConfig
The value should be an integer array of size 3 representing the red, green and blue values - or null to disable it.
setPluginColorParameter
in interface PluginConfig
key
- The parameter name.value
- The new value for the parameter.public void setPluginColorParameter(java.lang.String key, int[] value, boolean override)
PluginConfig
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.
setPluginColorParameter
in interface PluginConfig
key
- The parameter name.value
- The new value for the parameter.override
- true if the value is overridden from the default.public int[] getUnsafeColorParameter(java.lang.String key)
PluginConfig
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.
getUnsafeColorParameter
in interface PluginConfig
key
- The parameter name.
public int[] getUnsafeColorParameter(java.lang.String key, int[] default_value)
PluginConfig
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.
getUnsafeColorParameter
in interface PluginConfig
key
- The parameter name.default_value
- The default value to return if one is not defined.
public void setUnsafeColorParameter(java.lang.String key, int[] default_value)
PluginConfig
The value should be an integer array of size 3 representing the red, green and blue values - or null to disable it.
setUnsafeColorParameter
in interface PluginConfig
key
- The parameter name.default_value
- The new value for the parameter.public void setUnsafeColorParameter(java.lang.String key, int[] default_value, boolean override)
PluginConfig
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.
setUnsafeColorParameter
in interface PluginConfig
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.public PluginConfigSource getPluginConfigSource()
PluginConfig
getPluginConfigSource
in interface PluginConfig
public void setPluginConfigSource(PluginConfigSource source)
PluginConfig
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.
setPluginConfigSource
in interface PluginConfig
source
- The PluginConfigSource object to use.public PluginConfigSource enableExternalConfigSource()
PluginConfig
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.
enableExternalConfigSource
in interface PluginConfig
public void setPluginStringListParameter(java.lang.String key, java.lang.String[] value)
PluginConfig
setPluginStringListParameter
in interface PluginConfig
key
- The parameter name.value
- The new value of the parameter.public java.lang.String[] getPluginStringListParameter(java.lang.String key)
PluginConfig
getPluginStringListParameter
in interface PluginConfig
key
- The parameter name.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |