public class TemplateInfo
extends java.lang.Object
Constructor and Description |
---|
TemplateInfo(NodeInfo parent,
java.lang.String name,
java.lang.String src,
java.util.Map<java.lang.String,java.lang.String> params,
ConditionImpl cond)
Creates a template.
|
Modifier and Type | Method and Description |
---|---|
void |
appendChild(NodeInfo child)
Append a child
|
java.util.List<NodeInfo> |
getChildren()
Returns a readonly list of children.
|
ConditionImpl |
getCondition()
Returns the effectiveness condition.
|
Evaluator |
getEvaluator()
Returns the evaluator.
|
EvaluatorRef |
getEvaluatorRef()
Returns the evaluator reference.
|
java.lang.String |
getName()
Returns the name of the template info.
|
PageDefinition |
getPageDefinition()
Returns the page definition, i.e., the root node, or null if not available.
|
NodeInfo |
getParent()
Returns the parent, or null if it has no parent.
|
java.lang.String |
getSrc(Component comp)
Returns the URI to create the template from, or null if not specified.
|
boolean |
isAnnotationNamespacedRoot() |
boolean |
isEffective(Component comp)
Used to evaluate whether it is effective.
|
boolean |
isEffective(Page page)
Used to evaluate whether it is effective.
|
boolean |
removeChild(NodeInfo child)
Removes a child.
|
java.util.Map<java.lang.String,java.lang.Object> |
resolveParameters(Component comp)
Evaluates and returns a readonly map of parameters assigned
to this template (never null).
|
void |
setAnnotationNamespacedRoot(boolean annotationNamespacedRoot)
Sets whether this TemplateInfo is the first TemplateInfo that has annotation namespace or binding annotation.
|
void |
setCondition(ConditionImpl cond)
Sets the effectiveness condition.
|
java.lang.String |
toString() |
boolean |
withCondition()
Tests if the condition is set
|
public TemplateInfo(NodeInfo parent, java.lang.String name, java.lang.String src, java.util.Map<java.lang.String,java.lang.String> params, ConditionImpl cond)
parent
- the parent node (never null)name
- the name of the template (never null)params
- the map of parameters. Igored if null.public java.lang.String getName()
public java.lang.String getSrc(Component comp)
public java.util.Map<java.lang.String,java.lang.Object> resolveParameters(Component comp)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isAnnotationNamespacedRoot()
public void setAnnotationNamespacedRoot(boolean annotationNamespacedRoot)
annotationNamespacedRoot
- public ConditionImpl getCondition()
public void setCondition(ConditionImpl cond)
public boolean withCondition()
public void appendChild(NodeInfo child)
NodeInfo
appendChild
in interface NodeInfo
public boolean removeChild(NodeInfo child)
NodeInfo
removeChild
in interface NodeInfo
public java.util.List<NodeInfo> getChildren()
NodeInfo
Note: the returned list is readonly. To modify, please use
NodeInfo.appendChild(org.zkoss.zk.ui.metainfo.NodeInfo)
and NodeInfo.removeChild(org.zkoss.zk.ui.metainfo.NodeInfo)
instead.
getChildren
in interface NodeInfo
public boolean isEffective(Component comp)
Condition
isEffective
in interface Condition
comp
- used as the self variable. Ignored if null.public boolean isEffective(Page page)
Condition
isEffective
in interface Condition
page
- used as the self variable. Ignored if null.public EvaluatorRef getEvaluatorRef()
NodeInfo
getEvaluatorRef
in interface NodeInfo
public PageDefinition getPageDefinition()
NodeInfo
getPageDefinition
in interface NodeInfo
public Evaluator getEvaluator()
NodeInfo
All nodes in the same ZUML tree has the same evaluator reference
(inherited from the root node, PageDefinition.getEvaluatorRef()
).
getEvaluator
in interface NodeInfo
Copyright © 2005-2023 Potix Corporation. All Rights Reserved.