Class MockServiceInterfaceActionResponse
- java.lang.Object
-
- org.springframework.mock.web.MockHttpServletResponse
-
- lumis.lptf.portal.serviceinterface.MockServiceInterfaceActionResponse
-
- All Implemented Interfaces:
javax.portlet.ActionResponse
,javax.portlet.PortletResponse
,javax.portlet.StateAwareResponse
,HttpServletResponse
,ServletResponse
,IMockServiceInterfaceActionResponse
,IMockServiceInterfaceResponse
,IServiceInterfaceActionResponse
,IServiceInterfaceActionResponseSPI
,IServiceInterfaceResponse
,IURLFactory
public class MockServiceInterfaceActionResponse extends org.springframework.mock.web.MockHttpServletResponse implements IMockServiceInterfaceActionResponse, IServiceInterfaceActionResponseSPI
Implementation for IMockServiceInterfaceActionResponse interface.- Since:
- 5.6.0
- Version:
- $Revision: 18045 $ $Date: 2015-12-02 10:50:59 -0200 (Wed, 02 Dec 2015) $
-
-
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
-
-
Constructor Summary
Constructors Constructor Description MockServiceInterfaceActionResponse(MockServiceInterfaceActionRequest actionRequest)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addCookie(Cookie cookie)
void
addProperty(String key, String value)
void
addProperty(String arg0, Element arg1)
void
addProperty(Cookie arg0)
IServiceInterfaceUrl
createActionURL()
Creates an action URL.Element
createElement(String arg0)
IServiceInterfaceUrl
createPortalURL()
Creates a URL for accessing a portal page.IServiceInterfaceUrl
createRenderURL()
Creates a render URL.protected IServiceInterfaceUrl
createServiceInterfaceURL(int urlType)
void
deleteCookie(Cookie cookie)
String
encodeURL(String url)
Map<String,Cookie>
getCookieMap()
Returns a map containing the cookies set in this response.String
getNamespace()
javax.portlet.PortletMode
getPortletMode()
String
getRedirectedURL()
Returns the redirect destination set by a call tosendRedirect
.String[]
getRenderParameter(String key)
Deprecated.Map<String,String[]>
getRenderParameterMap()
Map<String,String[]>
getRenderParameters()
Deprecated.javax.portlet.WindowState
getWindowState()
void
removePublicRenderParameter(String name)
void
sendRedirect(String location)
void
sendRedirect(String location, String renderUrlParamName)
void
setEvent(String name, Serializable value)
void
setEvent(QName name, Serializable value)
void
setNamespace(String namespace)
Sets the namespace string returned byPortletResponse.getNamespace()
.void
setPortletMode(javax.portlet.PortletMode portletMode)
void
setProperty(String key, String value)
void
setRenderParameter(String key, String value)
void
setRenderParameter(String key, String[] values)
void
setRenderParameters(Map<String,String[]> parameters)
void
setStatusInternal(int statusCode, String message)
Sets the status code and message for this action response.void
setWindowState(javax.portlet.WindowState windowState)
-
Methods inherited from class org.springframework.mock.web.MockHttpServletResponse
addDateHeader, addHeader, addIncludedUrl, addIntHeader, containsHeader, encodeRedirectUrl, encodeRedirectURL, encodeUrl, flushBuffer, getBufferSize, getCharacterEncoding, getContentAsByteArray, getContentAsString, getContentLength, getContentLengthLong, getContentType, getCookie, getCookies, getDateHeader, getErrorMessage, getForwardedUrl, getHeader, getHeaderNames, getHeaders, getHeaderValue, getHeaderValues, getIncludedUrl, getIncludedUrls, getLocale, getOutputStream, getRedirectedUrl, getStatus, getWriter, isCharset, isCommitted, isOutputStreamAccessAllowed, isWriterAccessAllowed, reset, resetBuffer, sendError, sendError, setBufferSize, setCharacterEncoding, setCommitted, setContentLength, setContentLengthLong, setContentType, setDateHeader, setForwardedUrl, setHeader, setIncludedUrl, setIntHeader, setLocale, 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.IServiceInterfaceResponse
addCookie, deleteCookie
-
Methods inherited from interface lumis.portal.url.IURLFactory
createActionURL, createPortalURL, createRenderURL
-
-
-
-
Constructor Detail
-
MockServiceInterfaceActionResponse
public MockServiceInterfaceActionResponse(MockServiceInterfaceActionRequest actionRequest)
-
-
Method Detail
-
getPortletMode
public javax.portlet.PortletMode getPortletMode()
- Specified by:
getPortletMode
in interfacejavax.portlet.StateAwareResponse
-
getRedirectedURL
public String getRedirectedURL()
Description copied from interface:IMockServiceInterfaceActionResponse
Returns the redirect destination set by a call tosendRedirect
.- Specified by:
getRedirectedURL
in interfaceIMockServiceInterfaceActionResponse
- Returns:
- the redirect destination.
- See Also:
ActionResponse.sendRedirect(String)
,ActionResponse.sendRedirect(String, String)
-
getRenderParameterMap
public Map<String,String[]> getRenderParameterMap()
- Specified by:
getRenderParameterMap
in interfacejavax.portlet.StateAwareResponse
-
getWindowState
public javax.portlet.WindowState getWindowState()
- Specified by:
getWindowState
in interfacejavax.portlet.StateAwareResponse
-
removePublicRenderParameter
public void removePublicRenderParameter(String name)
- Specified by:
removePublicRenderParameter
in interfacejavax.portlet.StateAwareResponse
-
sendRedirect
public void sendRedirect(String location, String renderUrlParamName) throws IOException
- Specified by:
sendRedirect
in interfacejavax.portlet.ActionResponse
- Throws:
IOException
-
sendRedirect
public void sendRedirect(String location) throws IOException
- Specified by:
sendRedirect
in interfacejavax.portlet.ActionResponse
- Specified by:
sendRedirect
in interfaceHttpServletResponse
- Overrides:
sendRedirect
in classorg.springframework.mock.web.MockHttpServletResponse
- Throws:
IOException
-
setEvent
public void setEvent(QName name, Serializable value)
- Specified by:
setEvent
in interfacejavax.portlet.StateAwareResponse
-
setEvent
public void setEvent(String name, Serializable value)
- Specified by:
setEvent
in interfacejavax.portlet.StateAwareResponse
-
setPortletMode
public void setPortletMode(javax.portlet.PortletMode portletMode) throws javax.portlet.PortletModeException
- Specified by:
setPortletMode
in interfacejavax.portlet.StateAwareResponse
- Throws:
javax.portlet.PortletModeException
-
setRenderParameter
public void setRenderParameter(String key, String value)
- Specified by:
setRenderParameter
in interfacejavax.portlet.StateAwareResponse
-
setRenderParameter
public void setRenderParameter(String key, String[] values)
- Specified by:
setRenderParameter
in interfacejavax.portlet.StateAwareResponse
-
setRenderParameters
public void setRenderParameters(Map<String,String[]> parameters)
- Specified by:
setRenderParameters
in interfacejavax.portlet.StateAwareResponse
-
setWindowState
public void setWindowState(javax.portlet.WindowState windowState) throws javax.portlet.WindowStateException
- Specified by:
setWindowState
in interfacejavax.portlet.StateAwareResponse
- Throws:
javax.portlet.WindowStateException
-
getRenderParameter
@Deprecated public String[] getRenderParameter(String key)
Deprecated.Description copied from interface:IServiceInterfaceActionResponse
Returns the parameter previously set by the setRenderParameter methods. This method is usually used by chained process actions that need to read previously set render parameters.- Specified by:
getRenderParameter
in interfaceIServiceInterfaceActionResponse
- Returns:
-
getRenderParameters
@Deprecated public Map<String,String[]> getRenderParameters()
Deprecated.Description copied from interface:IServiceInterfaceActionResponse
Returns all the parameters previously set by the setRenderParameter methods. This method is usually used by chained process actions that need to read previously set render parameters.- Specified by:
getRenderParameters
in interfaceIServiceInterfaceActionResponse
- Returns:
-
setStatusInternal
public void setStatusInternal(int statusCode, String message)
Description copied from interface:IServiceInterfaceActionResponseSPI
Sets the status code and message for this action response. This is a temporary implementation that is used exclusively for requests with accept: application/json header. This code and message will be returned in the http response headers in this case. The final support for setting response status will be available in the future.- Specified by:
setStatusInternal
in interfaceIServiceInterfaceActionResponseSPI
- Parameters:
statusCode
- the status code for the responsemessage
- the message
-
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 Map<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(String arg0, Element arg1)
- Specified by:
addProperty
in interfacejavax.portlet.PortletResponse
-
createElement
public Element createElement(String arg0) throws DOMException
- Specified by:
createElement
in interfacejavax.portlet.PortletResponse
- Throws:
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 String encodeURL(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(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 String getNamespace()
- Specified by:
getNamespace
in interfacejavax.portlet.PortletResponse
-
setProperty
public void setProperty(String key, String value)
- Specified by:
setProperty
in interfacejavax.portlet.PortletResponse
-
-