|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.metamodel.config.ConfigurationBuilderAbstract
public class ConfigurationBuilderAbstract
Adapter for ConfigurationBuilder, loading the specified configuration resource (file) from the
given ResourceStreamSource(s).
If a property is in multiple configuration resources then the latter resources will overwrite the former.
| Constructor Summary | |
|---|---|
ConfigurationBuilderAbstract()
|
|
ConfigurationBuilderAbstract(ResourceStreamSource... resourceStreamSources)
|
|
ConfigurationBuilderAbstract(ResourceStreamSource resourceStreamSource)
|
|
| Method Summary | |
|---|---|
void |
add(java.util.Properties properties)
Adds additional properties. |
void |
add(java.lang.String key,
java.lang.String value)
Adds additional property. |
void |
addConfigurationResource(java.lang.String configurationResource,
NotFoundPolicy notFoundPolicy)
Registers the configuration resource (usually, a file) with the specified name from the first ResourceStreamSource available. |
protected void |
addDefaultConfigurationResources()
May be overridden by subclasses if required. |
protected void |
addProperties(PropertiesConfiguration configuration,
java.util.Properties properties)
|
NakedObjectConfiguration |
getConfiguration()
Returns the current configuration. |
ResourceStreamSource |
getResourceStreamSource()
The underlying ResourceStreamSource from which the configuration
is being read. |
void |
injectInto(java.lang.Object candidate)
Will inject itself into the candidate if the candidate implements the corresponding *Aware type. |
protected void |
loadConfigurationResource(PropertiesConfiguration configuration,
java.lang.String configurationResource,
NotFoundPolicy notFoundPolicy)
Loads the configuration resource (usually, a file) with the specified name from the first ResourceStreamSource available. |
void |
setIncludeSystemProperties(boolean includeSystemProperties)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConfigurationBuilderAbstract()
public ConfigurationBuilderAbstract(ResourceStreamSource resourceStreamSource)
public ConfigurationBuilderAbstract(ResourceStreamSource... resourceStreamSources)
| Method Detail |
|---|
protected void addDefaultConfigurationResources()
public ResourceStreamSource getResourceStreamSource()
ConfigurationBuilderResourceStreamSource from which the configuration
is being read.
Note that this may be a composite.
getResourceStreamSource in interface ConfigurationBuilder
public void addConfigurationResource(java.lang.String configurationResource,
NotFoundPolicy notFoundPolicy)
ResourceStreamSource available.
If the configuration resource cannot be found then the provided NotFoundPolicy determines
whether an exception is thrown or not.
Must be called before getConfiguration(); the resource is actually read on
getConfiguration().
addConfigurationResource in interface ConfigurationBuilderpublic void setIncludeSystemProperties(boolean includeSystemProperties)
public void add(java.lang.String key,
java.lang.String value)
add in interface ConfigurationBuilderpublic void add(java.util.Properties properties)
add in interface ConfigurationBuilderpublic NakedObjectConfiguration getConfiguration()
configuration.
getConfiguration in interface ConfigurationBuilder
protected void loadConfigurationResource(PropertiesConfiguration configuration,
java.lang.String configurationResource,
NotFoundPolicy notFoundPolicy)
ResourceStreamSource available.
If the configuration resource cannot be found then the provided NotFoundPolicy determines
whether an exception is thrown or not.
protected void addProperties(PropertiesConfiguration configuration,
java.util.Properties properties)
public void injectInto(java.lang.Object candidate)
Injectable
injectInto in interface Injectable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||