|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object consciouscode.seedling.config.properties.PropertiesConfigResource
public class PropertiesConfigResource
A configuration resource stored as a .properties
file.
The PropertiesConfigLoader
provides a default evaluator, but an
individual resource may reconfigure that via the .evaluator
meta-property.
Field Summary | |
---|---|
static String |
EVALUATOR_METAPROPERTY
Names the meta-property that is used to configure the resource's ConfigEvaluator . |
Constructor Summary | |
---|---|
PropertiesConfigResource(String identifier,
Properties properties,
PropertiesConfigEvaluator defaultEvaluator)
|
Method Summary | |
---|---|
ConfigEvaluator |
getEvaluator(NodeReference location)
Returns the evaluator being used by this resource. |
String |
getIdentifier()
Returns a string identifying this resource, for use in messages. |
Properties |
getProperties()
Gets the contents of this config resource, as a Java Properties
collection. |
String |
getProperty(String property)
Returns the unevaluated text of a specified property, or null if no value is assigned by this resource. |
Resource |
getResource()
Gets the underlying resource from which this configuration is loaded. |
void |
setIdentifier(String id)
|
String |
toString()
|
void |
writeConfiguration(Writer out)
Prints the content of this resource to a stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String EVALUATOR_METAPROPERTY
ConfigEvaluator
. Its value must be a full path to an evaluator.
Constructor Detail |
---|
public PropertiesConfigResource(String identifier, Properties properties, PropertiesConfigEvaluator defaultEvaluator)
identifier
- identifies this resource; may be null.properties
- must not be null.defaultEvaluator
- must not be null.Method Detail |
---|
public Resource getResource()
ConfigResource
getResource
in interface ConfigResource
public String getIdentifier()
ConfigResource
getIdentifier
in interface ConfigResource
public void setIdentifier(String id)
public ConfigEvaluator getEvaluator(NodeReference location) throws ConfigurationException
ConfigResource
getEvaluator
in interface ConfigResource
location
- identifies the node being configured.
null
.
ConfigurationException
- if no evaluator could be located.public void writeConfiguration(Writer out) throws IOException
ConfigResource
writeConfiguration
in interface ConfigResource
out
- the stream to get the configuration content.
IOException
- if it's thrown by out
.public Properties getProperties()
Properties
collection.
null
.public String getProperty(String property)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |