public class MockMimeResponse extends MockPortletResponse implements MimeResponse
MimeResponse
interface.CACHE_SCOPE, ETAG, EXPIRATION_CACHE, MARKUP_HEAD_ELEMENT, NAMESPACED_RESPONSE, PRIVATE_SCOPE, PUBLIC_SCOPE, USE_CACHED_CONTENT
Constructor and Description |
---|
MockMimeResponse()
Create a new MockMimeResponse with a default
MockPortalContext . |
MockMimeResponse(PortalContext portalContext)
Create a new MockMimeResponse.
|
MockMimeResponse(PortalContext portalContext,
PortletRequest request)
Create a new MockMimeResponse.
|
Modifier and Type | Method and Description |
---|---|
PortletURL |
createActionURL() |
PortletURL |
createRenderURL() |
ResourceURL |
createResourceURL() |
void |
flushBuffer() |
int |
getBufferSize() |
CacheControl |
getCacheControl() |
java.lang.String |
getCharacterEncoding() |
byte[] |
getContentAsByteArray() |
java.lang.String |
getContentAsString() |
java.lang.String |
getContentType() |
java.lang.String |
getForwardedUrl() |
java.lang.String |
getIncludedUrl() |
java.util.Locale |
getLocale() |
java.io.OutputStream |
getPortletOutputStream() |
java.io.PrintWriter |
getWriter() |
boolean |
isCommitted() |
void |
reset() |
void |
resetBuffer() |
void |
setBufferSize(int bufferSize) |
void |
setCharacterEncoding(java.lang.String characterEncoding) |
void |
setCommitted(boolean committed) |
void |
setContentType(java.lang.String contentType) |
void |
setForwardedUrl(java.lang.String forwardedUrl) |
void |
setIncludedUrl(java.lang.String includedUrl) |
void |
setLocale(java.util.Locale locale) |
addProperty, addProperty, addProperty, createElement, encodeURL, getCookie, getCookies, getNamespace, getPortalContext, getProperties, getProperty, getPropertyNames, getXmlProperties, getXmlProperty, getXmlPropertyNames, setNamespace, setProperty
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addProperty, addProperty, addProperty, createElement, encodeURL, getNamespace, setProperty
public MockMimeResponse()
MockPortalContext
.MockPortalContext
public MockMimeResponse(PortalContext portalContext)
portalContext
- the PortalContext defining the supported
PortletModes and WindowStatespublic MockMimeResponse(PortalContext portalContext, PortletRequest request)
portalContext
- the PortalContext defining the supported
PortletModes and WindowStatesrequest
- the corresponding render/resource request that this response
is being generated forpublic void setContentType(java.lang.String contentType)
setContentType
in interface MimeResponse
public java.lang.String getContentType()
getContentType
in interface MimeResponse
public void setCharacterEncoding(java.lang.String characterEncoding)
public java.lang.String getCharacterEncoding()
getCharacterEncoding
in interface MimeResponse
public java.io.PrintWriter getWriter() throws java.io.UnsupportedEncodingException
getWriter
in interface MimeResponse
java.io.UnsupportedEncodingException
public byte[] getContentAsByteArray()
public java.lang.String getContentAsString() throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public void setLocale(java.util.Locale locale)
public java.util.Locale getLocale()
getLocale
in interface MimeResponse
public void setBufferSize(int bufferSize)
setBufferSize
in interface MimeResponse
public int getBufferSize()
getBufferSize
in interface MimeResponse
public void flushBuffer()
flushBuffer
in interface MimeResponse
public void resetBuffer()
resetBuffer
in interface MimeResponse
public void setCommitted(boolean committed)
public boolean isCommitted()
isCommitted
in interface MimeResponse
public void reset()
reset
in interface MimeResponse
public java.io.OutputStream getPortletOutputStream() throws java.io.IOException
getPortletOutputStream
in interface MimeResponse
java.io.IOException
public PortletURL createRenderURL()
createRenderURL
in interface MimeResponse
public PortletURL createActionURL()
createActionURL
in interface MimeResponse
public ResourceURL createResourceURL()
createResourceURL
in interface MimeResponse
public CacheControl getCacheControl()
getCacheControl
in interface MimeResponse
public void setIncludedUrl(java.lang.String includedUrl)
public java.lang.String getIncludedUrl()
public void setForwardedUrl(java.lang.String forwardedUrl)
public java.lang.String getForwardedUrl()