public class MockMimeResponse extends MockPortletResponse implements javax.portlet.MimeResponse
MimeResponse
interface.Constructor and Description |
---|
MockMimeResponse()
Create a new MockMimeResponse with a default
MockPortalContext . |
MockMimeResponse(javax.portlet.PortalContext portalContext)
Create a new MockMimeResponse.
|
MockMimeResponse(javax.portlet.PortalContext portalContext,
javax.portlet.PortletRequest request)
Create a new MockMimeResponse.
|
Modifier and Type | Method and Description |
---|---|
javax.portlet.PortletURL |
createActionURL() |
javax.portlet.PortletURL |
createRenderURL() |
javax.portlet.ResourceURL |
createResourceURL() |
void |
flushBuffer() |
int |
getBufferSize() |
javax.portlet.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
public MockMimeResponse()
MockPortalContext
.MockPortalContext
public MockMimeResponse(javax.portlet.PortalContext portalContext)
portalContext
- the PortalContext defining the supported
PortletModes and WindowStatespublic MockMimeResponse(javax.portlet.PortalContext portalContext, javax.portlet.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 javax.portlet.MimeResponse
public String getContentType()
getContentType
in interface javax.portlet.MimeResponse
public void setCharacterEncoding(String characterEncoding)
public String getCharacterEncoding()
getCharacterEncoding
in interface javax.portlet.MimeResponse
public PrintWriter getWriter() throws UnsupportedEncodingException
getWriter
in interface javax.portlet.MimeResponse
UnsupportedEncodingException
public byte[] getContentAsByteArray()
public String getContentAsString() throws UnsupportedEncodingException
UnsupportedEncodingException
public void setLocale(Locale locale)
public Locale getLocale()
getLocale
in interface javax.portlet.MimeResponse
public void setBufferSize(int bufferSize)
setBufferSize
in interface javax.portlet.MimeResponse
public int getBufferSize()
getBufferSize
in interface javax.portlet.MimeResponse
public void flushBuffer()
flushBuffer
in interface javax.portlet.MimeResponse
public void resetBuffer()
resetBuffer
in interface javax.portlet.MimeResponse
public void setCommitted(boolean committed)
public boolean isCommitted()
isCommitted
in interface javax.portlet.MimeResponse
public void reset()
reset
in interface javax.portlet.MimeResponse
public OutputStream getPortletOutputStream() throws IOException
getPortletOutputStream
in interface javax.portlet.MimeResponse
IOException
public javax.portlet.PortletURL createRenderURL()
createRenderURL
in interface javax.portlet.MimeResponse
public javax.portlet.PortletURL createActionURL()
createActionURL
in interface javax.portlet.MimeResponse
public javax.portlet.ResourceURL createResourceURL()
createResourceURL
in interface javax.portlet.MimeResponse
public javax.portlet.CacheControl getCacheControl()
getCacheControl
in interface javax.portlet.MimeResponse
public void setIncludedUrl(String includedUrl)
public String getIncludedUrl()
public void setForwardedUrl(String forwardedUrl)
public String getForwardedUrl()
Copyright © 2015. All rights reserved.