Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/milligan/eccles/evaluator/PageContextFacade.java


1   package org.milligan.eccles.evaluator;
2   
3   import java.util.Enumeration;
4   import javax.servlet.Servlet;
5   import javax.servlet.ServletConfig;
6   import javax.servlet.ServletContext;
7   import javax.servlet.ServletRequest;
8   import javax.servlet.ServletResponse;
9   import javax.servlet.http.HttpSession;
10  import javax.servlet.jsp.JspWriter;
11  import javax.servlet.jsp.PageContext;
12  
13  import org.milligan.eccles.RunStateEx;
14  import org.apache.log4j.Category;
15  
16  /**
17   * A helper class to interface with the JSTL SPEL. Make property functions appear as
18   * a PageContext
19   * @author Ian Tomey
20   *
21   */
22  
23  public class PageContextFacade extends PageContext {
24    protected static final Category log = Category.getInstance( PageContextFacade.class );
25  
26    /**
27     * The run state
28     */
29    protected RunStateEx state;
30  
31    public PageContextFacade(RunStateEx state) {
32      this.state = state;
33    }
34  
35    public HttpSession getSession() {
36      throw new java.lang.UnsupportedOperationException("getSession not supported");
37    }
38    public void handlePageException(Exception parm1) throws javax.servlet.ServletException, java.io.IOException {
39      throw new java.lang.UnsupportedOperationException("handlePageException not supported");
40    }
41    public ServletConfig getServletConfig() {
42      throw new java.lang.UnsupportedOperationException("getServletConfig not supported");
43    }
44    public void include(String parm1) throws javax.servlet.ServletException, java.io.IOException {
45      throw new java.lang.UnsupportedOperationException("include not supported");
46    }
47    public void release() {
48      throw new java.lang.UnsupportedOperationException("release not supported");
49    }
50    public void removeAttribute(String parm1, int parm2) {
51      throw new java.lang.UnsupportedOperationException("removeAttribute not supported");
52    }
53    public void removeAttribute(String parm1) {
54      throw new java.lang.UnsupportedOperationException("removeAttribute not supported");
55    }
56    public JspWriter getOut() {
57      throw new java.lang.UnsupportedOperationException("getOut not supported");
58    }
59    public void handlePageException(Throwable parm1) throws javax.servlet.ServletException, java.io.IOException {
60      throw new java.lang.UnsupportedOperationException("handlePageException not supported");
61    }
62    public Object getPage() {
63      throw new java.lang.UnsupportedOperationException("getPage not supported");
64    }
65    public void setAttribute(String parm1, Object parm2, int parm3) {
66      throw new java.lang.UnsupportedOperationException("setAttribute not supported");
67    }
68    public void forward(String parm1) throws javax.servlet.ServletException, java.io.IOException {
69      throw new java.lang.UnsupportedOperationException("forward not supported");
70    }
71  
72    public ServletContext getServletContext() {
73      throw new java.lang.UnsupportedOperationException("getServletContext not supported");
74    }
75    public Exception getException() {
76      throw new java.lang.UnsupportedOperationException("getException not supported");
77    }
78  
79    public void initialize(Servlet parm1, ServletRequest parm2, ServletResponse parm3, String parm4, boolean parm5, int parm6, boolean parm7) throws java.io.IOException, java.lang.IllegalStateException, java.lang.IllegalArgumentException {
80      throw new java.lang.UnsupportedOperationException("initialize not supported");
81    }
82    public Enumeration getAttributeNamesInScope(int parm1) {
83      throw new java.lang.UnsupportedOperationException("getAttributeNamesInScope not supported");
84    }
85  
86    public ServletResponse getResponse() {
87      throw new java.lang.UnsupportedOperationException("getResponse not supported");
88    }
89    public int getAttributesScope(String parm1) {
90      throw new java.lang.UnsupportedOperationException("getAttributesScope not supported");
91    }
92  
93    public ServletRequest getRequest() {
94      throw new java.lang.UnsupportedOperationException("getRequest not supported");
95    }
96  
97    public Object getAttribute(String parm1) {
98      throw new java.lang.UnsupportedOperationException("getAttribute not supported");
99    }
100 
101   public void setAttribute(String parm1, Object parm2) {
102     throw new java.lang.UnsupportedOperationException("setAttribute not supported");
103   }
104 
105   /**
106    * Implementation of find attribute. just do a lookup on the state
107    * @param parm1
108    * @return
109    */
110   public Object findAttribute(String parm1) {
111     if ( parm1.equals("_tag") )
112        return state.getTag();
113 
114     Object o = state.findProperty(parm1);
115     return o;
116   }
117   public Object getAttribute(String parm1, int parm2) {
118     throw new java.lang.UnsupportedOperationException("getAttribute(String, int) not supported");
119   }
120 }