org.apache.pluto.core.impl
Class PortletResponseImpl

java.lang.Object
  extended by javax.servlet.http.HttpServletResponseWrapper
      extended by org.apache.pluto.core.impl.PortletResponseImpl
All Implemented Interfaces:
InternalPortletResponse
Direct Known Subclasses:
ActionResponseImpl, RenderResponseImpl

public abstract class PortletResponseImpl
extends javax.servlet.http.HttpServletResponseWrapper
implements InternalPortletResponse


Field Summary
private  boolean included
          true if we are in an include call
(package private)  PortletWindow portletWindow
           
private  java.util.Map properties
           
private  boolean usingStream
           
private  boolean usingWriter
           
private  javax.servlet.http.HttpServletRequest webModuleServletRequest
          this variable holds the servlet request of the target/portlet's web module
private  ServletOutputStream wrappedWriter
           
 
Constructor Summary
PortletResponseImpl(PortletWindow portletWindow, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
           
 
Method Summary
protected  javax.servlet.http.HttpServletResponse _getHttpServletResponse()
           
 void addCookie(javax.servlet.http.Cookie cookie)
           
 void addDateHeader(java.lang.String name, long date)
           
 void addHeader(java.lang.String name, java.lang.String value)
           
 void addIntHeader(java.lang.String name, int value)
           
 void addProperty(java.lang.String key, java.lang.String value)
           
 boolean containsHeader(java.lang.String name)
           
 java.lang.String encodeRedirectUrl(java.lang.String url)
          Deprecated. use encodeRedirectURL instead
 java.lang.String encodeRedirectURL(java.lang.String url)
           
 java.lang.String encodeUrl(java.lang.String url)
           
 java.lang.String encodeURL(java.lang.String path)
           
(package private)  HttpServletRequest getHttpDServletRequest()
           
protected  javax.servlet.http.HttpServletRequest getHttpServletRequest()
           
 PortletWindow getInternalPortletWindow()
           
 ServletOutputStream getOutputStream()
           
private  java.util.Map getProperties()
           
 java.io.PrintWriter getWriter()
           
 boolean isIncluded()
           
 void lateInit(javax.servlet.http.HttpServletRequest webModuleServletRequest, javax.servlet.http.HttpServletResponse webModuleServletResponse)
           
 void sendError(int sc)
           
 void sendError(int sc, java.lang.String msg)
           
 void sendRedirect(java.lang.String location)
           
 void setContentLength(int len)
           
 void setDateHeader(java.lang.String name, long date)
           
 void setHeader(java.lang.String name, java.lang.String value)
           
 void setIncluded(boolean included)
           
 void setIntHeader(java.lang.String name, int value)
           
 void setLocale(java.util.Locale loc)
           
 void setProperty(java.lang.String key, java.lang.String value)
           
 void setStatus(int sc)
           
 void setStatus(int sc, java.lang.String sm)
          Deprecated. As of version 2.1, due to ambiguous meaning of the message parameter. To set a status code use setStatus(int), to send an error with a description use sendError(int, String). Sets the status code and message for this response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

portletWindow

PortletWindow portletWindow

webModuleServletRequest

private javax.servlet.http.HttpServletRequest webModuleServletRequest
this variable holds the servlet request of the target/portlet's web module


usingWriter

private boolean usingWriter

usingStream

private boolean usingStream

wrappedWriter

private ServletOutputStream wrappedWriter

properties

private java.util.Map properties

included

private boolean included
true if we are in an include call

Constructor Detail

PortletResponseImpl

public PortletResponseImpl(PortletWindow portletWindow,
                           javax.servlet.http.HttpServletRequest servletRequest,
                           javax.servlet.http.HttpServletResponse servletResponse)
Method Detail

addProperty

public void addProperty(java.lang.String key,
                        java.lang.String value)

setProperty

public void setProperty(java.lang.String key,
                        java.lang.String value)

encodeURL

public java.lang.String encodeURL(java.lang.String path)

lateInit

public void lateInit(javax.servlet.http.HttpServletRequest webModuleServletRequest,
                     javax.servlet.http.HttpServletResponse webModuleServletResponse)
Specified by:
lateInit in interface InternalPortletResponse

_getHttpServletResponse

protected javax.servlet.http.HttpServletResponse _getHttpServletResponse()

getHttpServletRequest

protected javax.servlet.http.HttpServletRequest getHttpServletRequest()

getProperties

private java.util.Map getProperties()

addCookie

public void addCookie(javax.servlet.http.Cookie cookie)

containsHeader

public boolean containsHeader(java.lang.String name)

encodeRedirectUrl

public java.lang.String encodeRedirectUrl(java.lang.String url)
Deprecated. use encodeRedirectURL instead


encodeRedirectURL

public java.lang.String encodeRedirectURL(java.lang.String url)

sendRedirect

public void sendRedirect(java.lang.String location)
                  throws java.io.IOException
Throws:
java.io.IOException

setDateHeader

public void setDateHeader(java.lang.String name,
                          long date)

sendError

public void sendError(int sc,
                      java.lang.String msg)
               throws java.io.IOException
Throws:
java.io.IOException

sendError

public void sendError(int sc)
               throws java.io.IOException
Throws:
java.io.IOException

addHeader

public void addHeader(java.lang.String name,
                      java.lang.String value)

setIntHeader

public void setIntHeader(java.lang.String name,
                         int value)

addDateHeader

public void addDateHeader(java.lang.String name,
                          long date)

setHeader

public void setHeader(java.lang.String name,
                      java.lang.String value)

setStatus

public void setStatus(int sc)

setStatus

public void setStatus(int sc,
                      java.lang.String sm)
Deprecated. As of version 2.1, due to ambiguous meaning of the message parameter. To set a status code use setStatus(int), to send an error with a description use sendError(int, String). Sets the status code and message for this response.


addIntHeader

public void addIntHeader(java.lang.String name,
                         int value)

setContentLength

public void setContentLength(int len)

encodeUrl

public java.lang.String encodeUrl(java.lang.String url)

setLocale

public void setLocale(java.util.Locale loc)

getOutputStream

public ServletOutputStream getOutputStream()
                                    throws java.lang.IllegalStateException,
                                           java.io.IOException
Throws:
java.lang.IllegalStateException
java.io.IOException

getWriter

public java.io.PrintWriter getWriter()
                              throws java.io.UnsupportedEncodingException,
                                     java.lang.IllegalStateException,
                                     java.io.IOException
Throws:
java.io.UnsupportedEncodingException
java.lang.IllegalStateException
java.io.IOException

getInternalPortletWindow

public PortletWindow getInternalPortletWindow()
Specified by:
getInternalPortletWindow in interface InternalPortletResponse

getHttpDServletRequest

HttpServletRequest getHttpDServletRequest()

setIncluded

public void setIncluded(boolean included)
Specified by:
setIncluded in interface InternalPortletResponse

isIncluded

public boolean isIncluded()
Specified by:
isIncluded in interface InternalPortletResponse