/*
 * Copyright 2003-2004 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.velocity.tools.generic.app;

import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.io.Writer;
import java.util.Properties;

import org.apache.commons.collections.ExtendedProperties;
import org.apache.velocity.Template;
import org.apache.velocity.app.Velocity;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.context.Context;
import org.apache.velocity.exception.MethodInvocationException;
import org.apache.velocity.exception.ParseErrorException;
import org.apache.velocity.exception.ResourceNotFoundException;
import org.apache.velocity.runtime.configuration.Configuration;

/**
 * @author <a href="mailto:shinobu@ieee.org">Shinobu Kawai</a>
 * @version $Id: $
 */
public class MonostateVelocityEngine extends VelocityEngine
{

    /**
     *
     */
    public MonostateVelocityEngine()
    {
    }
    /**
     * @param arg0
     * @throws java.lang.Exception
     */
    public MonostateVelocityEngine(String arg0) throws Exception
    {
        Velocity.init(arg0);
    }
    /**
     * @param arg0
     * @throws java.lang.Exception
     */
    public MonostateVelocityEngine(Properties arg0) throws Exception
    {
        Velocity.init(arg0);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#addProperty(java.lang.String, java.lang.Object)
     */
    public void addProperty(String arg0, Object arg1)
    {
        Velocity.addProperty(arg0, arg1);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#clearProperty(java.lang.String)
     */
    public void clearProperty(String arg0)
    {
        Velocity.clearProperty(arg0);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#debug(java.lang.Object)
     */
    public void debug(Object arg0)
    {
        Velocity.debug(arg0);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#error(java.lang.Object)
     */
    public void error(Object arg0)
    {
        Velocity.error(arg0);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#evaluate(org.apache.velocity.context.Context, java.io.Writer, java.lang.String, java.io.InputStream)
     */
    public boolean evaluate(Context arg0, Writer arg1, String arg2,
            InputStream arg3) throws ParseErrorException,
            MethodInvocationException, ResourceNotFoundException, IOException
    {
        return Velocity.evaluate(arg0, arg1, arg2, arg3);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#evaluate(org.apache.velocity.context.Context, java.io.Writer, java.lang.String, java.io.Reader)
     */
    public boolean evaluate(Context arg0, Writer arg1, String arg2, Reader arg3)
            throws ParseErrorException, MethodInvocationException,
            ResourceNotFoundException, IOException
    {
        return Velocity.evaluate(arg0, arg1, arg2, arg3);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#evaluate(org.apache.velocity.context.Context, java.io.Writer, java.lang.String, java.lang.String)
     */
    public boolean evaluate(Context arg0, Writer arg1, String arg2, String arg3)
            throws ParseErrorException, MethodInvocationException,
            ResourceNotFoundException, IOException
    {
        return Velocity.evaluate(arg0, arg1, arg2, arg3);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#getProperty(java.lang.String)
     */
    public Object getProperty(String arg0)
    {
        return Velocity.getProperty(arg0);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#getTemplate(java.lang.String, java.lang.String)
     */
    public Template getTemplate(String arg0, String arg1)
            throws ResourceNotFoundException, ParseErrorException, Exception
    {
        return Velocity.getTemplate(arg0, arg1);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#getTemplate(java.lang.String)
     */
    public Template getTemplate(String arg0) throws ResourceNotFoundException,
            ParseErrorException, Exception
    {
        return Velocity.getTemplate(arg0);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#info(java.lang.Object)
     */
    public void info(Object arg0)
    {
        Velocity.info(arg0);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#init()
     */
    public void init() throws Exception
    {
        Velocity.init();
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#init(java.util.Properties)
     */
    public void init(Properties arg0) throws Exception
    {
        Velocity.init(arg0);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#init(java.lang.String)
     */
    public void init(String arg0) throws Exception
    {
        Velocity.init(arg0);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#invokeVelocimacro(java.lang.String, java.lang.String, java.lang.String[], org.apache.velocity.context.Context, java.io.Writer)
     */
    public boolean invokeVelocimacro(String arg0, String arg1, String[] arg2,
            Context arg3, Writer arg4) throws Exception
    {
        return Velocity.invokeVelocimacro(arg0, arg1, arg2, arg3, arg4);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#mergeTemplate(java.lang.String, org.apache.velocity.context.Context, java.io.Writer)
     */
    public boolean mergeTemplate(String arg0, Context arg1, Writer arg2)
            throws ResourceNotFoundException, ParseErrorException,
            MethodInvocationException, Exception
    {
        return Velocity.mergeTemplate(arg0, arg1, arg2);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#mergeTemplate(java.lang.String, java.lang.String, org.apache.velocity.context.Context, java.io.Writer)
     */
    public boolean mergeTemplate(String arg0, String arg1, Context arg2,
            Writer arg3) throws ResourceNotFoundException, ParseErrorException,
            MethodInvocationException, Exception
    {
        return Velocity.mergeTemplate(arg0, arg1, arg2, arg3);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#setApplicationAttribute(java.lang.Object, java.lang.Object)
     */
    public void setApplicationAttribute(Object arg0, Object arg1)
    {
        Velocity.setApplicationAttribute(arg0, arg1);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#setConfiguration(org.apache.velocity.runtime.configuration.Configuration)
     */
    public void setConfiguration(Configuration arg0)
    {
        Velocity.setConfiguration(arg0);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#setExtendedProperties(org.apache.commons.collections.ExtendedProperties)
     */
    public void setExtendedProperties(ExtendedProperties arg0)
    {
        Velocity.setExtendedProperties(arg0);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#setProperty(java.lang.String, java.lang.Object)
     */
    public void setProperty(String arg0, Object arg1)
    {
        Velocity.setProperty(arg0, arg1);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#templateExists(java.lang.String)
     */
    public boolean templateExists(String arg0)
    {
        return Velocity.templateExists(arg0);
    }
    /* (non-Javadoc)
     * @see org.apache.velocity.app.VelocityEngine#warn(java.lang.Object)
     */
    public void warn(Object arg0)
    {
        Velocity.warn(arg0);
    }

}

MonostateVelocityEngine (last edited 2009-09-20 22:06:14 by localhost)