Class AbstractResourceWebScript
java.lang.Object
org.springframework.extensions.webscripts.AbstractWebScript
org.alfresco.rest.framework.webscripts.ApiWebScript
org.alfresco.rest.framework.webscripts.AbstractResourceWebScript
- All Implemented Interfaces:
HttpMethodSupport,ActionExecutor,ResponseWriter,org.springframework.extensions.webscripts.WebScript
- Direct Known Subclasses:
ResourceWebScriptDelete,ResourceWebScriptGet,ResourceWebScriptPost,ResourceWebScriptPut
public abstract class AbstractResourceWebScript
extends ApiWebScript
implements HttpMethodSupport, ActionExecutor, ResponseWriter
Webscript that handles the request for and execution of a Resource
1) Finds a resource 2) Extracts params 3) Executes params on a resource 4) Post processes the response to add embeds or projected relationship 5) Renders the response
- Author:
- Gethin James, janv
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.extensions.webscripts.AbstractWebScript
org.springframework.extensions.webscripts.AbstractWebScript.ScriptDetails -
Field Summary
FieldsFields inherited from class org.alfresco.rest.framework.webscripts.ApiWebScript
assistant, encryptTempFiles, maxContentSize, memoryThreshold, streamFactory, tempDirectoryName, transactionServiceFields inherited from interface org.alfresco.rest.framework.tools.ResponseWriter
CACHE_NEVER, DEFAULT_JSON_CONTENT, DEFAULT_SUCCESS, UTF8 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(Api api, org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse res) execute(ResourceWithMetadata resource, Params params, org.springframework.extensions.webscripts.WebScriptResponse res, boolean isReadOnly) org.springframework.http.HttpMethodprotected RetryingTransactionHelperprotected voidresetRequest(org.springframework.extensions.webscripts.WebScriptRequest req) voidsetHelper(ResourceWebScriptHelper helper) voidsetHttpMethod(org.springframework.http.HttpMethod httpMethod) voidsetLocator(ResourceLocator locator) voidsetParamsExtractor(ParamsExtractor paramsExtractor) voidsetStreamer(ContentStreamer streamer) protected voidstreamResponse(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse res, BinaryResource resource) Methods inherited from class org.alfresco.rest.framework.webscripts.ApiWebScript
execute, getRequest, getResponse, init, setAssistant, setEncryptTempFiles, setMaxContentSize, setMemoryThreshold, setStreamFactory, setTempDirectoryName, setTransactionServiceMethods inherited from class org.springframework.extensions.webscripts.AbstractWebScript
addModuleBundleToCache, checkModuleBundleCache, createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, createTemplateParameters, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.alfresco.rest.framework.resource.actions.ActionExecutor
executeActionMethods inherited from interface org.alfresco.rest.framework.tools.ResponseWriter
renderErrorResponse, renderErrorResponse, renderException, renderException, renderJsonResponse, resWriterLogger, setContentInfoOnResponse, setResponse, setResponse
-
Field Details
-
locator
-
helper
-
-
Constructor Details
-
AbstractResourceWebScript
public AbstractResourceWebScript()
-
-
Method Details
-
execute
public void execute(Api api, org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse res) throws IOException - Specified by:
executein classApiWebScript- Throws:
IOException
-
execute
public Object execute(ResourceWithMetadata resource, Params params, org.springframework.extensions.webscripts.WebScriptResponse res, boolean isReadOnly) -
resetRequest
protected void resetRequest(org.springframework.extensions.webscripts.WebScriptRequest req) -
getTransactionHelper
-
streamResponse
protected void streamResponse(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse res, BinaryResource resource) throws IOException - Throws:
IOException
-
setLocator
-
setHttpMethod
public void setHttpMethod(org.springframework.http.HttpMethod httpMethod) -
setParamsExtractor
-
setHelper
-
getHttpMethod
public org.springframework.http.HttpMethod getHttpMethod()- Specified by:
getHttpMethodin interfaceHttpMethodSupport
-
setStreamer
-