org.apache.turbine.modules.layouts
Class FreeMarkerSiteLayout

java.lang.Object
  |
  +--org.apache.turbine.modules.Assembler
        |
        +--org.apache.turbine.modules.Layout
              |
              +--org.apache.turbine.modules.layouts.FreeMarkerSiteLayout

Deprecated. you should use velocity

public class FreeMarkerSiteLayout
extends Layout

FreeMarker Site Layout. This Layout module allows FreeMarker templates to be used as layouts. Since dynamic content is supposed to be primarily located in screens and navigations there should be relatively few reasons to subclass this Layout.

Version:
$Id: FreeMarkerSiteLayout.java,v 1.2 2002/07/11 16:53:29 mpoeschl Exp $
Author:
John D. McNally

Constructor Summary
FreeMarkerSiteLayout()
          Deprecated.  
 
Method Summary
 void doBuild(RunData data)
          Deprecated. Build the layout.
protected  org.apache.ecs.StringElement doBuildTemplate(freemarker.template.SimpleHash context, java.lang.String templateFile, boolean cache)
          Deprecated. Build the template.
protected  freemarker.template.SimpleHash getContext()
          Deprecated. Return the model needed by FreeMarker.
protected  freemarker.template.SimpleHash getContext(RunData data)
          Deprecated. Return the model needed by FreeMarker.
 
Methods inherited from class org.apache.turbine.modules.Layout
build
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FreeMarkerSiteLayout

public FreeMarkerSiteLayout()
Deprecated. 
Method Detail

doBuild

public void doBuild(RunData data)
             throws java.lang.Exception
Deprecated. 
Build the layout.
Overrides:
doBuild in class Layout
Parameters:
data - Turbine information.
Throws:
Exception, - a generic exception.

getContext

protected freemarker.template.SimpleHash getContext(RunData data)
Deprecated. 
Return the model needed by FreeMarker. This is where information needed by the template should be placed.
Parameters:
RunData - data
Returns:
SimpleHash

getContext

protected freemarker.template.SimpleHash getContext()
Deprecated. 
Return the model needed by FreeMarker. This is where information needed by the template should be placed.
Returns:
SimpleHash

doBuildTemplate

protected org.apache.ecs.StringElement doBuildTemplate(freemarker.template.SimpleHash context,
                                                       java.lang.String templateFile,
                                                       boolean cache)
                                                throws java.lang.Exception
Deprecated. 
Build the template.
Parameters:
context - retrieved from getContext method.
templateFile - the name of the template file.
cache -  
Returns:
A String with the processed template.


Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.