| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PortletResponse
The PortletResponse interface represents the response sent to the client device.
It is up to the portlet container to enhance, extend, or modify the response as required before it is actually sent to the client device.
Method Summary | |
---|---|
void | addCookie(javax.servlet.http.Cookie cookie)
Adds the specified cookie to the response. |
void | addDateHeader(java.lang.String name,
long date)
Adds a response header with the given name and date-value. |
void | addHeader(java.lang.String name,
java.lang.String value)
Adds a response header with the given name and value. |
void | addIntHeader(java.lang.String name,
int value)
Adds a response header with the given name and integer value. |
boolean | containsHeader(java.lang.String name)
Returns a boolean indicating whether the named response header has already been set. |
PortletURI | createReturnURI()
Creates a portlet URI pointing at the referrer of the portlet. |
PortletURI | createURI()
Creates a portlet URI pointing to the current portlet mode. |
PortletURI | createURI(PortletWindow.State state)
Creates a portlet URI pointing to the current portlet mode and given portlet window state. |
java.lang.String | encodeNamespace(java.lang.String aValue)
Maps the given string value into this portlet's namespace. |
java.lang.String | encodeURI(java.lang.String path)
Deprecated. use encodeURL(java.lang.String) since version 1.1 |
java.lang.String | encodeURL(java.lang.String path)
Returns the encoded URI of the resource at the given path. |
java.lang.String | getCharacterEncoding()
Returns the name of the charset used for the MIME body sent in this response. |
java.lang.String | getCharacterSet()
Deprecated. use getCharacterEncoding since version 1.1 |
java.lang.String | getContentType()
Returns the content type that can be used to contribute markup to the portlet response. |
java.io.PrintWriter | getWriter()
Returns the writer object that can be used to contribute markup to the portlet response. |
void | setDateHeader(java.lang.String name,
long date)
Sets a response header with the given name and date-value. |
void | setHeader(java.lang.String name,
java.lang.String value)
Sets a response header with the given name and value. |
void | setIntHeader(java.lang.String name,
int value)
Sets a response header with the given name and integer value. |
Method Detail |
---|
java.io.PrintWriter getWriter() throws java.io.IOException
It is important to note that the markup generated by the portlet is either a full document or just a fragment of the markup. A corresponding setting in the deployment descriptor has to be made.
java.lang.String getContentType()
java.lang.String getCharacterEncoding()
If no charset has been assigned, it is implicitly
set to ISO-8859-1
(Latin-1
).
See RFC 2047 (http://ds.internic.net/rfc/rfc2045.txt) for more information about character encoding and MIME.
String
specifying the
name of the charset, for
example, ISO-8859-1
java.lang.String getCharacterSet()
PortletURI createURI()
PortletURI createURI(PortletWindow.State state)
PortletURI createReturnURI()
java.lang.String encodeURI(java.lang.String path)
java.lang.String encodeURL(java.lang.String path)
This method must be called on all resource URLs (images etc.) before they are written to the output writer. It must not be called on portal or portlet URLs that were generated using APIs like createURI()
The given path may be a relative path inside the portlet WAR file like images/myimage.gif, which must be relative to the root of the WAR archive. For historical compatibility reasons, absolute paths that do not start with the portlet or portal context root are also treated as relative paths inside the portlet WAR; e.g. /images/myimage.gif is equivalent to images/myimage.gif.
The output of this method may not necessarily be a valid URL, it may also be a token that is later replaced in the portlet output processing. The only valid use of the this method is to write the result to the portlet output stream.
java.lang.String encodeNamespace(java.lang.String aValue)
void addCookie(javax.servlet.http.Cookie cookie)
The portlet container encodes the cookie name in the concrete portlet instances' namespace.
boolean containsHeader(java.lang.String name)
true
if the named response header
has already been set;
false
otherwisevoid setDateHeader(java.lang.String name, long date)
containsHeader
method can be used to test for the
presence of a header before setting its value.
We need to think about all header methods and how to solve nameclashes, etc.
void addDateHeader(java.lang.String name, long date)
We need to think about all header methods and how to solve nameclashes, etc.
void setHeader(java.lang.String name, java.lang.String value)
containsHeader
method can be
used to test for the presence of a header before setting its
value.
We need to think about all header methods and how to solve nameclashes, etc.
void addHeader(java.lang.String name, java.lang.String value)
We need to think about all header methods and how to solve nameclashes, etc.
void setIntHeader(java.lang.String name, int value)
containsHeader
method can be used to test for the presence of a header before
setting its value.
We need to think about all header methods and how to solve nameclashes, etc.
void addIntHeader(java.lang.String name, int value)
We need to think about all header methods and how to solve nameclashes, etc.
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |