public abstract class AbstractResourceWebScript extends ApiWebScript implements HttpMethodSupport, ActionExecutor
org.springframework.extensions.webscripts.AbstractWebScript.ScriptDetails
ActionExecutor.ExecutionCallback
Modifier and Type | Field and Description |
---|---|
protected ResourceWebScriptHelper |
helper |
protected ResourceLocator |
locator |
CACHE_NEVER, encryptTempFiles, jsonHelper, maxContentSize, memoryThreshold, streamFactory, tempDirectoryName, transactionService, UTF8
Constructor and Description |
---|
AbstractResourceWebScript() |
Modifier and Type | Method and Description |
---|---|
void |
execute(Api api,
org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.WebScriptResponse res) |
ActionExecutor |
findExecutor(org.springframework.http.HttpMethod httpMethod,
Params params,
ResourceWithMetadata resource,
java.lang.String contentType)
Finds the action executor to execute actions on.
|
org.springframework.http.HttpMethod |
getHttpMethod() |
protected void |
renderJsonResponse(org.springframework.extensions.webscripts.WebScriptResponse res,
java.lang.Object toSerialize)
Renders the result of an execution.
|
void |
setHelper(ResourceWebScriptHelper helper) |
void |
setHttpMethod(org.springframework.http.HttpMethod httpMethod) |
void |
setLocator(ResourceLocator locator) |
void |
setParamsExtractor(ParamsExtractor paramsExtractor) |
void |
setStreamer(ContentStreamer streamer) |
protected void |
setSuccessResponseStatus(org.springframework.extensions.webscripts.WebScriptResponse res)
The response status must be set before the response is written by Jackson (which will by default close and commit the response).
|
protected void |
streamResponse(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.WebScriptResponse res,
BinaryResource resource) |
execute, getRequest, getResponse, init, renderErrorResponse, resolveException, setContentInfoOnResponse, setDefaultResolver, setEncryptTempFiles, setJsonHelper, setMaxContentSize, setMemoryThreshold, setResolver, setStreamFactory, setTempDirectoryName, setTransactionService
addModuleBundleToCache, checkModuleBundleCache, createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, createTemplateParameters, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
execute
protected ResourceLocator locator
protected ResourceWebScriptHelper helper
public void execute(Api api, org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse res) throws java.io.IOException
execute
in class ApiWebScript
java.io.IOException
protected void streamResponse(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse res, BinaryResource resource) throws java.io.IOException
java.io.IOException
protected void renderJsonResponse(org.springframework.extensions.webscripts.WebScriptResponse res, java.lang.Object toSerialize) throws java.io.IOException
res
- WebScriptResponserespons
- result of an executionjava.io.IOException
protected void setSuccessResponseStatus(org.springframework.extensions.webscripts.WebScriptResponse res)
res
- public ActionExecutor findExecutor(org.springframework.http.HttpMethod httpMethod, Params params, ResourceWithMetadata resource, java.lang.String contentType)
httpMethod
- - the http methodparams
- Paramsresource
- contentType
- Request content typepublic void setLocator(ResourceLocator locator)
public void setHttpMethod(org.springframework.http.HttpMethod httpMethod)
public void setParamsExtractor(ParamsExtractor paramsExtractor)
public void setHelper(ResourceWebScriptHelper helper)
public org.springframework.http.HttpMethod getHttpMethod()
getHttpMethod
in interface HttpMethodSupport
public void setStreamer(ContentStreamer streamer)
Copyright © 2005 - 2013 Alfresco Software, Inc. All Rights Reserved.