1   /*
2    * Copyright 2001-2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.portletbridge.mock;
17  
18  import java.security.Principal;
19  import java.util.Enumeration;
20  import java.util.Locale;
21  import java.util.Map;
22  
23  import javax.portlet.PortalContext;
24  import javax.portlet.PortletMode;
25  import javax.portlet.PortletPreferences;
26  import javax.portlet.PortletSession;
27  import javax.portlet.RenderRequest;
28  import javax.portlet.WindowState;
29  
30  /***
31   * @author jmccrindle
32   */
33  public class MockRenderRequest implements RenderRequest {
34  
35      private WindowState windowState;
36      private PortletMode portletMode;
37      private PortletSession portletSession;
38      private PortletPreferences portletPreferences;
39  
40      /***
41       * 
42       */
43      public MockRenderRequest() {
44          super();
45      }
46  
47      /* (non-Javadoc)
48       * @see javax.portlet.PortletRequest#isWindowStateAllowed(javax.portlet.WindowState)
49       */
50      public boolean isWindowStateAllowed(WindowState arg0) {
51          // TODO Auto-generated method stub
52          return false;
53      }
54  
55      /* (non-Javadoc)
56       * @see javax.portlet.PortletRequest#isPortletModeAllowed(javax.portlet.PortletMode)
57       */
58      public boolean isPortletModeAllowed(PortletMode arg0) {
59          // TODO Auto-generated method stub
60          return false;
61      }
62  
63      /* (non-Javadoc)
64       * @see javax.portlet.PortletRequest#getPortletMode()
65       */
66      public PortletMode getPortletMode() {
67          return portletMode;
68      }
69  
70      /* (non-Javadoc)
71       * @see javax.portlet.PortletRequest#getWindowState()
72       */
73      public WindowState getWindowState() {
74          return windowState;
75      }
76  
77      /* (non-Javadoc)
78       * @see javax.portlet.PortletRequest#getPreferences()
79       */
80      public PortletPreferences getPreferences() {
81          return portletPreferences;
82      }
83  
84      /* (non-Javadoc)
85       * @see javax.portlet.PortletRequest#getPortletSession()
86       */
87      public PortletSession getPortletSession() {
88          return portletSession;
89      }
90  
91      /* (non-Javadoc)
92       * @see javax.portlet.PortletRequest#getPortletSession(boolean)
93       */
94      public PortletSession getPortletSession(boolean arg0) {
95          return portletSession;
96      }
97  
98      /* (non-Javadoc)
99       * @see javax.portlet.PortletRequest#getProperty(java.lang.String)
100      */
101     public String getProperty(String arg0) {
102         // TODO Auto-generated method stub
103         return null;
104     }
105 
106     /* (non-Javadoc)
107      * @see javax.portlet.PortletRequest#getProperties(java.lang.String)
108      */
109     public Enumeration getProperties(String arg0) {
110         // TODO Auto-generated method stub
111         return null;
112     }
113 
114     /* (non-Javadoc)
115      * @see javax.portlet.PortletRequest#getPropertyNames()
116      */
117     public Enumeration getPropertyNames() {
118         // TODO Auto-generated method stub
119         return null;
120     }
121 
122     /* (non-Javadoc)
123      * @see javax.portlet.PortletRequest#getPortalContext()
124      */
125     public PortalContext getPortalContext() {
126         // TODO Auto-generated method stub
127         return null;
128     }
129 
130     /* (non-Javadoc)
131      * @see javax.portlet.PortletRequest#getAuthType()
132      */
133     public String getAuthType() {
134         // TODO Auto-generated method stub
135         return null;
136     }
137 
138     /* (non-Javadoc)
139      * @see javax.portlet.PortletRequest#getContextPath()
140      */
141     public String getContextPath() {
142         // TODO Auto-generated method stub
143         return null;
144     }
145 
146     /* (non-Javadoc)
147      * @see javax.portlet.PortletRequest#getRemoteUser()
148      */
149     public String getRemoteUser() {
150         // TODO Auto-generated method stub
151         return null;
152     }
153 
154     /* (non-Javadoc)
155      * @see javax.portlet.PortletRequest#getUserPrincipal()
156      */
157     public Principal getUserPrincipal() {
158         // TODO Auto-generated method stub
159         return null;
160     }
161 
162     /* (non-Javadoc)
163      * @see javax.portlet.PortletRequest#isUserInRole(java.lang.String)
164      */
165     public boolean isUserInRole(String arg0) {
166         // TODO Auto-generated method stub
167         return false;
168     }
169 
170     /* (non-Javadoc)
171      * @see javax.portlet.PortletRequest#getAttribute(java.lang.String)
172      */
173     public Object getAttribute(String arg0) {
174         // TODO Auto-generated method stub
175         return null;
176     }
177 
178     /* (non-Javadoc)
179      * @see javax.portlet.PortletRequest#getAttributeNames()
180      */
181     public Enumeration getAttributeNames() {
182         // TODO Auto-generated method stub
183         return null;
184     }
185 
186     /* (non-Javadoc)
187      * @see javax.portlet.PortletRequest#getParameter(java.lang.String)
188      */
189     public String getParameter(String arg0) {
190         // TODO Auto-generated method stub
191         return null;
192     }
193 
194     /* (non-Javadoc)
195      * @see javax.portlet.PortletRequest#getParameterNames()
196      */
197     public Enumeration getParameterNames() {
198         // TODO Auto-generated method stub
199         return null;
200     }
201 
202     /* (non-Javadoc)
203      * @see javax.portlet.PortletRequest#getParameterValues(java.lang.String)
204      */
205     public String[] getParameterValues(String arg0) {
206         // TODO Auto-generated method stub
207         return null;
208     }
209 
210     /* (non-Javadoc)
211      * @see javax.portlet.PortletRequest#getParameterMap()
212      */
213     public Map getParameterMap() {
214         // TODO Auto-generated method stub
215         return null;
216     }
217 
218     /* (non-Javadoc)
219      * @see javax.portlet.PortletRequest#isSecure()
220      */
221     public boolean isSecure() {
222         // TODO Auto-generated method stub
223         return false;
224     }
225 
226     /* (non-Javadoc)
227      * @see javax.portlet.PortletRequest#setAttribute(java.lang.String, java.lang.Object)
228      */
229     public void setAttribute(String arg0, Object arg1) {
230         // TODO Auto-generated method stub
231         
232     }
233 
234     /* (non-Javadoc)
235      * @see javax.portlet.PortletRequest#removeAttribute(java.lang.String)
236      */
237     public void removeAttribute(String arg0) {
238         // TODO Auto-generated method stub
239         
240     }
241 
242     /* (non-Javadoc)
243      * @see javax.portlet.PortletRequest#getRequestedSessionId()
244      */
245     public String getRequestedSessionId() {
246         // TODO Auto-generated method stub
247         return null;
248     }
249 
250     /* (non-Javadoc)
251      * @see javax.portlet.PortletRequest#isRequestedSessionIdValid()
252      */
253     public boolean isRequestedSessionIdValid() {
254         // TODO Auto-generated method stub
255         return false;
256     }
257 
258     /* (non-Javadoc)
259      * @see javax.portlet.PortletRequest#getResponseContentType()
260      */
261     public String getResponseContentType() {
262         // TODO Auto-generated method stub
263         return null;
264     }
265 
266     /* (non-Javadoc)
267      * @see javax.portlet.PortletRequest#getResponseContentTypes()
268      */
269     public Enumeration getResponseContentTypes() {
270         // TODO Auto-generated method stub
271         return null;
272     }
273 
274     /* (non-Javadoc)
275      * @see javax.portlet.PortletRequest#getLocale()
276      */
277     public Locale getLocale() {
278         // TODO Auto-generated method stub
279         return null;
280     }
281 
282     /* (non-Javadoc)
283      * @see javax.portlet.PortletRequest#getLocales()
284      */
285     public Enumeration getLocales() {
286         // TODO Auto-generated method stub
287         return null;
288     }
289 
290     /* (non-Javadoc)
291      * @see javax.portlet.PortletRequest#getScheme()
292      */
293     public String getScheme() {
294         // TODO Auto-generated method stub
295         return null;
296     }
297 
298     /* (non-Javadoc)
299      * @see javax.portlet.PortletRequest#getServerName()
300      */
301     public String getServerName() {
302         // TODO Auto-generated method stub
303         return null;
304     }
305 
306     /* (non-Javadoc)
307      * @see javax.portlet.PortletRequest#getServerPort()
308      */
309     public int getServerPort() {
310         // TODO Auto-generated method stub
311         return 0;
312     }
313     
314     public void setupWindowState(WindowState windowState) {
315         this.windowState = windowState;
316     }
317     
318     public void setupPortletMode(PortletMode portletMode) {
319         this.portletMode = portletMode;
320     }
321     
322     public void setupPortletSession(PortletSession portletSession) {
323         this.portletSession = portletSession;
324     }
325     
326     public void setupPortletPreferences(PortletPreferences portletPreferences) {
327         this.portletPreferences = portletPreferences;
328     }
329 
330 }