01: /*
02: * Created on 10-Mar-2003
03: */
04: package net.sf.jportlet.portlet;
05:
06: import javax.servlet.http.HttpServletRequest;
07:
08: /**
09: * The <code>PortletRequest</code> encapsulates the request sent by the
10: * client to the portlet
11: *
12: * @author <a href="mailto:tchbansi@sourceforge.net">Herve Tchepannou</a>
13: */
14: public interface PortletRequest extends HttpServletRequest {
15: //~ Methods ----------------------------------------------------------------
16:
17: /**
18: * Returns informations about the client device
19: *
20: * @return Client
21: */
22: public Client getClient();
23:
24: /**
25: * Returns the data of the portlet
26: * @return PortletData
27: */
28: public PortletData getData();
29:
30: /**
31: * Returns the mode of the portlet
32: *
33: * @return Mode
34: */
35: public Portlet.Mode getMode();
36:
37: /**
38: * Returns the current session or, if there is no current session,
39: * it creates one and returns it.
40: *
41: * @return PortletSession
42: */
43: public PortletSession getPortletSession();
44:
45: /**
46: * Returns the current session or, if there is no current session and the
47: * given flag is true, it creates one and returns it.
48: *
49: * @param create flag to create the session
50: *
51: * @return PortletSession
52: */
53: public PortletSession getPortletSession(boolean create);
54:
55: /**
56: * Returns the settings of the portlet
57: * @return PortletSettings
58: */
59: public PortletSettings getSettings();
60:
61: /**
62: * Return the information of the current user.
63: * If the user has not logged in, this method will return <code>null</code>
64: *
65: * @return User
66: */
67: public User getUser();
68:
69: /**
70: * Return the window of the portlet
71: * @return PortletWindow
72: */
73: public PortletWindow getWindow();
74: }
|