KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > webwork > views > jsp > WebWorkMockHttpSession


1 /*
2  * Copyright (c) 2002-2003 by OpenSymphony
3  * All rights reserved.
4  */

5 package com.opensymphony.webwork.views.jsp;
6
7 import com.mockobjects.servlet.MockHttpSession;
8
9 import java.util.Enumeration JavaDoc;
10 import java.util.Hashtable JavaDoc;
11
12
13 /**
14  * WebWorkMockHttpSession
15  *
16  * @author Jason Carreira
17  * Created Jun 5, 2003 9:26:31 PM
18  */

19 public class WebWorkMockHttpSession extends MockHttpSession {
20     //~ Instance fields ////////////////////////////////////////////////////////
21

22     Hashtable JavaDoc attributes = new Hashtable JavaDoc();
23
24     //~ Methods ////////////////////////////////////////////////////////////////
25

26     public void setAttribute(String JavaDoc s, Object JavaDoc o) {
27         attributes.put(s, o);
28     }
29
30     public Object JavaDoc getAttribute(String JavaDoc s) {
31         return attributes.get(s);
32     }
33
34     public Enumeration JavaDoc getAttributeNames() {
35         return attributes.keys();
36     }
37
38     public void setExpectedAttribute(String JavaDoc s, Object JavaDoc o) {
39         throw new UnsupportedOperationException JavaDoc();
40     }
41
42     public void setExpectedRemoveAttribute(String JavaDoc s) {
43         throw new UnsupportedOperationException JavaDoc();
44     }
45
46     public void removeAttribute(String JavaDoc s) {
47         attributes.remove(s);
48     }
49
50     public void setupGetAttribute(String JavaDoc s, Object JavaDoc o) {
51         throw new UnsupportedOperationException JavaDoc();
52     }
53
54     public void setupGetAttributeNames(Enumeration JavaDoc enumeration) {
55         throw new UnsupportedOperationException JavaDoc();
56     }
57 }
58
Popular Tags