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, transactionService
Fields inherited from interface org.alfresco.rest.framework.tools.ResponseWriter
CACHE_NEVER, DEFAULT_JSON_CONTENT, DEFAULT_SUCCESS, UTF8
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(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.HttpMethod
protected RetryingTransactionHelper
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
streamResponse
(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, setTransactionService
Methods 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, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.alfresco.rest.framework.resource.actions.ActionExecutor
executeAction
Methods inherited from interface org.alfresco.rest.framework.tools.ResponseWriter
renderErrorResponse, 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:
execute
in classApiWebScript
- Throws:
IOException
-
execute
public Object execute(ResourceWithMetadata resource, Params params, org.springframework.extensions.webscripts.WebScriptResponse res, boolean isReadOnly) -
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:
getHttpMethod
in interfaceHttpMethodSupport
-
setStreamer
-