Class MockServiceInterfaceRenderResponse
- java.lang.Object
-
- org.springframework.mock.web.MockHttpServletResponse
-
- lumis.lptf.portal.serviceinterface.MockServiceInterfaceRenderResponse
-
- All Implemented Interfaces:
javax.portlet.MimeResponse
,javax.portlet.PortletResponse
,javax.portlet.RenderResponse
,HttpServletResponse
,ServletResponse
,IMockServiceInterfaceRenderResponse
,IMockServiceInterfaceResponse
,IServiceInterfaceRenderResponse
,IServiceInterfaceRenderResponseSPI
,IServiceInterfaceResponse
,IServiceInterfaceResponseSPI
,IURLFactory
public class MockServiceInterfaceRenderResponse extends org.springframework.mock.web.MockHttpServletResponse implements IMockServiceInterfaceRenderResponse, IServiceInterfaceRenderResponseSPI
Implementation for IMockServiceInterfaceRenderResponse interface.- Since:
- 5.6.0
- Version:
- $Revision: 25153 $ $Date: 2022-07-24 19:17:04 -0300 (Sun, 24 Jul 2022) $
-
-
Field Summary
Fields Modifier and Type Field Description protected lumis.lptf.portal.serviceinterface.MockServiceInterfaceRequest
mockServiceInterfaceRequest
-
Fields inherited from interface javax.servlet.http.HttpServletResponse
SC_ACCEPTED, SC_BAD_GATEWAY, SC_BAD_REQUEST, SC_CONFLICT, SC_CONTINUE, SC_CREATED, SC_EXPECTATION_FAILED, SC_FORBIDDEN, SC_FOUND, SC_GATEWAY_TIMEOUT, SC_GONE, SC_HTTP_VERSION_NOT_SUPPORTED, SC_INTERNAL_SERVER_ERROR, SC_LENGTH_REQUIRED, SC_METHOD_NOT_ALLOWED, SC_MOVED_PERMANENTLY, SC_MOVED_TEMPORARILY, SC_MULTIPLE_CHOICES, SC_NO_CONTENT, SC_NON_AUTHORITATIVE_INFORMATION, SC_NOT_ACCEPTABLE, SC_NOT_FOUND, SC_NOT_IMPLEMENTED, SC_NOT_MODIFIED, SC_OK, SC_PARTIAL_CONTENT, SC_PAYMENT_REQUIRED, SC_PRECONDITION_FAILED, SC_PROXY_AUTHENTICATION_REQUIRED, SC_REQUEST_ENTITY_TOO_LARGE, SC_REQUEST_TIMEOUT, SC_REQUEST_URI_TOO_LONG, SC_REQUESTED_RANGE_NOT_SATISFIABLE, SC_RESET_CONTENT, SC_SEE_OTHER, SC_SERVICE_UNAVAILABLE, SC_SWITCHING_PROTOCOLS, SC_TEMPORARY_REDIRECT, SC_UNAUTHORIZED, SC_UNSUPPORTED_MEDIA_TYPE, SC_USE_PROXY
-
Fields inherited from interface lumis.portal.serviceinterface.IServiceInterfaceRenderResponse
APPLY_STYLE_FROM_DEFINITION, APPLY_STYLE_NONE, APPLY_STYLE_ONLY_IF_NOT_DEFINED, APPLY_STYLE_OVERRIDE
-
-
Constructor Summary
Constructors Constructor Description MockServiceInterfaceRenderResponse(MockServiceInterfaceRenderRequest renderRequest)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addCookie(Cookie cookie)
void
addProperty(java.lang.String key, java.lang.String value)
void
addProperty(java.lang.String arg0, org.w3c.dom.Element arg1)
void
addProperty(Cookie arg0)
void
applyStyle(int applyRule, java.lang.String styleFile)
IServiceInterfaceUrl
createActionURL()
Creates an action URL.org.w3c.dom.Element
createElement(java.lang.String arg0)
IServiceInterfaceUrl
createPortalURL()
Creates a URL for accessing a portal page.IServiceInterfaceUrl
createRenderURL()
Creates a render URL.javax.portlet.ResourceURL
createResourceURL()
protected IServiceInterfaceUrl
createServiceInterfaceURL(int urlType)
void
deleteCookie(Cookie cookie)
java.lang.String
encodeURL(java.lang.String url)
void
flushBuffer()
PortalPrintWriter
getBeforeWriter()
java.lang.String
getBeforeWriterOutput()
Returns the output written toIServiceInterfaceRenderResponse.getBeforeWriter()
.int
getBufferSize()
javax.portlet.CacheControl
getCacheControl()
java.lang.String
getCharacterEncoding()
java.lang.String
getContentType()
java.util.Map<java.lang.String,Cookie>
getCookieMap()
Returns a map containing the cookies set in this response.java.util.Locale
getLocale()
java.lang.String
getNamespace()
java.io.OutputStream
getPortletOutputStream()
java.lang.String
getResponseString()
Returns this response's output string.ServiceContainerHttpServletResponse
getServiceContainerHttpServletResponse()
Returns theServiceContainerHttpServletResponse
.int
getStyleApplyRule()
Returns the style apply rule set by the call toIServiceInterfaceRenderResponse.applyStyle(int, String)
.java.lang.String
getStyleFile()
Returns the file path set by the call toIServiceInterfaceRenderResponse.applyStyle(int, String)
.java.lang.String
getStyleId()
Returns the styleId set by a call to theIServiceInterfaceRenderResponse.setStyleId(String)
method.java.lang.String
getTitle()
Returns the title set byRenderResponse.setTitle(String)
.PortalPrintWriter
getWriter()
java.lang.String
getWriterOutput()
Returns the output written toIServiceInterfaceRenderResponse.getWriter()
.boolean
isCommited()
Deprecated.boolean
isCommitted()
void
reset()
void
resetBuffer()
void
setBufferSize(int bufferSize)
void
setContentType(java.lang.String contentType)
void
setLocale(java.util.Locale locale)
Sets the locale returned byMimeResponse.getLocale()
.void
setNamespace(java.lang.String namespace)
Sets the namespace string returned byPortletResponse.getNamespace()
.void
setNextPossiblePortletModes(java.util.Collection<javax.portlet.PortletMode> portletModes)
void
setProperty(java.lang.String key, java.lang.String value)
void
setStyleId(java.lang.String styleId)
void
setTitle(java.lang.String title)
-
Methods inherited from class org.springframework.mock.web.MockHttpServletResponse
addDateHeader, addHeader, addIncludedUrl, addIntHeader, containsHeader, encodeRedirectUrl, encodeRedirectURL, encodeUrl, getContentAsByteArray, getContentAsString, getContentLength, getContentLengthLong, getCookie, getCookies, getDateHeader, getErrorMessage, getForwardedUrl, getHeader, getHeaderNames, getHeaders, getHeaderValue, getHeaderValues, getIncludedUrl, getIncludedUrls, getOutputStream, getRedirectedUrl, getStatus, isCharset, isOutputStreamAccessAllowed, isWriterAccessAllowed, sendError, sendError, sendRedirect, setCharacterEncoding, setCommitted, setContentLength, setContentLengthLong, setDateHeader, setForwardedUrl, setHeader, setIncludedUrl, setIntHeader, setOutputStreamAccessAllowed, setStatus, setStatus, setWriterAccessAllowed
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface lumis.lptf.portal.serviceinterface.IMockServiceInterfaceResponse
getCookieMap, setNamespace
-
Methods inherited from interface lumis.portal.serviceinterface.IServiceInterfaceRenderResponse
createActionURL, createRenderURL
-
Methods inherited from interface lumis.portal.serviceinterface.IServiceInterfaceResponse
addCookie, deleteCookie
-
Methods inherited from interface lumis.portal.serviceinterface.IServiceInterfaceResponseSPI
getServiceContainerHttpServletResponse
-
Methods inherited from interface lumis.portal.url.IURLFactory
createPortalURL
-
-
-
-
Constructor Detail
-
MockServiceInterfaceRenderResponse
public MockServiceInterfaceRenderResponse(MockServiceInterfaceRenderRequest renderRequest)
-
-
Method Detail
-
createResourceURL
public javax.portlet.ResourceURL createResourceURL()
- Specified by:
createResourceURL
in interfacejavax.portlet.MimeResponse
-
flushBuffer
public void flushBuffer()
- Specified by:
flushBuffer
in interfacejavax.portlet.MimeResponse
- Specified by:
flushBuffer
in interfaceServletResponse
- Overrides:
flushBuffer
in classorg.springframework.mock.web.MockHttpServletResponse
-
getBufferSize
public int getBufferSize()
- Specified by:
getBufferSize
in interfacejavax.portlet.MimeResponse
- Specified by:
getBufferSize
in interfaceServletResponse
- Overrides:
getBufferSize
in classorg.springframework.mock.web.MockHttpServletResponse
-
getCacheControl
public javax.portlet.CacheControl getCacheControl()
- Specified by:
getCacheControl
in interfacejavax.portlet.MimeResponse
-
getCharacterEncoding
public java.lang.String getCharacterEncoding()
- Specified by:
getCharacterEncoding
in interfacejavax.portlet.MimeResponse
- Specified by:
getCharacterEncoding
in interfaceServletResponse
- Overrides:
getCharacterEncoding
in classorg.springframework.mock.web.MockHttpServletResponse
-
getWriterOutput
public java.lang.String getWriterOutput() throws java.io.UnsupportedEncodingException
Description copied from interface:IMockServiceInterfaceRenderResponse
Returns the output written toIServiceInterfaceRenderResponse.getWriter()
.- Specified by:
getWriterOutput
in interfaceIMockServiceInterfaceRenderResponse
- Returns:
- the output as a string.
- Throws:
java.io.UnsupportedEncodingException
-
getContentType
public java.lang.String getContentType()
- Specified by:
getContentType
in interfacejavax.portlet.MimeResponse
- Specified by:
getContentType
in interfaceServletResponse
- Overrides:
getContentType
in classorg.springframework.mock.web.MockHttpServletResponse
-
getLocale
public java.util.Locale getLocale()
- Specified by:
getLocale
in interfacejavax.portlet.MimeResponse
- Specified by:
getLocale
in interfaceServletResponse
- Overrides:
getLocale
in classorg.springframework.mock.web.MockHttpServletResponse
-
getPortletOutputStream
public java.io.OutputStream getPortletOutputStream() throws java.io.IOException
- Specified by:
getPortletOutputStream
in interfacejavax.portlet.MimeResponse
- Throws:
java.io.IOException
-
getTitle
public java.lang.String getTitle()
Description copied from interface:IMockServiceInterfaceRenderResponse
Returns the title set byRenderResponse.setTitle(String)
.- Specified by:
getTitle
in interfaceIMockServiceInterfaceRenderResponse
- Returns:
- the title.
-
getWriter
public PortalPrintWriter getWriter() throws java.io.UnsupportedEncodingException
- Specified by:
getWriter
in interfaceIServiceInterfaceRenderResponse
- Specified by:
getWriter
in interfacejavax.portlet.MimeResponse
- Specified by:
getWriter
in interfaceServletResponse
- Overrides:
getWriter
in classorg.springframework.mock.web.MockHttpServletResponse
- Throws:
java.io.UnsupportedEncodingException
-
isCommitted
public boolean isCommitted()
- Specified by:
isCommitted
in interfacejavax.portlet.MimeResponse
- Specified by:
isCommitted
in interfaceServletResponse
- Overrides:
isCommitted
in classorg.springframework.mock.web.MockHttpServletResponse
-
reset
public void reset()
- Specified by:
reset
in interfacejavax.portlet.MimeResponse
- Specified by:
reset
in interfaceServletResponse
- Overrides:
reset
in classorg.springframework.mock.web.MockHttpServletResponse
-
resetBuffer
public void resetBuffer()
- Specified by:
resetBuffer
in interfacejavax.portlet.MimeResponse
- Specified by:
resetBuffer
in interfaceServletResponse
- Overrides:
resetBuffer
in classorg.springframework.mock.web.MockHttpServletResponse
-
setBufferSize
public void setBufferSize(int bufferSize)
- Specified by:
setBufferSize
in interfacejavax.portlet.MimeResponse
- Specified by:
setBufferSize
in interfaceServletResponse
- Overrides:
setBufferSize
in classorg.springframework.mock.web.MockHttpServletResponse
-
setContentType
public void setContentType(java.lang.String contentType)
- Specified by:
setContentType
in interfacejavax.portlet.MimeResponse
- Specified by:
setContentType
in interfacejavax.portlet.RenderResponse
- Specified by:
setContentType
in interfaceServletResponse
- Overrides:
setContentType
in classorg.springframework.mock.web.MockHttpServletResponse
-
setLocale
public void setLocale(java.util.Locale locale)
Description copied from interface:IMockServiceInterfaceRenderResponse
Sets the locale returned byMimeResponse.getLocale()
.- Specified by:
setLocale
in interfaceIMockServiceInterfaceRenderResponse
- Specified by:
setLocale
in interfaceServletResponse
- Overrides:
setLocale
in classorg.springframework.mock.web.MockHttpServletResponse
- Parameters:
locale
- the locale.
-
setNextPossiblePortletModes
public void setNextPossiblePortletModes(java.util.Collection<javax.portlet.PortletMode> portletModes)
- Specified by:
setNextPossiblePortletModes
in interfacejavax.portlet.RenderResponse
-
setTitle
public void setTitle(java.lang.String title)
- Specified by:
setTitle
in interfacejavax.portlet.RenderResponse
-
applyStyle
public void applyStyle(int applyRule, java.lang.String styleFile) throws ServiceException, PortalException
- Specified by:
applyStyle
in interfaceIServiceInterfaceRenderResponse
- Throws:
ServiceException
PortalException
-
getBeforeWriterOutput
public java.lang.String getBeforeWriterOutput() throws java.io.IOException
Description copied from interface:IMockServiceInterfaceRenderResponse
Returns the output written toIServiceInterfaceRenderResponse.getBeforeWriter()
.- Specified by:
getBeforeWriterOutput
in interfaceIMockServiceInterfaceRenderResponse
- Returns:
- the output as a string.
- Throws:
java.io.IOException
- if an error occur getting the writer.
-
getBeforeWriter
public PortalPrintWriter getBeforeWriter() throws java.io.IOException
- Specified by:
getBeforeWriter
in interfaceIServiceInterfaceRenderResponse
- Throws:
java.io.IOException
-
isCommited
@Deprecated public boolean isCommited()
Deprecated.- Specified by:
isCommited
in interfaceIServiceInterfaceRenderResponse
-
setStyleId
public void setStyleId(java.lang.String styleId) throws ServiceException, PortalException
- Specified by:
setStyleId
in interfaceIServiceInterfaceRenderResponse
- Throws:
ServiceException
PortalException
-
getStyleId
public java.lang.String getStyleId()
Description copied from interface:IMockServiceInterfaceRenderResponse
Returns the styleId set by a call to theIServiceInterfaceRenderResponse.setStyleId(String)
method.- Specified by:
getStyleId
in interfaceIMockServiceInterfaceRenderResponse
- Returns:
- the style id.
-
getStyleFile
public java.lang.String getStyleFile()
Description copied from interface:IMockServiceInterfaceRenderResponse
Returns the file path set by the call toIServiceInterfaceRenderResponse.applyStyle(int, String)
.- Specified by:
getStyleFile
in interfaceIMockServiceInterfaceRenderResponse
- Returns:
- the style file path set.
-
getStyleApplyRule
public int getStyleApplyRule()
Description copied from interface:IMockServiceInterfaceRenderResponse
Returns the style apply rule set by the call toIServiceInterfaceRenderResponse.applyStyle(int, String)
. See the APPLY_* constants for possible values.- Specified by:
getStyleApplyRule
in interfaceIMockServiceInterfaceRenderResponse
- Returns:
- the style apply rule.
-
getResponseString
public java.lang.String getResponseString()
Description copied from interface:IServiceInterfaceRenderResponseSPI
Returns this response's output string.- Specified by:
getResponseString
in interfaceIServiceInterfaceRenderResponseSPI
- Returns:
- this response's output string.
-
addCookie
public void addCookie(Cookie cookie)
- Specified by:
addCookie
in interfaceHttpServletResponse
- Specified by:
addCookie
in interfaceIServiceInterfaceResponse
- Overrides:
addCookie
in classorg.springframework.mock.web.MockHttpServletResponse
-
deleteCookie
public void deleteCookie(Cookie cookie)
- Specified by:
deleteCookie
in interfaceIServiceInterfaceResponse
-
getCookieMap
public java.util.Map<java.lang.String,Cookie> getCookieMap()
Description copied from interface:IMockServiceInterfaceResponse
Returns a map containing the cookies set in this response.- Specified by:
getCookieMap
in interfaceIMockServiceInterfaceResponse
- Returns:
- the map with the cookies. The key is the cookie name and the value is the cookie object.
- See Also:
IServiceInterfaceResponse.addCookie(Cookie)
,IServiceInterfaceResponse.deleteCookie(Cookie)
-
addProperty
public void addProperty(Cookie arg0)
- Specified by:
addProperty
in interfacejavax.portlet.PortletResponse
-
addProperty
public void addProperty(java.lang.String arg0, org.w3c.dom.Element arg1)
- Specified by:
addProperty
in interfacejavax.portlet.PortletResponse
-
createElement
public org.w3c.dom.Element createElement(java.lang.String arg0) throws org.w3c.dom.DOMException
- Specified by:
createElement
in interfacejavax.portlet.PortletResponse
- Throws:
org.w3c.dom.DOMException
-
createActionURL
public IServiceInterfaceUrl createActionURL()
Description copied from interface:IURLFactory
Creates an action URL.- Specified by:
createActionURL
in interfaceIURLFactory
- Returns:
- the URL object.
- See Also:
IServiceInterface.processAction(lumis.portal.serviceinterface.IServiceInterfaceActionRequest, lumis.portal.serviceinterface.IServiceInterfaceActionResponse)
-
createServiceInterfaceURL
protected IServiceInterfaceUrl createServiceInterfaceURL(int urlType)
-
createPortalURL
public IServiceInterfaceUrl createPortalURL()
Description copied from interface:IURLFactory
Creates a URL for accessing a portal page.The returned URL object will not have its destination specified, so it will refer to the portal home by default. Its methods may be used to specify the URL destination.
- Specified by:
createPortalURL
in interfaceIURLFactory
- Returns:
- the URL object.
- See Also:
IServiceInterfaceUrl.setPageId(String)
,IServiceInterfaceUrl.setChannelId(String)
-
createRenderURL
public IServiceInterfaceUrl createRenderURL()
Description copied from interface:IURLFactory
Creates a render URL.- Specified by:
createRenderURL
in interfaceIURLFactory
- Returns:
- the URL object.
- See Also:
IServiceInterface.render(lumis.portal.serviceinterface.IServiceInterfaceRenderRequest, lumis.portal.serviceinterface.IServiceInterfaceRenderResponse)
-
encodeURL
public java.lang.String encodeURL(java.lang.String url)
- Specified by:
encodeURL
in interfaceHttpServletResponse
- Specified by:
encodeURL
in interfacejavax.portlet.PortletResponse
- Overrides:
encodeURL
in classorg.springframework.mock.web.MockHttpServletResponse
-
setNamespace
public void setNamespace(java.lang.String namespace)
Description copied from interface:IMockServiceInterfaceResponse
Sets the namespace string returned byPortletResponse.getNamespace()
.- Specified by:
setNamespace
in interfaceIMockServiceInterfaceResponse
- Parameters:
namespace
- the namespace.
-
getNamespace
public java.lang.String getNamespace()
- Specified by:
getNamespace
in interfacejavax.portlet.PortletResponse
-
setProperty
public void setProperty(java.lang.String key, java.lang.String value)
- Specified by:
setProperty
in interfacejavax.portlet.PortletResponse
-
addProperty
public void addProperty(java.lang.String key, java.lang.String value)
- Specified by:
addProperty
in interfacejavax.portlet.PortletResponse
-
getServiceContainerHttpServletResponse
public ServiceContainerHttpServletResponse getServiceContainerHttpServletResponse()
Description copied from interface:IServiceInterfaceResponseSPI
Returns theServiceContainerHttpServletResponse
.- Specified by:
getServiceContainerHttpServletResponse
in interfaceIServiceInterfaceResponseSPI
- Returns:
- the
ServiceContainerHttpServletResponse
.
-
-