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, setPropertyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddProperty, addProperty, addProperty, createElement, encodeURL, getNamespace, setPropertypublic MockMimeResponse()
MockPortalContext.MockPortalContextpublic 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 MimeResponsepublic java.lang.String getContentType()
getContentType in interface MimeResponsepublic void setCharacterEncoding(java.lang.String characterEncoding)
public java.lang.String getCharacterEncoding()
getCharacterEncoding in interface MimeResponsepublic java.io.PrintWriter getWriter()
throws java.io.UnsupportedEncodingException
getWriter in interface MimeResponsejava.io.UnsupportedEncodingExceptionpublic byte[] getContentAsByteArray()
public java.lang.String getContentAsString()
throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingExceptionpublic void setLocale(java.util.Locale locale)
public java.util.Locale getLocale()
getLocale in interface MimeResponsepublic void setBufferSize(int bufferSize)
setBufferSize in interface MimeResponsepublic int getBufferSize()
getBufferSize in interface MimeResponsepublic void flushBuffer()
flushBuffer in interface MimeResponsepublic void resetBuffer()
resetBuffer in interface MimeResponsepublic void setCommitted(boolean committed)
public boolean isCommitted()
isCommitted in interface MimeResponsepublic void reset()
reset in interface MimeResponsepublic java.io.OutputStream getPortletOutputStream()
throws java.io.IOException
getPortletOutputStream in interface MimeResponsejava.io.IOExceptionpublic PortletURL createRenderURL()
createRenderURL in interface MimeResponsepublic PortletURL createActionURL()
createActionURL in interface MimeResponsepublic ResourceURL createResourceURL()
createResourceURL in interface MimeResponsepublic CacheControl getCacheControl()
getCacheControl in interface MimeResponsepublic void setIncludedUrl(java.lang.String includedUrl)
public java.lang.String getIncludedUrl()
public void setForwardedUrl(java.lang.String forwardedUrl)
public java.lang.String getForwardedUrl()