01: /*
02: * @author <a href="mailto:novotny@gridsphere.org">Jason Novotny</a>
03: * @version $Id: GridSphereEvent.java 6385 2007-10-25 14:02:26Z wehrens $
04: */
05: package org.gridsphere.portletcontainer;
06:
07: import org.gridsphere.layout.event.PortletComponentEvent;
08:
09: import javax.portlet.*;
10: import javax.servlet.http.HttpServletRequest;
11: import javax.servlet.http.HttpServletResponse;
12:
13: /**
14: * A <code>GridSphereEvent</code> represents a general portlet container
15: * event. The <code>GridSphereEvent</code> is passed into components that
16: * need to access the <code>PortletRequest</code>
17: * <code>PortletResponse</code> objects, such as the layout components.
18: */
19: public interface GridSphereEvent {
20:
21: /**
22: * Return the portlet context associated with this event
23: *
24: * @return the portlet context associated with this event
25: */
26: public PortletContext getPortletContext();
27:
28: public HttpServletRequest getHttpServletRequest();
29:
30: public HttpServletResponse getHttpServletResponse();
31:
32: public RenderRequest getRenderRequest();
33:
34: public RenderResponse getRenderResponse();
35:
36: public ActionRequest getActionRequest();
37:
38: public ActionResponse getActionResponse();
39:
40: /**
41: * Return the portlet action event
42: *
43: * @return the portlet action event
44: */
45: public DefaultPortletAction getAction();
46:
47: /**
48: * Return the portlet render event
49: *
50: * @return the portlet render event
51: */
52: public DefaultPortletRender getRender();
53:
54: /**
55: * Determines if there is an action associated with this event
56: *
57: * @return <code>true</code> if there is an action associated with this
58: * event, <code>false</code> otherwise
59: */
60: public boolean hasAction();
61:
62: /**
63: * Returns the layout component id associated with this page and event
64: *
65: * @return the layout component id or empty String if none exists
66: */
67: public String getComponentID();
68:
69: /**
70: * Returns the page layout id associated with this event
71: *
72: * @return page layout id or empty String if none exists
73: */
74: public String getLayoutID();
75:
76: public void addNewRenderEvent(PortletComponentEvent evt);
77:
78: public PortletComponentEvent getLastRenderEvent();
79:
80: /**
81: * Returns an object representing the client device that the user connects
82: * to the portal with.
83: *
84: * @return the client device
85: */
86: public Client getClient();
87: }
|