站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

TemplateRepository - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.format.template
Class TemplateRepository

java.lang.Object
  extended byorg.jboss.portal.format.template.TemplateRepository
Direct Known Subclasses:
TemplateLoader

public class TemplateRepository
extends java.lang.Object

Author:
Julien Viet

Nested Class Summary
static class TemplateRepository.TemplateClassLoader
           
 
Field Summary
private  java.util.Map classes
          Template name -> Class object.
private  org.apache.log4j.Logger log
          The class logger.
private  TemplateRepository.TemplateClassLoader tcl
          Compile the template definitions to bytecode.
private  java.util.Map templates
          Template name -> template object.
 
Constructor Summary
TemplateRepository()
           
 
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
 

Field Detail

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.

Constructor Detail

TemplateRepository

public TemplateRepository()
Method Detail

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 name
ctx - 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()