|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Renderer
Classes can implement AbstractRenderer to protect from API changes.
| Method Summary | |
|---|---|
void |
finish(java.io.OutputStream outputStream,
RenderRequest renderRequest,
java.lang.String namespace,
boolean isDiscarded)
Finish with an OutputStream produced by this factory. |
void |
finish(java.io.PrintWriter writer,
RenderRequest request,
java.lang.String namespace,
boolean isDiscarded)
Finish with a Writer produced by this factory. |
int |
getBufferSize()
|
java.lang.String |
getDefaultContentType()
If isAlwaysWrite() or isAlwaysStream() is true, then a
Writer or OutputStream might be obtained before the content type of the
response has been set. |
java.io.OutputStream |
getOutputStream(java.io.OutputStream out,
RenderRequest renderRequest,
java.lang.String namespace)
Return an OutputStream that wraps the passed OutputStream, or null if there is no specialized writer for this request. |
java.io.PrintWriter |
getWriter(java.io.PrintWriter out,
RenderRequest request,
java.lang.String namespace)
Return a Writer that wraps the passed PrintWriter, or null if there is no specialized writer for this request. |
boolean |
isAlwaysStream()
If true the portal will always call getOutputStream(), even if the portlet does not call getOutputStream(), unless getWriter() has been called. |
boolean |
isAlwaysWrite()
If true the portal will always call getWriter(), even if the portlet does not call getWriter(), unless getOutputStream() has been called. |
boolean |
isPortletModeAllowed(PortletRequest request,
PortletMode portletMode)
Return true if the PortletMode is allowed. |
boolean |
isWindowStateAllowed(PortletRequest request,
WindowState windowState)
Return true if the WindowState is allowed. |
| Method Detail |
|---|
boolean isWindowStateAllowed(PortletRequest request,
WindowState windowState)
portletRequest.getResponseContentType() can be used
if the allowed portlet modes depends on the mime type of the
response.
boolean isPortletModeAllowed(PortletRequest request,
PortletMode portletMode)
portletRequest.getResponseContentType() can be used
if the allowed portlet modes depends on the mime type of the
response.
boolean isAlwaysWrite()
boolean isAlwaysStream()
java.lang.String getDefaultContentType()
isAlwaysWrite() or isAlwaysStream() is true, then a
Writer or OutputStream might be obtained before the content type of the
response has been set. IF that is the case, then this method is called to
detrmine a default content type.
int getBufferSize()
java.io.PrintWriter getWriter(java.io.PrintWriter out,
RenderRequest request,
java.lang.String namespace)
throws java.io.IOException
renderRequest.getResponseContentType() can be used
if the Renderer needs to know the content type.
renderRequest.getAttribute("javax.portlet.title") may contain a title
for the Window, if the portlet has set one.
java.io.IOException
void finish(java.io.PrintWriter writer,
RenderRequest request,
java.lang.String namespace,
boolean isDiscarded)
throws java.io.IOException
isDiscarded - true if the portal discarded the output.
Output is discarded when the portal wishes to discard any output
that has been made for the window, with the intention that the
window should not be rendered at all.
java.io.IOException
java.io.OutputStream getOutputStream(java.io.OutputStream out,
RenderRequest renderRequest,
java.lang.String namespace)
throws java.io.IOException
renderRequest.getResponseContentType() can be used
if the Renderer needs to know the content type.
renderRequest.getAttribute("javax.portlet.title") may contain a title
for the Window, if the portlet has set one.
java.io.IOException
void finish(java.io.OutputStream outputStream,
RenderRequest renderRequest,
java.lang.String namespace,
boolean isDiscarded)
throws java.io.IOException
discarded - true if the portal discarded the output, may occur
Output is discarded when the portal wishes to discard any output
that has been made for the window, with the intention that the
window should not be rendered at all.
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||