| org.apache.commons.configuration.AbstractConfiguration org.apache.commons.configuration.CompositeConfiguration
CompositeConfiguration | public class CompositeConfiguration extends AbstractConfiguration implements Cloneable(Code) | | This Configuration class allows you to add multiple different types of Configuration
to this CompositeConfiguration. If you add Configuration1, and then Configuration2,
any properties shared will mean that Configuration1 will be returned.
You can add multiple different types or the same type of properties file.
If Configuration1 doesn't have the property, then Configuration2 will be checked.
author: Eric Pugh author: Henning P. Schmiedehausen version: $Id: CompositeConfiguration.java 494581 2007-01-09 21:14:20Z oheger $ |
CompositeConfiguration | public CompositeConfiguration()(Code) | | Creates an empty CompositeConfiguration object which can then
be added some other Configuration files
|
CompositeConfiguration | public CompositeConfiguration(Configuration inMemoryConfiguration)(Code) | | Creates a CompositeConfiguration object with a specified in memory
configuration. This configuration will store any changes made to
the CompositeConfiguration.
Parameters: inMemoryConfiguration - the in memory configuration to use |
CompositeConfiguration | public CompositeConfiguration(Collection configurations)(Code) | | Create a CompositeConfiguration with an empty in memory configuration
and adds the collection of configurations specified.
Parameters: configurations - the collection of configurations to add |
CompositeConfiguration | public CompositeConfiguration(Configuration inMemoryConfiguration, Collection configurations)(Code) | | Creates a CompositeConfiguration with a specified in memory
configuration, and then adds the given collection of configurations.
Parameters: inMemoryConfiguration - the in memory configuration to use Parameters: configurations - the collection of configurations to add |
addConfiguration | public void addConfiguration(Configuration config)(Code) | | Add a configuration.
Parameters: config - the configuration to add |
addPropertyDirect | protected void addPropertyDirect(String key, Object token)(Code) | | Add this property to the inmemory Configuration.
Parameters: key - The Key to add the property to. Parameters: token - The Value to add. |
clear | public void clear()(Code) | | Remove all configuration reinitialize the in memory configuration.
|
clearPropertyDirect | protected void clearPropertyDirect(String key)(Code) | | |
clone | public Object clone()(Code) | | Returns a copy of this object. This implementation will create a deep
clone, i.e. all configurations contained in this composite will also be
cloned. This only works if all contained configurations support cloning;
otherwise a runtime exception will be thrown. Registered event handlers
won't get cloned.
the copy since: 1.3 |
getConfiguration | public Configuration getConfiguration(int index)(Code) | | Return the configuration at the specified index.
Parameters: index - The index of the configuration to retrieve the configuration at this index |
getInMemoryConfiguration | public Configuration getInMemoryConfiguration()(Code) | | Returns the "in memory configuration". In this configuration
changes are stored.
the in memory configuration |
getNumberOfConfigurations | public int getNumberOfConfigurations()(Code) | | Return the number of configurations.
the number of configuration |
getProperty | public Object getProperty(String key)(Code) | | Read property from underlying composite
Parameters: key - key to use for mapping object associated with the given configuration key. |
isEmpty | public boolean isEmpty()(Code) | | |
removeConfiguration | public void removeConfiguration(Configuration config)(Code) | | Remove a configuration. The in memory configuration cannot be removed.
Parameters: config - The configuration to remove |
setDelimiterParsingDisabled | public void setDelimiterParsingDisabled(boolean delimiterParsingDisabled)(Code) | | Sets a flag whether added values for string properties should be checked
for the list delimiter. This implementation ensures that the in memory
configuration is correctly initialized.
Parameters: delimiterParsingDisabled - the new value of the flag since: 1.4 |
setListDelimiter | public void setListDelimiter(char listDelimiter)(Code) | | Sets the character that is used as list delimiter. This implementation
ensures that the in memory configuration is correctly initialized.
Parameters: listDelimiter - the new list delimiter character since: 1.4 |
Methods inherited from org.apache.commons.configuration.AbstractConfiguration | public void addErrorLogListener()(Code)(Java Doc) public void addProperty(String key, Object value)(Code)(Java Doc) abstract protected void addPropertyDirect(String key, Object value)(Code)(Java Doc) public void clear()(Code)(Java Doc) public void clearProperty(String key)(Code)(Java Doc) protected void clearPropertyDirect(String key)(Code)(Java Doc) abstract public boolean containsKey(String key)(Code)(Java Doc) protected ConfigurationInterpolator createInterpolator()(Code)(Java Doc) public BigDecimal getBigDecimal(String key)(Code)(Java Doc) public BigDecimal getBigDecimal(String key, BigDecimal defaultValue)(Code)(Java Doc) public BigInteger getBigInteger(String key)(Code)(Java Doc) public BigInteger getBigInteger(String key, BigInteger defaultValue)(Code)(Java Doc) public boolean getBoolean(String key)(Code)(Java Doc) public boolean getBoolean(String key, boolean defaultValue)(Code)(Java Doc) public Boolean getBoolean(String key, Boolean defaultValue)(Code)(Java Doc) public byte getByte(String key)(Code)(Java Doc) public byte getByte(String key, byte defaultValue)(Code)(Java Doc) public Byte getByte(String key, Byte defaultValue)(Code)(Java Doc) public static char getDefaultListDelimiter()(Code)(Java Doc) public static char getDelimiter()(Code)(Java Doc) public double getDouble(String key)(Code)(Java Doc) public double getDouble(String key, double defaultValue)(Code)(Java Doc) public Double getDouble(String key, Double defaultValue)(Code)(Java Doc) public float getFloat(String key)(Code)(Java Doc) public float getFloat(String key, float defaultValue)(Code)(Java Doc) public Float getFloat(String key, Float defaultValue)(Code)(Java Doc) public int getInt(String key)(Code)(Java Doc) public int getInt(String key, int defaultValue)(Code)(Java Doc) public Integer getInteger(String key, Integer defaultValue)(Code)(Java Doc) public ConfigurationInterpolator getInterpolator()(Code)(Java Doc) abstract public Iterator getKeys()(Code)(Java Doc) public Iterator getKeys(String prefix)(Code)(Java Doc) public List getList(String key)(Code)(Java Doc) public List getList(String key, List defaultValue)(Code)(Java Doc) public char getListDelimiter()(Code)(Java Doc) public Log getLogger()(Code)(Java Doc) public long getLong(String key)(Code)(Java Doc) public long getLong(String key, long defaultValue)(Code)(Java Doc) public Long getLong(String key, Long defaultValue)(Code)(Java Doc) public Properties getProperties(String key)(Code)(Java Doc) public Properties getProperties(String key, Properties defaults)(Code)(Java Doc) public short getShort(String key)(Code)(Java Doc) public short getShort(String key, short defaultValue)(Code)(Java Doc) public Short getShort(String key, Short defaultValue)(Code)(Java Doc) public String getString(String key)(Code)(Java Doc) public String getString(String key, String defaultValue)(Code)(Java Doc) public String[] getStringArray(String key)(Code)(Java Doc) public synchronized StrSubstitutor getSubstitutor()(Code)(Java Doc) protected String interpolate(String base)(Code)(Java Doc) protected Object interpolate(Object value)(Code)(Java Doc) protected String interpolateHelper(String base, List priorVariables)(Code)(Java Doc) public boolean isDelimiterParsingDisabled()(Code)(Java Doc) abstract public boolean isEmpty()(Code)(Java Doc) public boolean isThrowExceptionOnMissing()(Code)(Java Doc) protected Object resolveContainerStore(String key)(Code)(Java Doc) public static void setDefaultListDelimiter(char delimiter)(Code)(Java Doc) public static void setDelimiter(char delimiter)(Code)(Java Doc) public void setDelimiterParsingDisabled(boolean delimiterParsingDisabled)(Code)(Java Doc) public void setListDelimiter(char listDelimiter)(Code)(Java Doc) public void setLogger(Log log)(Code)(Java Doc) public void setProperty(String key, Object value)(Code)(Java Doc) public void setThrowExceptionOnMissing(boolean throwExceptionOnMissing)(Code)(Java Doc) public Configuration subset(String prefix)(Code)(Java Doc)
|
|
|