com.astroshare.astroonline.core
Class Template

java.lang.Object
  extended by com.astroshare.astroonline.core.Template

public class Template
extends java.lang.Object

Implementation of the Astro-Online templates.

Templating is implemented with the Freemarker framework. Freemarker classes are only called from this class. The templates are stored under the template folder under WEB-INF.


Field Summary
static freemarker.template.Configuration adm
          Freemarker configuration for admin templates
static freemarker.template.Configuration cfg
          Freemarker configuration for application templates
static freemarker.template.Configuration ins
          Freemarker configuration for install templates
 
Constructor Summary
Template()
           
 
Method Summary
static void clearCache()
           Clear template cache.
 java.lang.String getAdminTemplate(java.lang.String templateName, java.util.Map<?,?> vars)
           Method returns admin template.
 java.lang.String getInstallTemplate(java.lang.String templateName, java.util.Map<?,?> vars)
           Method returns install template.
 java.lang.String getTemplate(java.lang.String templateName, java.lang.String templateLanguage, java.util.Map<?,?> vars)
           Method returns application template.
static void init(javax.servlet.ServletConfig config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cfg

public static freemarker.template.Configuration cfg
Freemarker configuration for application templates


adm

public static freemarker.template.Configuration adm
Freemarker configuration for admin templates


ins

public static freemarker.template.Configuration ins
Freemarker configuration for install templates

Constructor Detail

Template

public Template()
Method Detail

init

public static void init(javax.servlet.ServletConfig config)

getTemplate

public java.lang.String getTemplate(java.lang.String templateName,
                                    java.lang.String templateLanguage,
                                    java.util.Map<?,?> vars)

Method returns application template.

Parameters:
templateName - Name of the template
templateLanguage - Language of the template
vars - Variables used to process the template

getAdminTemplate

public java.lang.String getAdminTemplate(java.lang.String templateName,
                                         java.util.Map<?,?> vars)

Method returns admin template.

Parameters:
templateName - Name of the template
vars - Variables used to process the template

getInstallTemplate

public java.lang.String getInstallTemplate(java.lang.String templateName,
                                           java.util.Map<?,?> vars)

Method returns install template.

Parameters:
templateName - Name of the template
vars - Variables used to process the template

clearCache

public static void clearCache()

Clear template cache.



Astro-Online © 2001 − 2008 Astro Share
Documentation generated on: Thursday August 12th 2008 (PS)