/*
 * JSPTem - use jsp's for all your templating!
 * Copyright (c) 2006, Paul Tuckey
 * All rights reserved.
 *
 * JSPTem is based on GNUJSP
 * Copyright (C) 1999, Yaroslav Faybishenko <yaroslav@cs.berkeley.edu>
 *
 * Each copy or derived work must preserve the copyright notice and this
 * notice unmodified.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
package org.tuckey.jsptem.servlet;

import javax.servlet.RequestDispatcher;
import javax.servlet.Servlet;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Enumeration;
import java.util.Set;


public class JspTemServletContext implements ServletContext {
    public int getMajorVersion() {
        return 0;
    }

    public int getMinorVersion() {
        return 0;
    }

    public String getServerInfo() {
        return null;
    }

    public String getServletContextName() {
        return null;
    }

    public void log(String string) {

    }

    public void removeAttribute(String string) {

    }

    public Enumeration getAttributeNames() {
        return null;
    }

    public Enumeration getInitParameterNames() {
        return null;
    }

    /**
     * @deprecated
     */
    public Enumeration getServletNames() {
        return null;
    }

    /**
     * @deprecated
     */
    public Enumeration getServlets() {
        return null;
    }

    public InputStream getResourceAsStream(String string) {
        return null;
    }

    public Object getAttribute(String string) {
        return null;
    }

    public void setAttribute(String string, Object object) {

    }

    /**
     * @deprecated
     */
    public void log(Exception exception, String string) {
        if (exception != null) System.out.println(exception);
        System.out.println(string); // todo: clean this up
    }

    public String getInitParameter(String string) {
        return null;
    }

    public String getMimeType(String string) {
        return null;
    }

    public String getRealPath(String string) {
        return null;
    }

    public void log(String string, Throwable throwable) {

    }

    public URL getResource(String string) throws MalformedURLException {
        return null;
    }

    public Set getResourcePaths(String string) {
        return null;
    }

    public RequestDispatcher getNamedDispatcher(String string) {
        return null;
    }

    public RequestDispatcher getRequestDispatcher(String string) {
        return null;
    }

    /**
     * @deprecated
     */
    public Servlet getServlet(String string) throws ServletException {
        return null;
    }

    public ServletContext getContext(String string) {
        return new JspTemServletContext();
    }
}
