|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The PortletRequest
encapsulates the request sent by the
client to the portlet.
PortletResponse
Method Summary | |
java.lang.Object |
getAttribute(java.lang.String name)
Returns the value of the attribute with the given name, or null if no attribute with the given name exists. |
java.util.Enumeration |
getAttributeNames()
Returns an enumeration of names of all attributes available to this request. |
Client |
getClient()
Returns an object representing the client device that the user connects to the portal with. |
PortletData |
getData()
Returns the data of the virtual instance of this portlet If the portlet is run in CONFIGURE mode, the portlet data is not accessible and this method will return null .
|
java.util.Locale |
getLocale()
Returns the locale of the preferred language. |
java.lang.String |
getMethod()
Returns the HTTP method of this request. |
Portlet.Mode |
getMode()
Returns the mode that the portlet is running in. |
java.lang.String |
getParameter(java.lang.String name)
Returns the value of the parameter with the given name, or null if no such parameter exists.
|
java.util.Map |
getParameterMap()
Returns a map of the parameters of this request. |
java.util.Enumeration |
getParameterNames()
Returns an enumeration of all parameter names. |
java.lang.String[] |
getParameterValues(java.lang.String name)
Returns the values of all parameters with the given name. |
PortletSession |
getSession()
Returns the current session or, if there is no current session, it creates one and returns it. |
PortletSession |
getSession(boolean create)
Returns the current session or, if there is no current session and the given flag is true , it creates one and returns
it.
|
PortletWindow |
getWindow()
Returns the window that the portlet is running in. |
boolean |
isSecure()
Returns whether this request was made using a secure channel, such as HTTPS. |
void |
removeAttribute(java.lang.String name)
Removes the attribute with the given name. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Associates an attribute with the given name and value with this request. |
Method Detail |
public Portlet.Mode getMode()
public java.lang.String getMethod()
public java.util.Locale getLocale()
If more than one language is preferred, the locale returned by this method is the one with the highest preference.
public Client getClient()
public java.lang.String getParameter(java.lang.String name)
null
if no such parameter exists.
You should only use this method when you are sure the
parameter has only one value. If not, use
getParameterValues(String)
name
- the parameter name
getParameterMap()
,
getParameterValues(String)
public java.util.Map getParameterMap()
getParameter(String)
,
getParameterValues(String)
public java.util.Enumeration getParameterNames()
public java.lang.String[] getParameterValues(java.lang.String name)
A request can carry more than one parameter with a certain name. This method returns these parameters in the order of appearance.
name
- the parameter name
getParameterMap()
,
getParameter(String)
public void setAttribute(java.lang.String name, java.lang.Object value)
The portlet provider should take care that the the namespace of attribute names is not unnecessarily polluted. It is recommended to prefix all attributes the package and class name of the portlet that makes use of this method.
name
- the attribute namevalue
- the attribute valuepublic void removeAttribute(java.lang.String name)
name
- the name of attribute to be removedpublic java.lang.Object getAttribute(java.lang.String name)
null
if no attribute with the given name exists.
name
- the attribute name
public java.util.Enumeration getAttributeNames()
public boolean isSecure()
true
if channel is secure, false
otherwisepublic PortletWindow getWindow()
public PortletData getData()
If the portlet is run in CONFIGURE mode, the
portlet data is not accessible and this method will
return null
.
public PortletSession getSession()
public PortletSession getSession(boolean create)
true
, it creates one and returns
it.
If the given flag is false
and there is no current
portlet session, this method returns null
.
create
- true
to create a news session, false
to return null
of there
is no current session
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |