1 16 package org.apache.myfaces.context.servlet; 17 18 import java.util.Enumeration ; 19 import java.util.HashMap ; 20 import java.util.Map ; 21 22 import javax.servlet.ServletContext ; 23 import javax.servlet.http.HttpSession ; 24 import javax.servlet.http.HttpSessionContext ; 25 26 27 41 public class ServletSessionMock implements HttpSession 42 { 43 private final Map _attributes = new HashMap (); 44 45 public ServletSessionMock() 46 { 47 super(); 48 } 50 51 public long getCreationTime() 52 { 53 return 0; 55 } 56 57 public String getId() 58 { 59 return null; 61 } 62 63 public long getLastAccessedTime() 64 { 65 return 0; 67 } 68 69 public ServletContext getServletContext() 70 { 71 return null; 73 } 74 75 public void setMaxInactiveInterval(int arg0) 76 { 77 79 } 80 81 public int getMaxInactiveInterval() 82 { 83 return 0; 85 } 86 87 public HttpSessionContext getSessionContext() 88 { 89 return null; 91 } 92 93 public Object getAttribute(String key) 94 { 95 return _attributes.get(key); 96 } 97 98 public Object getValue(String arg0) 99 { 100 return null; 102 } 103 104 public Enumeration getAttributeNames() 105 { 106 return null; 108 } 109 110 public String [] getValueNames() 111 { 112 return null; 114 } 115 116 public void setAttribute(String key, Object value) 117 { 118 _attributes.put(key, value); 119 } 120 121 public void putValue(String arg0, Object arg1) 122 { 123 125 } 126 127 public void removeAttribute(String arg0) 128 { 129 131 } 132 133 public void removeValue(String arg0) 134 { 135 137 } 138 139 public void invalidate() 140 { 141 143 } 144 145 public boolean isNew() 146 { 147 return false; 149 } 150 151 } 152 | Popular Tags |