org.liquidsite.app.template
Class Template

java.lang.Object
  extended byorg.liquidsite.app.template.Template

public class Template
extends java.lang.Object

A template class. This class wraps a FreeMarker template and adds the liquidsite data model upon processing.


Method Summary
 void processError(Request request, ContentManager manager, int code)
          Processes the template with a request and a content manager.
 void processNormal(Request request, ContentManager manager)
          Processes the template with a request and a content manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

processNormal

public void processNormal(Request request,
                          ContentManager manager)
                   throws TemplateException
Processes the template with a request and a content manager. All the attributes in the request will be exposed in the template data model. The processing result will be sent as data to the request.

Parameters:
request - the request object
manager - the content manager to use
Throws:
TemplateException - if the template processing failed

processError

public void processError(Request request,
                         ContentManager manager,
                         int code)
                  throws TemplateException
Processes the template with a request and a content manager. All the attributes in the request will be exposed in the template data model. The processing result will be sent as an error to the request.

Parameters:
request - the request object
manager - the content manager to use
code - the error code
Throws:
TemplateException - if the template processing failed