当前页面:
在线文档首页 >
JBOSS Portal 2.6 API 英文版文档
TemplateRepository - JBOSS Portal 2.6 API 英文版文档
org.jboss.portal.format.template
Class TemplateRepository
java.lang.Object
org.jboss.portal.format.template.TemplateRepository
- Direct Known Subclasses:
- TemplateLoader
- public class TemplateRepository
- extends java.lang.Object
- Author:
- Julien Viet
Method Summary |
void |
addTemplate(java.lang.String name,
org.dom4j.Document doc)
|
void |
addTemplate(java.lang.String name,
org.dom4j.Document doc,
java.util.Set names)
|
void |
addTemplate(java.lang.String name,
org.dom4j.Element node)
|
void |
addTemplate(java.lang.String name,
org.dom4j.Element node,
java.util.Set names)
|
void |
clear()
|
Template |
createTemplate(java.lang.String name)
|
Template |
createTemplate(java.lang.String name,
Context ctx)
Creates a new template instance. |
private java.lang.Class |
generate(org.dom4j.Element node,
java.util.Set names)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private final org.apache.log4j.Logger log
- The class logger.
templates
private java.util.Map templates
- Template name -> template object.
classes
private java.util.Map classes
- Template name -> Class object.
tcl
private TemplateRepository.TemplateClassLoader tcl
- Compile the template definitions to bytecode.
TemplateRepository
public TemplateRepository()
createTemplate
public Template createTemplate(java.lang.String name)
createTemplate
public Template createTemplate(java.lang.String name,
Context ctx)
- Creates a new template instance.
- Parameters:
name
- the template namectx
- the context with the template properties
- Returns:
- the template instance or null if it is not found
addTemplate
public void addTemplate(java.lang.String name,
org.dom4j.Document doc)
throws BuildException
- Throws:
BuildException
addTemplate
public void addTemplate(java.lang.String name,
org.dom4j.Element node)
throws BuildException
- Throws:
BuildException
addTemplate
public void addTemplate(java.lang.String name,
org.dom4j.Document doc,
java.util.Set names)
throws BuildException
- Throws:
BuildException
addTemplate
public void addTemplate(java.lang.String name,
org.dom4j.Element node,
java.util.Set names)
throws BuildException
- Throws:
BuildException
generate
private java.lang.Class generate(org.dom4j.Element node,
java.util.Set names)
throws BuildException
- Throws:
BuildException
clear
public void clear()