public interface ResponseWriter
| Modifier and Type | Field and Description |
|---|---|
static org.springframework.extensions.webscripts.Cache |
CACHE_NEVER |
static ContentInfo |
DEFAULT_JSON_CONTENT |
static WithResponse |
DEFAULT_SUCCESS |
static String |
UTF8 |
| Modifier and Type | Method and Description |
|---|---|
default void |
renderErrorResponse(ErrorResponse errorResponse,
org.springframework.extensions.webscripts.WebScriptResponse res,
JacksonHelper jsonHelper)
Renders a JSON error response
|
default void |
renderException(Exception exception,
org.springframework.extensions.webscripts.WebScriptResponse response,
ApiAssistant assistant)
Renders an exception to the output stream as Json.
|
default void |
renderJsonResponse(org.springframework.extensions.webscripts.WebScriptResponse res,
Object toSerialize,
JacksonHelper jsonHelper)
Renders the result of an execution.
|
default org.apache.commons.logging.Log |
resWriterLogger() |
default void |
setContentInfoOnResponse(org.springframework.extensions.webscripts.WebScriptResponse res,
ContentInfo contentInfo)
Sets the response headers with any information we know about the content
|
default void |
setResponse(org.springframework.extensions.webscripts.WebScriptResponse res,
int status,
org.springframework.extensions.webscripts.Cache cache,
ContentInfo contentInfo,
Map<String,List<String>> headers)
The response status must be set before the response is written by Jackson (which will by default close and commit the response).
|
default void |
setResponse(org.springframework.extensions.webscripts.WebScriptResponse res,
WithResponse withResponse)
Sets the response using the WithResponse object
|
static final String UTF8
static final ContentInfo DEFAULT_JSON_CONTENT
static final org.springframework.extensions.webscripts.Cache CACHE_NEVER
static final WithResponse DEFAULT_SUCCESS
default org.apache.commons.logging.Log resWriterLogger()
default void setContentInfoOnResponse(org.springframework.extensions.webscripts.WebScriptResponse res,
ContentInfo contentInfo)
res - WebScriptResponsecontentInfo - Content Informationdefault void setResponse(org.springframework.extensions.webscripts.WebScriptResponse res,
int status,
org.springframework.extensions.webscripts.Cache cache,
ContentInfo contentInfo,
Map<String,List<String>> headers)
res - status - cache - contentInfo - headers - default void setResponse(org.springframework.extensions.webscripts.WebScriptResponse res,
WithResponse withResponse)
res - withResponse - default void renderErrorResponse(ErrorResponse errorResponse, org.springframework.extensions.webscripts.WebScriptResponse res, JacksonHelper jsonHelper) throws IOException
errorResponse - The errorres - web script responseIOExceptiondefault void renderException(Exception exception, org.springframework.extensions.webscripts.WebScriptResponse response, ApiAssistant assistant) throws IOException
exception - response - IOExceptiondefault void renderJsonResponse(org.springframework.extensions.webscripts.WebScriptResponse res,
Object toSerialize,
JacksonHelper jsonHelper)
throws IOException
res - WebScriptResponsetoSerialize - result of an executionIOExceptionCopyright © 2005–2018 Alfresco Software. All rights reserved.