public abstract class ComponentConfiguration
extends java.lang.Object
implements org.apache.commons.configuration.Configuration
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
DELIMITER |
| Modifier | Constructor and Description |
|---|---|
protected |
ComponentConfiguration(org.apache.commons.configuration.CompositeConfiguration underlyingConf,
java.lang.String componentPrefix) |
| Modifier and Type | Method and Description |
|---|---|
void |
addProperty(java.lang.String key,
java.lang.Object value) |
java.lang.String |
asJson()
returns the string representation of json format of this config.
|
void |
clear() |
void |
clearProperty(java.lang.String key) |
boolean |
containsKey(java.lang.String key) |
java.math.BigDecimal |
getBigDecimal(java.lang.String key) |
java.math.BigDecimal |
getBigDecimal(java.lang.String key,
java.math.BigDecimal defaultValue) |
java.math.BigInteger |
getBigInteger(java.lang.String key) |
java.math.BigInteger |
getBigInteger(java.lang.String key,
java.math.BigInteger defaultValue) |
boolean |
getBoolean(java.lang.String key) |
boolean |
getBoolean(java.lang.String key,
boolean defaultValue) |
java.lang.Boolean |
getBoolean(java.lang.String key,
java.lang.Boolean defaultValue) |
byte |
getByte(java.lang.String key) |
byte |
getByte(java.lang.String key,
byte defaultValue) |
java.lang.Byte |
getByte(java.lang.String key,
java.lang.Byte defaultValue) |
double |
getDouble(java.lang.String key) |
double |
getDouble(java.lang.String key,
double defaultValue) |
java.lang.Double |
getDouble(java.lang.String key,
java.lang.Double defaultValue) |
float |
getFloat(java.lang.String key) |
float |
getFloat(java.lang.String key,
float defaultValue) |
java.lang.Float |
getFloat(java.lang.String key,
java.lang.Float defaultValue) |
int |
getInt(java.lang.String key) |
int |
getInt(java.lang.String key,
int defaultValue) |
java.lang.Integer |
getInteger(java.lang.String key,
java.lang.Integer defaultValue) |
protected java.lang.String |
getKeyName(java.lang.String name) |
java.util.Iterator<java.lang.String> |
getKeys() |
java.util.Iterator<java.lang.String> |
getKeys(java.lang.String prefix) |
java.util.List<java.lang.Object> |
getList(java.lang.String key) |
java.util.List<java.lang.Object> |
getList(java.lang.String key,
java.util.List<?> defaultValue) |
long |
getLong(java.lang.String key) |
long |
getLong(java.lang.String key,
long defaultValue) |
java.lang.Long |
getLong(java.lang.String key,
java.lang.Long defaultValue) |
java.util.Properties |
getProperties(java.lang.String key) |
java.lang.Object |
getProperty(java.lang.String key) |
short |
getShort(java.lang.String key) |
short |
getShort(java.lang.String key,
short defaultValue) |
java.lang.Short |
getShort(java.lang.String key,
java.lang.Short defaultValue) |
java.lang.String |
getString(java.lang.String key) |
java.lang.String |
getString(java.lang.String key,
java.lang.String defaultValue) |
java.lang.String[] |
getStringArray(java.lang.String key) |
org.apache.commons.configuration.CompositeConfiguration |
getUnderlyingConf() |
boolean |
isEmpty() |
protected void |
loadConf(org.apache.commons.configuration.Configuration loadedConf) |
void |
loadConf(java.net.URL confURL)
Load configuration from a given
confURL. |
void |
setProperty(java.lang.String key,
java.lang.Object value) |
org.apache.commons.configuration.Configuration |
subset(java.lang.String prefix) |
void |
validate() |
protected static final java.lang.String DELIMITER
protected ComponentConfiguration(org.apache.commons.configuration.CompositeConfiguration underlyingConf,
java.lang.String componentPrefix)
protected java.lang.String getKeyName(java.lang.String name)
public org.apache.commons.configuration.CompositeConfiguration getUnderlyingConf()
public void loadConf(java.net.URL confURL)
throws org.apache.commons.configuration.ConfigurationException
confURL.confURL - the url points to the configuration.org.apache.commons.configuration.ConfigurationException - when failed to load configuration.protected void loadConf(org.apache.commons.configuration.Configuration loadedConf)
public void validate()
throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationExceptionpublic org.apache.commons.configuration.Configuration subset(java.lang.String prefix)
subset in interface org.apache.commons.configuration.Configurationpublic boolean isEmpty()
isEmpty in interface org.apache.commons.configuration.Configurationpublic boolean containsKey(java.lang.String key)
containsKey in interface org.apache.commons.configuration.Configurationpublic void addProperty(java.lang.String key,
java.lang.Object value)
addProperty in interface org.apache.commons.configuration.Configurationpublic void setProperty(java.lang.String key,
java.lang.Object value)
setProperty in interface org.apache.commons.configuration.Configurationpublic void clearProperty(java.lang.String key)
clearProperty in interface org.apache.commons.configuration.Configurationpublic void clear()
clear in interface org.apache.commons.configuration.Configurationpublic java.lang.Object getProperty(java.lang.String key)
getProperty in interface org.apache.commons.configuration.Configurationpublic java.util.Iterator<java.lang.String> getKeys(java.lang.String prefix)
getKeys in interface org.apache.commons.configuration.Configurationpublic java.util.Iterator<java.lang.String> getKeys()
getKeys in interface org.apache.commons.configuration.Configurationpublic java.util.Properties getProperties(java.lang.String key)
getProperties in interface org.apache.commons.configuration.Configurationpublic boolean getBoolean(java.lang.String key)
getBoolean in interface org.apache.commons.configuration.Configurationpublic boolean getBoolean(java.lang.String key,
boolean defaultValue)
getBoolean in interface org.apache.commons.configuration.Configurationpublic java.lang.Boolean getBoolean(java.lang.String key,
java.lang.Boolean defaultValue)
getBoolean in interface org.apache.commons.configuration.Configurationpublic byte getByte(java.lang.String key)
getByte in interface org.apache.commons.configuration.Configurationpublic byte getByte(java.lang.String key,
byte defaultValue)
getByte in interface org.apache.commons.configuration.Configurationpublic java.lang.Byte getByte(java.lang.String key,
java.lang.Byte defaultValue)
getByte in interface org.apache.commons.configuration.Configurationpublic double getDouble(java.lang.String key)
getDouble in interface org.apache.commons.configuration.Configurationpublic double getDouble(java.lang.String key,
double defaultValue)
getDouble in interface org.apache.commons.configuration.Configurationpublic java.lang.Double getDouble(java.lang.String key,
java.lang.Double defaultValue)
getDouble in interface org.apache.commons.configuration.Configurationpublic float getFloat(java.lang.String key)
getFloat in interface org.apache.commons.configuration.Configurationpublic float getFloat(java.lang.String key,
float defaultValue)
getFloat in interface org.apache.commons.configuration.Configurationpublic java.lang.Float getFloat(java.lang.String key,
java.lang.Float defaultValue)
getFloat in interface org.apache.commons.configuration.Configurationpublic int getInt(java.lang.String key)
getInt in interface org.apache.commons.configuration.Configurationpublic int getInt(java.lang.String key,
int defaultValue)
getInt in interface org.apache.commons.configuration.Configurationpublic java.lang.Integer getInteger(java.lang.String key,
java.lang.Integer defaultValue)
getInteger in interface org.apache.commons.configuration.Configurationpublic long getLong(java.lang.String key)
getLong in interface org.apache.commons.configuration.Configurationpublic long getLong(java.lang.String key,
long defaultValue)
getLong in interface org.apache.commons.configuration.Configurationpublic java.lang.Long getLong(java.lang.String key,
java.lang.Long defaultValue)
getLong in interface org.apache.commons.configuration.Configurationpublic short getShort(java.lang.String key)
getShort in interface org.apache.commons.configuration.Configurationpublic short getShort(java.lang.String key,
short defaultValue)
getShort in interface org.apache.commons.configuration.Configurationpublic java.lang.Short getShort(java.lang.String key,
java.lang.Short defaultValue)
getShort in interface org.apache.commons.configuration.Configurationpublic java.math.BigDecimal getBigDecimal(java.lang.String key)
getBigDecimal in interface org.apache.commons.configuration.Configurationpublic java.math.BigDecimal getBigDecimal(java.lang.String key,
java.math.BigDecimal defaultValue)
getBigDecimal in interface org.apache.commons.configuration.Configurationpublic java.math.BigInteger getBigInteger(java.lang.String key)
getBigInteger in interface org.apache.commons.configuration.Configurationpublic java.math.BigInteger getBigInteger(java.lang.String key,
java.math.BigInteger defaultValue)
getBigInteger in interface org.apache.commons.configuration.Configurationpublic java.lang.String getString(java.lang.String key)
getString in interface org.apache.commons.configuration.Configurationpublic java.lang.String getString(java.lang.String key,
java.lang.String defaultValue)
getString in interface org.apache.commons.configuration.Configurationpublic java.lang.String[] getStringArray(java.lang.String key)
getStringArray in interface org.apache.commons.configuration.Configurationpublic java.util.List<java.lang.Object> getList(java.lang.String key)
getList in interface org.apache.commons.configuration.Configurationpublic java.util.List<java.lang.Object> getList(java.lang.String key,
java.util.List<?> defaultValue)
getList in interface org.apache.commons.configuration.Configurationpublic java.lang.String asJson()
JsonUtil.ParseJsonExceptionCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.