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