|
Oracle Fusion Middleware Java API Reference for Oracle PDK Java 11g Release 1 (11.1.1) E10691-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PortletRenderRequest
The PortletRenderRequest contains all the request details a renderer needs to process the request and output its rendition. A single renderer is responsible for rendering each of the Portlet render modes (see getMode()).
When this renderer is running in a servlet environment the servlet (base)
objects are accessible as attributes of the PortletRendererRequest.
To get the HttpServletRequest object call:
renderRequest.getAttribute(HttpCommonConstants.SERVLET_REQUEST).
To get the ServletContext object call:
renderRequest.getAttribute(HttpCommonConstants.SERVLET_CONTEXT).
To get the ServletConfig object call:
renderRequest.getAttribute(HttpCommonConstants.SERVLET_CONFIG).
Field Summary | |
---|---|
static java.lang.String |
IS_PORTLET
An attribute to indicate the request is a portal request. |
Method Summary | |
---|---|
java.lang.String[] |
getAcceptContentTypes()
|
java.lang.Object |
getAttribute(java.lang.String name)
Data can be passed between object in a request via attr/value pairs hung off the RequestContext. |
java.util.Enumeration |
getAttributeNames()
returns the names of this request's attributes |
java.lang.String |
getContentType()
Gets the current contentType of this request's response. |
java.lang.Object[] |
getCookies()
An array of cookies passed to this request. |
java.util.Locale |
getDefaultLocale()
Returns the Portal's default Locale. |
java.util.Locale |
getLocale()
The Java Locale to be used for this response. |
java.util.Enumeration |
getLocales()
Returns an Enumeration of Locale objects indicating, in decreasing order starting with the preferred locale, the locales that are acceptable to the client based on the Accept-Language header. |
int |
getMode()
|
java.lang.String |
getOriginalHeader(java.lang.String name)
If this is a mobile request iAS Wireless will have overwritten some of the client's original HTTP headers: specifically the Accept and the UserAgent header. |
java.lang.String |
getParameter(java.lang.String name)
Returns the request parameter(value) of the given name. |
java.util.Enumeration |
getParameterNames()
Returns an enumeration containing the parameter names passed in this request. |
java.lang.String[] |
getParameterValues(java.lang.String name)
Returns the values for the named request parameter. |
PortletDefinition |
getPortletDefinition()
Gets the PortletDefinition associated with this request. |
PortletInstance |
getPortletInstance()
|
PortletReference |
getPortletReference()
|
java.lang.String |
getPreferredContentType()
|
ProviderInstance |
getProviderInstance()
Gets the ProviderInstance associated with this request. |
java.util.ResourceBundle |
getProviderResource()
Returns the Provider resource associated with the Locale of this request. |
java.lang.String |
getQualifiedParameter(java.lang.String name)
Returns the qualified request parameter of the given non-qualified name. |
java.util.Enumeration |
getQualifiedParameterNames()
Returns an enumeration containing only those parameter names that match this portlets fully qualified name. |
java.lang.String[] |
getQualifiedParameterValues(java.lang.String name)
Returns the qualified request parameter values of the given non-qualified name. |
RenderContext |
getRenderContext()
|
java.lang.String |
getRequestURL()
|
java.lang.String |
getScheme()
The scheme we are running in. |
java.lang.String |
getServerName()
Server name. |
int |
getServerPort()
Port used by this server. |
ProviderSession |
getSession()
A session is an object that maintains state across requests. |
java.lang.String |
getURLCharSet()
Returns the character set that was used when the parameters of the request were encoded. |
ProviderUser |
getUser()
|
java.lang.String |
getUserAgent()
The user agent that originated this request. |
java.io.PrintWriter |
getWriter()
Returns a PrintWriter used to emit this request's response. |
java.io.PrintWriter |
getWriter(java.lang.String contentType)
Returns a PrintWriter used to emit this request's response. |
void |
removeAttribute(java.lang.String name)
Removes an existing attribute. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Data can be passed between object in a request via attr/value pairs hung off the RequestContext. |
void |
setContentType(java.lang.String contentType)
Sets the contentType for this request's response. |
Field Detail |
---|
static final java.lang.String IS_PORTLET
Method Detail |
---|
RenderContext getRenderContext()
PortletRenderRequest
java.lang.String[] getAcceptContentTypes() throws java.lang.IllegalStateException
java.lang.IllegalStateException
java.lang.String getPreferredContentType() throws java.lang.IllegalStateException
java.lang.IllegalStateException
int getMode() throws java.lang.IllegalStateException
java.lang.IllegalStateException
java.lang.String getRequestURL() throws java.lang.IllegalStateException
java.lang.IllegalStateException
PortletReference getPortletReference()
PortletInstance getPortletInstance()
ProviderUser getUser()
java.lang.String getOriginalHeader(java.lang.String name)
name
- the header name you want the original value for. I.e. if
you pass "Accept" you will receive the original value of "Accept"
whether its been overwritten or not.ProviderInstance getProviderInstance()
PortletDefinition getPortletDefinition()
java.lang.String getScheme()
java.lang.String getUserAgent()
java.lang.String getServerName()
int getServerPort()
java.lang.String getParameter(java.lang.String name)
name
- the name of the parameter whose value is requested.java.lang.String getQualifiedParameter(java.lang.String name)
Fully-qualified parameter names are somewhat inconvenient to use because they are dynamic. I.e. they are isntance-based. This method helps to overcome this inconvenience by allowing you to retrieve the fully qualified parameter name value passing only the non-qualified name. E.g. calling request.getQualifiedParameter("symbol") will return the value for the parameter named "curProviderId.curPortletId.curInstanceName.symbol". As with getParameter(), if there are duplicates the first value is returned. Returned Parameter values are encoded using the RequestContext's encoding. By default this is ISO-8859-1.
name
- the unqualfied name of the parameter whose value is requested.
java.lang.String[] getParameterValues(java.lang.String name)
name
- the name of the parameter whose value is requested.
java.lang.String[] getQualifiedParameterValues(java.lang.String name)
Fully-qualified parameter names are somewhat inconvenient to use because they are dynamic. I.e. they are isntance-based. This method helps to overcome this inconvenience by allowing you to retrieve the fully qualified parameter name value passing only the non-qualified name. E.g. calling request.getQualifiedParameterValues("symbol") will return the values for the parameter named "curProviderId.curPortletId.curInstanceName.symbol". Returned Parameter values are encoded using the RequestContext's encoding. By default this is ISO-8859-1.
name
- the unqualfied name of the parameter whose value is requested.
java.util.Enumeration getParameterNames()
java.util.Enumeration getQualifiedParameterNames()
java.io.PrintWriter getWriter() throws java.io.IOException
Note:
if null is passed the content type of the response is set to "text/html". The character encoding used is based on the default encoding of the request.
After the first call to any of the getWriter() methods the content type cannot be changed.
java.io.IOException
java.io.PrintWriter getWriter(java.lang.String contentType) throws java.io.IOException
Note:
Uses the content type specified by calling setContentType() or defaults the content type of the response to "text/html". The character encoding used is based on the default encoding of the request.
After the first call to any of the getWriter() methods the content type and character encoding cannot be changed.
java.io.IOException
void setContentType(java.lang.String contentType)
java.lang.String getContentType()
java.util.Locale getLocale()
java.util.Enumeration getLocales()
java.util.Locale getDefaultLocale()
null
. When null
or
when the portlet doesn't support this locale the Portlet's default Locale should
be used. This is accessible via the Portlet interface (getDefaultLocale()
).
Alternatively, you might consider using the getDefaultLocale()
method in the
PortletReference
interface. This method is defined to return the Portlet's
default locale if the Portal hasn't passed one.
java.util.ResourceBundle getProviderResource()
ProviderSession getSession()
java.lang.Object[] getCookies()
void setAttribute(java.lang.String name, java.lang.Object value)
name
- the name of the attribute.value
- the value for the attribute.java.lang.Object getAttribute(java.lang.String name)
name
- the name of the attribute.
java.util.Enumeration getAttributeNames()
void removeAttribute(java.lang.String name)
name
- the name of the attribute.java.lang.String getURLCharSet()
|
Oracle Fusion Middleware Java API Reference for Oracle PDK Java 11g Release 1 (11.1.1) E10691-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |