|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javagen.agile.core.util.ModelUtil
public class ModelUtil
Model tree navigation utils.
| Constructor Summary | |
|---|---|
ModelUtil()
|
|
| Method Summary | |
|---|---|
static Model |
getRootNode(Model currentNode)
|
static void |
injectPropertiesIntoModelContext(Properties properties,
Model model)
Load properties into Model's context. |
static Model |
lookupChildByName(Model parent,
String name,
boolean includeSubTrees)
Calls lookupChildByName with null type. |
static Model |
lookupChildByName(Model parent,
String name,
Class type,
boolean includeSubTrees)
Lookup child by name. |
static Model |
modelPath(Model currentNode,
String path)
Defines a simple XPath-like language to grab arbitrary model instances out of a model tree. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ModelUtil()
| Method Detail |
|---|
public static Model getRootNode(Model currentNode)
currentNode - in model tree
public static Model lookupChildByName(Model parent,
String name,
Class type,
boolean includeSubTrees)
parent - name - case-insensitive model nametype - if specified restricts Model subclass to specified type.includeSubTrees - if true searches the whole subtree
public static Model lookupChildByName(Model parent,
String name,
boolean includeSubTrees)
lookupChildByName with null type.
public static Model modelPath(Model currentNode,
String path)
Valid paths examples look like this:
/..id:oo:Zipcode/key:tableDATABASE/ADDRESS_TABLE/key:entitychild:DATABASE/child:ADDRESS_TABLE/key:entity
Paths starting with '/' are treated as absolute (ie starting with the root node),
otherwise they are relative to the provided input argument. Recognized path
elements are:
.. - parent node.key:someName - strips off key: prefix and lookup model with someName in the current context.id:idName - strips off id: prefix and lookup model someName in the current context.child:modelName - strips off child: prefix and look for child model with modelName as the model name. The child: prefix is optional.
public static void injectPropertiesIntoModelContext(Properties properties,
Model model)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||