01: /**
02: * @author <a href="mailto:novotny@gridsphere.org">Jason Novotny</a>
03: * @version $Id: RenderFormEventImpl.java 6385 2007-10-25 14:02:26Z wehrens $
04: */package org.gridsphere.provider.event.jsr.impl;
05:
06: import org.gridsphere.portletcontainer.DefaultPortletRender;
07: import org.gridsphere.provider.event.jsr.RenderFormEvent;
08: import org.gridsphere.provider.portletui.beans.TagBean;
09:
10: import javax.portlet.RenderRequest;
11: import javax.portlet.RenderResponse;
12: import java.util.HashMap;
13: import java.util.Map;
14:
15: /**
16: * A <code>RenderFormEvent</code> is sent by the portlet container when an HTTP request is
17: * received that is associated with an render event
18: */
19: public class RenderFormEventImpl extends BaseFormEventImpl implements
20: RenderFormEvent {
21:
22: private DefaultPortletRender render;
23:
24: /**
25: * Constructs an instance of RenderFormEventImpl given a render request and response
26: *
27: * @param render the <code>DefaultPortletRender</code>
28: * @param request the <code>RenderRequest</code>
29: * @param response the <code>RenderResponse</code>
30: * @param tagBeans a collection of tag beans
31: */
32: public RenderFormEventImpl(DefaultPortletRender render,
33: RenderRequest request, RenderResponse response,
34: Map<String, TagBean> tagBeans) {
35: super (request, response);
36: this .render = render;
37: this .tagBeans = tagBeans;
38: // Unless tagBeans is null, don't recreate them
39: if (tagBeans == null) {
40: tagBeans = new HashMap<String, TagBean>();
41: createTagBeans();
42: }
43: //logRequestParameters();
44: //logTagBeans();
45: }
46:
47: /**
48: * Return the render request associated with this render event
49: *
50: * @return the <code>RenderRequest</code>
51: */
52: public RenderRequest getRenderRequest() {
53: return (RenderRequest) portletRequest;
54: }
55:
56: /**
57: * Return the render response associated with this render event
58: *
59: * @return the <code>RenderResponse</code>
60: */
61: public RenderResponse getRenderResponse() {
62: return (RenderResponse) portletResponse;
63: }
64:
65: /**
66: * Returns the render event
67: *
68: * @return the render event
69: */
70: public DefaultPortletRender getRender() {
71: return render;
72: }
73:
74: }
|