|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The PortletRequest encapsulates the request sent by the client device to the portlet.
It is up the portlet container to enhance, extends, or modify the response as required before it is actually sent to the client.
PortletResponse
Inner Class Summary | |
static class |
PortletRequest.Type
|
Field Summary | |
static PortletRequest.Type |
ADMIN
The Portlet API should cater for a flexible administration of portlet too, however, the access policies need to be put in place in that case! |
static PortletRequest.Type |
ADMIN_SAVE
|
static PortletRequest.Type |
CONTENT
|
static PortletRequest.Type |
DETAILS
|
static PortletRequest.Type |
EDIT
|
static PortletRequest.Type |
EDIT_SAVE
|
static PortletRequest.Type |
HELP
|
Method Summary | |
java.lang.Object |
getAttribute(java.lang.String aName)
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 objects representing the client device that the user connects to the portal with. |
javax.servlet.http.Cookie[] |
getCookies()
Returns an array containing all cookies that the portal stored on behalf of the client. |
java.util.Locale |
getLocale()
Returns the locale of the preferred language. |
java.util.Enumeration |
getLocales()
Returns an enumeration of locales indicating, in decreasing order starting with the locale of the preferred languages, the preferred languages. |
MediaType |
getMediaType()
Returns the preferred media-type. |
java.util.Enumeration |
getMediaTypes()
Returns an array of media-types in decreasing order of preferrence. |
java.lang.String |
getMethod()
Returns the HTTP method of this request. |
java.lang.String |
getParameter(java.lang.String aName)
Returns the value of the parameter with the given name. |
java.util.Enumeration |
getParameterNames()
Returns an enumeration of all parameter names. |
java.lang.String[] |
getParameterValues(java.lang.String aName)
Returns the values of all parameters with the given name. |
javax.servlet.ServletRequest |
getServletRequest()
Returns the original servlet request as sent by the client device. |
PortletSession |
getSession()
Returns the current session associated with this request. |
PortletRequest.Type |
getType()
Returns the type of this request. |
void |
setAttribute(java.lang.String aName,
java.lang.Object aValue)
Associates an attribute with the given name and value with this request. |
Field Detail |
public static final PortletRequest.Type CONTENT
public static final PortletRequest.Type DETAILS
public static final PortletRequest.Type EDIT
public static final PortletRequest.Type EDIT_SAVE
public static final PortletRequest.Type HELP
public static final PortletRequest.Type ADMIN
public static final PortletRequest.Type ADMIN_SAVE
Method Detail |
public PortletRequest.Type getType()
public java.lang.String getMethod()
public Client getClient()
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.
getLocales()
public java.util.Enumeration getLocales()
getLocale()
public MediaType getMediaType()
public java.util.Enumeration getMediaTypes()
public java.lang.String getParameter(java.lang.String aName)
You should only use this method when you are sure the parameter has only one value. If not, use getParameterValues(String)
aName
- the parameter namegetParameterValues(String)
public java.util.Enumeration getParameterNames()
public java.lang.String[] getParameterValues(java.lang.String aName)
A request can carry more than one parameter with a certain name. This method returns these parameters in the order of appearance.
aName
- the parameter namegetParameter(String)
public void setAttribute(java.lang.String aName, java.lang.Object aValue)
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. The prefixing should probably be done by the portlet container.
aName
- the attribute nameaValue
- the attribute valuepublic java.lang.Object getAttribute(java.lang.String aName)
aName
- the attribute namepublic java.util.Enumeration getAttributeNames()
public javax.servlet.http.Cookie[] getCookies()
PortletResponse.addCookie(Cookie)
public PortletSession getSession()
public javax.servlet.ServletRequest getServletRequest()
PortletResponse.getServletResponse()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |