org.springframework.mock.web.portlet
Class MockRenderResponse

java.lang.Object
  extended by org.springframework.mock.web.portlet.MockPortletResponse
      extended by org.springframework.mock.web.portlet.MockRenderResponse
All Implemented Interfaces:
javax.portlet.PortletResponse, javax.portlet.RenderResponse

public class MockRenderResponse
extends MockPortletResponse
implements javax.portlet.RenderResponse

Mock implementation of the RenderResponse interface.

Since:
2.0
Author:
John A. Lewis, Juergen Hoeller

Field Summary
 
Fields inherited from interface javax.portlet.RenderResponse
EXPIRATION_CACHE
 
Constructor Summary
MockRenderResponse()
          Create a new MockRenderResponse with a default MockPortalContext.
MockRenderResponse(javax.portlet.PortalContext portalContext)
          Create a new MockRenderResponse.
 
Method Summary
 javax.portlet.PortletURL createActionURL()
           
 javax.portlet.PortletURL createRenderURL()
           
 void flushBuffer()
           
 int getBufferSize()
           
 String getCharacterEncoding()
           
 byte[] getContentAsByteArray()
           
 String getContentAsString()
           
 String getContentType()
           
 String getIncludedUrl()
           
 Locale getLocale()
           
 String getNamespace()
           
 OutputStream getPortletOutputStream()
           
 String getTitle()
           
 PrintWriter getWriter()
           
 boolean isCommitted()
           
 void reset()
           
 void resetBuffer()
           
 void setBufferSize(int bufferSize)
           
 void setCharacterEncoding(String characterEncoding)
           
 void setCommitted(boolean committed)
           
 void setContentType(String contentType)
           
 void setIncludedUrl(String includedUrl)
           
 void setLocale(Locale locale)
           
 void setTitle(String title)
           
 
Methods inherited from class org.springframework.mock.web.portlet.MockPortletResponse
addProperty, encodeURL, getPortalContext, getProperties, getProperty, getPropertyNames, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.portlet.PortletResponse
addProperty, encodeURL, setProperty
 

Constructor Detail

MockRenderResponse

public MockRenderResponse()
Create a new MockRenderResponse with a default MockPortalContext.

See Also:
MockPortalContext

MockRenderResponse

public MockRenderResponse(javax.portlet.PortalContext portalContext)
Create a new MockRenderResponse.

Parameters:
portalContext - the PortalContext defining the supported PortletModes and WindowStates
Method Detail

getContentType

public String getContentType()
Specified by:
getContentType in interface javax.portlet.RenderResponse

createRenderURL

public javax.portlet.PortletURL createRenderURL()
Specified by:
createRenderURL in interface javax.portlet.RenderResponse

createActionURL

public javax.portlet.PortletURL createActionURL()
Specified by:
createActionURL in interface javax.portlet.RenderResponse

getNamespace

public String getNamespace()
Specified by:
getNamespace in interface javax.portlet.RenderResponse

setTitle

public void setTitle(String title)
Specified by:
setTitle in interface javax.portlet.RenderResponse

getTitle

public String getTitle()

setContentType

public void setContentType(String contentType)
Specified by:
setContentType in interface javax.portlet.RenderResponse

setCharacterEncoding

public void setCharacterEncoding(String characterEncoding)

getCharacterEncoding

public String getCharacterEncoding()
Specified by:
getCharacterEncoding in interface javax.portlet.RenderResponse

getWriter

public PrintWriter getWriter()
                      throws UnsupportedEncodingException
Specified by:
getWriter in interface javax.portlet.RenderResponse
Throws:
UnsupportedEncodingException

getContentAsByteArray

public byte[] getContentAsByteArray()

getContentAsString

public String getContentAsString()
                          throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

setLocale

public void setLocale(Locale locale)

getLocale

public Locale getLocale()
Specified by:
getLocale in interface javax.portlet.RenderResponse

setBufferSize

public void setBufferSize(int bufferSize)
Specified by:
setBufferSize in interface javax.portlet.RenderResponse

getBufferSize

public int getBufferSize()
Specified by:
getBufferSize in interface javax.portlet.RenderResponse

flushBuffer

public void flushBuffer()
Specified by:
flushBuffer in interface javax.portlet.RenderResponse

resetBuffer

public void resetBuffer()
Specified by:
resetBuffer in interface javax.portlet.RenderResponse

setCommitted

public void setCommitted(boolean committed)

isCommitted

public boolean isCommitted()
Specified by:
isCommitted in interface javax.portlet.RenderResponse

reset

public void reset()
Specified by:
reset in interface javax.portlet.RenderResponse

getPortletOutputStream

public OutputStream getPortletOutputStream()
                                    throws IOException
Specified by:
getPortletOutputStream in interface javax.portlet.RenderResponse
Throws:
IOException

setIncludedUrl

public void setIncludedUrl(String includedUrl)

getIncludedUrl

public String getIncludedUrl()


Copyright © 2002-2008 The Spring Framework.