2006/unicorn/src/org/w3c/unicorn/util Templates.java,NONE,1.1.2.1

Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/util
In directory hutz:/tmp/cvs-serv32542/src/org/w3c/unicorn/util

Added Files:
      Tag: dev2
	Templates.java 
Log Message:
removed template caching which is already supported by velocity

--- NEW FILE: Templates.java ---
package org.w3c.unicorn.util;

import java.io.Writer;

import org.apache.velocity.VelocityContext;
import org.apache.velocity.exception.MethodInvocationException;
import org.apache.velocity.exception.ParseErrorException;
import org.apache.velocity.exception.ResourceNotFoundException;
import org.w3c.unicorn.Framework;

public class Templates {
	
	public static void write(String templateName, VelocityContext context, Writer writer) {
		try {
			Framework.getVelocityEngine().mergeTemplate(templateName, "UTF-8", context, writer);
		} catch (ResourceNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ParseErrorException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (MethodInvocationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
}

Received on Monday, 24 August 2009 09:16:21 UTC