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() |
String |
getCharacterEncoding() |
byte[] |
getContentAsByteArray() |
String |
getContentAsString() |
String |
getContentType() |
String |
getForwardedUrl() |
String |
getIncludedUrl() |
Locale |
getLocale() |
OutputStream |
getPortletOutputStream() |
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 |
setForwardedUrl(String forwardedUrl) |
void |
setIncludedUrl(String includedUrl) |
void |
setLocale(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(String contentType)
setContentType
in interface MimeResponse
public String getContentType()
getContentType
in interface MimeResponse
public void setCharacterEncoding(String characterEncoding)
public String getCharacterEncoding()
getCharacterEncoding
in interface MimeResponse
public PrintWriter getWriter() throws UnsupportedEncodingException
getWriter
in interface MimeResponse
UnsupportedEncodingException
public byte[] getContentAsByteArray()
public String getContentAsString() throws UnsupportedEncodingException
UnsupportedEncodingException
public void setLocale(Locale locale)
public 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 OutputStream getPortletOutputStream() throws IOException
getPortletOutputStream
in interface MimeResponse
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(String includedUrl)
public String getIncludedUrl()
public void setForwardedUrl(String forwardedUrl)
public String getForwardedUrl()