/**
 * 
 */
package org.ajax4jsf.portlet;

import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collections;
import java.util.Enumeration;
import java.util.Set;
import javax.portlet.PortletContext;
import javax.portlet.PortletRequestDispatcher;

/**
 * @author asmirnov
 *
 */
public class MockPortletContext implements PortletContext {
    public static final String PORTLET_INIT_VALUE = "portlet_init_value";
    public static final String INIT_PARAMETER = "init_parameter";

    /* (non-Javadoc)
     * @see javax.portlet.PortletContext#getAttribute(java.lang.String)
     */
    public Object getAttribute(String arg0) {
	// TODO Auto-generated method stub
	return null;
    }

    /* (non-Javadoc)
     * @see javax.portlet.PortletContext#getAttributeNames()
     */
    public Enumeration getAttributeNames() {
	// TODO Auto-generated method stub
	return null;
    }

    /* (non-Javadoc)
     * @see javax.portlet.PortletContext#getInitParameter(java.lang.String)
     */
    public String getInitParameter(String arg0) {
	if (INIT_PARAMETER.equals(arg0)) {
	    return PORTLET_INIT_VALUE;
	}
	return null;
    }

    /* (non-Javadoc)
     * @see javax.portlet.PortletContext#getInitParameterNames()
     */
    public Enumeration getInitParameterNames() {
	return Collections.enumeration(Collections.singleton(INIT_PARAMETER));
    }

    /* (non-Javadoc)
     * @see javax.portlet.PortletContext#getMajorVersion()
     */
    public int getMajorVersion() {
	// TODO Auto-generated method stub
	return 0;
    }

    /* (non-Javadoc)
     * @see javax.portlet.PortletContext#getMimeType(java.lang.String)
     */
    public String getMimeType(String arg0) {
	// TODO Auto-generated method stub
	return null;
    }

    /* (non-Javadoc)
     * @see javax.portlet.PortletContext#getMinorVersion()
     */
    public int getMinorVersion() {
	// TODO Auto-generated method stub
	return 0;
    }

    /* (non-Javadoc)
     * @see javax.portlet.PortletContext#getNamedDispatcher(java.lang.String)
     */
    public PortletRequestDispatcher getNamedDispatcher(String arg0) {
	// TODO Auto-generated method stub
	return null;
    }

    /* (non-Javadoc)
     * @see javax.portlet.PortletContext#getPortletContextName()
     */
    public String getPortletContextName() {
	// TODO Auto-generated method stub
	return null;
    }

    /* (non-Javadoc)
     * @see javax.portlet.PortletContext#getRealPath(java.lang.String)
     */
    public String getRealPath(String arg0) {
	// TODO Auto-generated method stub
	return null;
    }

    /* (non-Javadoc)
     * @see javax.portlet.PortletContext#getRequestDispatcher(java.lang.String)
     */
    public PortletRequestDispatcher getRequestDispatcher(String arg0) {
	// TODO Auto-generated method stub
	return null;
    }

    /* (non-Javadoc)
     * @see javax.portlet.PortletContext#getResource(java.lang.String)
     */
    public URL getResource(String arg0) throws MalformedURLException {
	// TODO Auto-generated method stub
	return null;
    }

    /* (non-Javadoc)
     * @see javax.portlet.PortletContext#getResourceAsStream(java.lang.String)
     */
    public InputStream getResourceAsStream(String arg0) {
	// TODO Auto-generated method stub
	return null;
    }

    /* (non-Javadoc)
     * @see javax.portlet.PortletContext#getResourcePaths(java.lang.String)
     */
    public Set getResourcePaths(String arg0) {
	// TODO Auto-generated method stub
	return null;
    }

    /* (non-Javadoc)
     * @see javax.portlet.PortletContext#getServerInfo()
     */
    public String getServerInfo() {
	// TODO Auto-generated method stub
	return null;
    }

    /* (non-Javadoc)
     * @see javax.portlet.PortletContext#log(java.lang.String)
     */
    public void log(String arg0) {
	// TODO Auto-generated method stub
    }

    /* (non-Javadoc)
     * @see javax.portlet.PortletContext#log(java.lang.String, java.lang.Throwable)
     */
    public void log(String arg0, Throwable arg1) {
	// TODO Auto-generated method stub
    }

    /* (non-Javadoc)
     * @see javax.portlet.PortletContext#removeAttribute(java.lang.String)
     */
    public void removeAttribute(String arg0) {
	// TODO Auto-generated method stub
    }

    /* (non-Javadoc)
     * @see javax.portlet.PortletContext#setAttribute(java.lang.String, java.lang.Object)
     */
    public void setAttribute(String arg0, Object arg1) {
	// TODO Auto-generated method stub
    }
}
