Package com.biglybt.core.config.impl
Class ConfigurationDefaults
java.lang.Object
com.biglybt.core.config.impl.ConfigurationDefaults
Some (proposed) option naming conventions:
- Starts with a general identifier
General_ for, well, general things =)
Server_ for webinterface specific things
GUI_ (eventually) for GUI specific things
Core_ (eventually) for core specific things
- Second is some identifing term. It starts with a small letter denoting
the variable type.
b Boolean
i Integer
s String
- Directory options should end with _Directory. This activates some
special validity checks in the webinterface option parsing code.
(Namely they are created if they don't exist and the option isn't changed
with a logged error if a normal file of the same name exists)
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
private static final AEMonitor
private static ConfigurationDefaults
private ConcurrentHashMapWrapper<String,
Object> static final int
static final byte[]
static final float
static final int
static final long
static final String
static final String
private static final Long
private static final Long
private final Hashtable
private static final Long
private static final Long
private static final Long
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Creates a new instance of Defaultsprotected
ConfigurationDefaults
(Map _def) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addParameter
(String sKey, boolean bParameter) void
addParameter
(String sKey, byte[] bParameter) void
addParameter
(String sKey, float fParameter) void
addParameter
(String sKey, int iParameter) void
addParameter
(String sKey, long lParameter) void
addParameter
(String sKey, String sParameter) private void
protected void
def_put
(String key, String key_def, COConfigurationManager.ParameterVerifier verifier) boolean
boolean
byte[]
Returns the default value as an object (String, Long, Float, Boolean)float
static ConfigurationDefaults
int
long
getParameter
(String key) getVerifiers
(String key) boolean
void
registerExternalDefaults
(Map addmap) protected void
-
Field Details
-
ZERO
-
ONE
-
SIXTY
-
FALSE
-
TRUE
-
configdefaults
-
class_mon
-
def
-
def_int
public static final int def_int- See Also:
-
def_long
public static final long def_long- See Also:
-
def_float
public static final float def_float- See Also:
-
def_boolean
public static final int def_boolean- See Also:
-
def_String
- See Also:
-
def_bytes
public static final byte[] def_bytes -
DEFAULT_FILE_CONVERSION_CHARS
- See Also:
-
parameter_verifiers
-
CFG_TORRENTADD_OPENOPTIONS_MANY
- See Also:
-
CFG_TORRENTADD_OPENOPTIONS_ALWAYS
- See Also:
-
CFG_TORRENTADD_OPENOPTIONS_NEVER
- See Also:
-
CFG_TORRENTADD_OPENOPTIONS
- See Also:
-
CFG_TORRENTADD_OPENOPTIONS_SEP
- See Also:
-
-
Constructor Details
-
ConfigurationDefaults
protected ConfigurationDefaults()Creates a new instance of Defaults -
ConfigurationDefaults
-
-
Method Details
-
getInstance
-
def_put
protected void def_put(String key, String key_def, COConfigurationManager.ParameterVerifier verifier) -
checkParameterExists
-
getStringParameter
-
getIntParameter
-
getLongParameter
-
getFloatParameter
-
getByteParameter
-
getBooleanParameter
-
hasParameter
-
getDefaultValueAsObject
Returns the default value as an object (String, Long, Float, Boolean)- Parameters:
key
-- Returns:
- default value
-
getAllowedParameters
-
addParameter
-
addParameter
-
addParameter
-
addParameter
-
addParameter
-
addParameter
-
registerExternalDefaults
-
doesParameterDefaultExist
-
getParameter
-
getVerifiers
-
runVerifiers
protected void runVerifiers()
-