|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ResourceResponse
The ResourceResponse defines an object to assist a portlet for rendering a resource.
The difference between the RenderResponse is that for the ResourceResponse the output of this response is delivered directly to the client without any additional markup added by the portal. It is therefore allowed for the portlet to return binary content in this response.
A portlet can set HTTP headers for the response via the setProperty or addProperty call in the ResourceResponse. To be successfully transmitted back to the client, headers must be set before the response is committed. Headers set after the response is committed will be ignored by the portlet container.
The portlet container creates a ResourceResponse object and passes it as argument to the portlet's serveResource method.
ResourceServingPortlet, MimeResponse| Field Summary | |
|---|---|
static String |
HTTP_STATUS_CODEConstant for setting the HTTP status code via the setProperty method. |
| Fields inherited from interface javax.portlet.MimeResponse |
|---|
CACHE_SCOPE, ETAG, EXPIRATION_CACHE, MARKUP_HEAD_ELEMENT, NAMESPACED_RESPONSE, PRIVATE_SCOPE, PUBLIC_SCOPE, USE_CACHED_CONTENT |
| Method Summary | |
|---|---|
PortletURL |
createActionURL()Creates a portlet URL targeting the portlet. |
PortletURL |
createRenderURL()Creates a portlet URL targeting the portlet. |
ResourceURL |
createResourceURL()Creates a portlet URL targeting the portlet. |
void |
setCharacterEncoding(String charset)Sets the character encoding (MIME charset) of the response being sent to the client, for example, to UTF-8. |
void |
setContentLength(int len)Sets the length of the content body in the response. |
void |
setLocale(Locale loc)Sets the locale of the response, setting the headers (including the Content-Type's charset) as appropriate. |
| Methods inherited from interface javax.portlet.MimeResponse |
|---|
flushBuffer, getBufferSize, getCacheControl, getCharacterEncoding, getContentType, getLocale, getPortletOutputStream, getWriter, isCommitted, reset, resetBuffer, setBufferSize, setContentType |
| Methods inherited from interface javax.portlet.PortletResponse |
|---|
addProperty, addProperty, addProperty, createElement, encodeURL, getNamespace, setProperty |
| Field Detail |
|---|
static final String HTTP_STATUS_CODE
setProperty method.
| Method Detail |
|---|
void setLocale(Locale loc)
loc - the new locale of the responsevoid setCharacterEncoding(String charset)
setContentType(java.lang.String) or setLocale(java.util.Locale), this method overrides it. Calling setContentType(java.lang.String) with the String of text/html and calling this method with the String of UTF-8 is equivalent with calling setContentType with the String of text/html; charset=UTF-8.
This method can be called repeatedly to change the character encoding. This method has no effect if it is called after getWriter has been called or after the response has been committed.
charset - a String specifying only the character set defined by IANA Character Sets (http://www.iana.org/assignments/character-sets)void setContentLength(int len)
len - an integer specifying the length of the content being returnedPortletURL createRenderURL()
MimeResponseThe returned URL can be further extended by adding portlet-specific parameters and portlet modes and window states.
The created URL will per default not contain any parameters of the current render request.
createRenderURL in interface MimeResponseIllegalStateException - if the cacheability level of the resource URL triggering this serveResource call is not PAGE and thus does not allow for creating render URLs.PortletURL createActionURL()
MimeResponseThe returned URL can be further extended by adding portlet-specific parameters and portlet modes and window states.
The created URL will per default not contain any parameters of the current render request.
createActionURL in interface MimeResponseIllegalStateException - if the cacheability level of the resource URL triggering this serveResource call is not PAGE and thus does not allow for creating action URLs.ResourceURL createResourceURL()
MimeResponseIf a request is triggered by the PortletURL, it results in a serve resource request of the ResourceServingPortlet interface.
The returned URL can be further extended by adding portlet-specific parameters .
The created URL will per default contain the current cacheability setting of the parent resource. If no parent resource is available, PAGE is the default.
createResourceURL in interface MimeResponseIllegalStateException - if the cacheability level of the resource URL triggering this serveResource call, or one of the parent calls, have defined a stricter cachability level.
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright © 2010, Oracle. All rights reserved.