|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ExpressionEngine
Definition of an interface for evaluating keys for hierarchical configurations.
An expression engine knows how to map a key for a configuration's
property to a single or a set of configuration nodes. Thus it defines the way
how properties are addressed in this configuration. Methods of a
configuration that have to handle property key (e.g.
getProperty()
or addProperty()
do not interpret
the passed in keys on their own, but delegate this task to an associated
expression engine. This expression engine will then find out, which
configuration nodes are addressed by the key.
Seperating the task of evaluating property keys from the configuration object has the advantage that many different expression languages (i.e. ways for querying or setting properties) can be supported. Just set a suitable implementation of this interface as the configuration's expression engine, and you can use the syntax provided by this implementation.
Method Summary | |
---|---|
String |
nodeKey(ConfigurationNode node,
String parentKey)
Returns the key for the specified node in the expression language supported by an implementation. |
NodeAddData |
prepareAdd(ConfigurationNode root,
String key)
Returns information needed for an add operation. |
List |
query(ConfigurationNode root,
String key)
Finds the node(s) that is (are) matched by the specified key. |
Method Detail |
---|
List query(ConfigurationNode root, String key)
root
- the root node of a hierarchy of configuration nodeskey
- the key to be evaluated
String nodeKey(ConfigurationNode node, String parentKey)
getKeys()
method.
node
- the node, for which the key must be constructedparentKey
- the key of this node's parent (can be null for
the root node)
NodeAddData prepareAdd(ConfigurationNode root, String key)
root
- the root nodekey
- the key for the new property
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |