    1   /***
    2    * JFoxSOAF, Service-Oriented Application Framework
    3    *
    4    * Copyright (C) www.huihoo.org
    5    *
    6    * Distributable under GNU LGPL For more information, please visit:
    7    * http://www.huihoo.org/jfox/jfoxsoaf
    8    */
    9
    10  package org.huihoo.jfox.soaf.util.filter;
    11
    12  import java.io.InputStream;
    13  import java.net.MalformedURLException;
    14  import java.net.URL;
    15  import java.util.Enumeration;
    16  import java.util.Set;
    17
    18  import javax.servlet.RequestDispatcher;
    19  import javax.servlet.Servlet;
    20  import javax.servlet.ServletContext;
    21  import javax.servlet.ServletException;
    22
    23  /***
    24   * Mock MockServletContext
    25   *
    26   * @author <a href="mailto:founder_chen@yahoo.com">Peter Cheng </a>
    27   * @version $Revision: 1.1 $ $Date: 2004/10/25 11:25:48 $
    28   * @version Revision: 1.0
    29   */
    30
    31  public class MockServletContext implements ServletContext {
    32
    33      /***
    34       * @see javax.servlet.ServletContext#getContext(java.lang.String)
    35       */
    36      public ServletContext getContext(String arg0) {
    37          return null;
    38      }
    39
    40      /***
    41       * @see javax.servlet.ServletContext#getMajorVersion()
    42       */
    43      public int getMajorVersion() {
    44          return 0;
    45      }
    46
    47      /***
    48       * @see javax.servlet.ServletContext#getMinorVersion()
    49       */
    50      public int getMinorVersion() {
    51          return 0;
    52      }
    53
    54      /***
    55       * @see javax.servlet.ServletContext#getMimeType(java.lang.String)
    56       */
    57      public String getMimeType(String arg0) {
    58          return null;
    59      }
    60
    61      /***
    62       * @see javax.servlet.ServletContext#getResourcePaths(java.lang.String)
    63       */
    64      public Set getResourcePaths(String arg0) {
    65          return null;
    66      }
    67
    68      /***
    69       * @see javax.servlet.ServletContext#getResource(java.lang.String)
    70       */
    71      public URL getResource(String arg0) throws MalformedURLException {
    72          return null;
    73      }
    74
    75      /***
    76       * @see javax.servlet.ServletContext#getResourceAsStream(java.lang.String)
    77       */
    78      public InputStream getResourceAsStream(String arg0) {
    79          return null;
    80      }
    81
    82      /***
    83       * @see javax.servlet.ServletContext#getRequestDispatcher(java.lang.String)
    84       */
    85      public RequestDispatcher getRequestDispatcher(String arg0) {
    86          return null;
    87      }
    88
    89      /***
    90       * @see javax.servlet.ServletContext#getNamedDispatcher(java.lang.String)
    91       */
    92      public RequestDispatcher getNamedDispatcher(String arg0) {
    93          return null;
    94      }
    95
    96      /***
    97       * @see javax.servlet.ServletContext#getServlet(java.lang.String)
    98       */
    99      public Servlet getServlet(String arg0) throws ServletException {
    100         return null;
    101     }
    102
    103     /***
    104      * @see javax.servlet.ServletContext#getServlets()
    105      */
    106     public Enumeration getServlets() {
    107         return null;
    108     }
    109
    110     /***
    111      * @see javax.servlet.ServletContext#getServletNames()
    112      */
    113     public Enumeration getServletNames() {
    114         return null;
    115     }
    116
    117     /***
    118      * @see javax.servlet.ServletContext#log(java.lang.String)
    119      */
    120     public void log(String arg0) {
    121     }
    122
    123     /***
    124      * @see javax.servlet.ServletContext#log(java.lang.Exception,
    125      *      java.lang.String)
    126      */
    127     public void log(Exception arg0, String arg1) {
    128     }
    129
    130     /***
    131      * @see javax.servlet.ServletContext#log(java.lang.String,
    132      *      java.lang.Throwable)
    133      */
    134     public void log(String arg0, Throwable arg1) {
    135     }
    136
    137     /***
    138      * @see javax.servlet.ServletContext#getRealPath(java.lang.String)
    139      */
    140     public String getRealPath(String arg0) {
    141         return null;
    142     }
    143
    144     /***
    145      * @see javax.servlet.ServletContext#getServerInfo()
    146      */
    147     public String getServerInfo() {
    148         return null;
    149     }
    150
    151     /***
    152      * @see javax.servlet.ServletContext#getInitParameter(java.lang.String)
    153      */
    154     public String getInitParameter(String arg0) {
    155         return null;
    156     }
    157
    158     /***
    159      * @see javax.servlet.ServletContext#getInitParameterNames()
    160      */
    161     public Enumeration getInitParameterNames() {
    162         return null;
    163     }
    164
    165     /***
    166      * @see javax.servlet.ServletContext#getAttribute(java.lang.String)
    167      */
    168     public Object getAttribute(String arg0) {
    169         return null;
    170     }
    171
    172     /***
    173      * @see javax.servlet.ServletContext#getAttributeNames()
    174      */
    175     public Enumeration getAttributeNames() {
    176         // TODO Auto-generated method stub
    177         return null;
    178     }
    179
    180     /***
    181      * @see javax.servlet.ServletContext#setAttribute(java.lang.String,
    182      *      java.lang.Object)
    183      */
    184     public void setAttribute(String arg0, Object arg1) {
    185     }
    186
    187     /***
    188      * @see javax.servlet.ServletContext#removeAttribute(java.lang.String)
    189      */
    190     public void removeAttribute(String arg0) {
    191     }
    192
    193     /***
    194      * @see javax.servlet.ServletContext#getServletContextName()
    195      */
    196     public String getServletContextName() {
    197         return null;
    198     }
    199
    200 }