za.org.coefficient.util.ejb
Class VelocityScreenUtil

java.lang.Object
  extended by za.org.coefficient.util.ejb.VelocityScreenUtil

public class VelocityScreenUtil
extends java.lang.Object

DOCUMENT ME!

Version:
$Revision: 1.3 $
Author:
$author$

Field Summary
static java.lang.String TEMPLATES
           
 
Constructor Summary
VelocityScreenUtil()
           
 
Method Summary
static java.lang.String getCallingClassPackage()
           
static java.lang.StringBuffer getProcessedScreen(java.lang.String templateName, java.util.Map context)
          This method will look for the template name on the classpath and if found merge it with the data provided in the map.
static java.lang.StringBuffer getProcessedScreenFullyQualified(java.lang.String fullyQualifiedTemplateName, java.util.Map context)
           
static java.lang.StringBuffer getProcessedString(java.lang.String inString, java.util.Map context)
          This method will look for the template name on the classpath and if found merge it with the data provided in the map.
private static void initVelocity()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEMPLATES

public static final java.lang.String TEMPLATES
See Also:
Constant Field Values
Constructor Detail

VelocityScreenUtil

public VelocityScreenUtil()
Method Detail

getProcessedScreen

public static java.lang.StringBuffer getProcessedScreen(java.lang.String templateName,
                                                        java.util.Map context)
This method will look for the template name on the classpath and if found merge it with the data provided in the map. The result is returned as a StringBuffer.

Parameters:
templateName - identifies the template that should be merged. If the template is not found or there is a parsing error in the template or there is a method invocation error while parsing the template then the return value will be null. It is assumed that this template will be found in the classpath in the same package space as the caller plus a level deeper called templates
context - is a map containing all the mappings that are to be merged into the template.
Returns:
StringBuffer containing the result of the merge, null if there were any exceptions thrown during the merge.

getProcessedScreenFullyQualified

public static java.lang.StringBuffer getProcessedScreenFullyQualified(java.lang.String fullyQualifiedTemplateName,
                                                                      java.util.Map context)

getProcessedString

public static java.lang.StringBuffer getProcessedString(java.lang.String inString,
                                                        java.util.Map context)
This method will look for the template name on the classpath and if found merge it with the data provided in the map. The result is returned as a StringBuffer.

Parameters:
inString - is a string containing velocity code that will be merged
context - is a map containing all the mappings that are to be merged into the template.
Returns:
StringBuffer containing the result of the merge, null if there were any exceptions thrown during the merge.

getCallingClassPackage

public static java.lang.String getCallingClassPackage()

initVelocity

private static void initVelocity()


Copyright CSIR. All Rights Reserved.