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
-
-
Field Summary
Fields Modifier and Type Field Description protected ResourceWebScriptHelper
helper
protected ResourceLocator
locator
-
Fields 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 Constructor Description AbstractResourceWebScript()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(Api api, org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse res)
Object
execute(ResourceWithMetadata resource, Params params, org.springframework.extensions.webscripts.WebScriptResponse res, boolean isReadOnly)
org.springframework.http.HttpMethod
getHttpMethod()
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 Detail
-
locator
protected ResourceLocator locator
-
helper
protected ResourceWebScriptHelper helper
-
-
Method Detail
-
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)
-
streamResponse
protected void streamResponse(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse res, BinaryResource resource) throws IOException
- Throws:
IOException
-
setLocator
public void setLocator(ResourceLocator locator)
-
setHttpMethod
public void setHttpMethod(org.springframework.http.HttpMethod httpMethod)
-
setParamsExtractor
public void setParamsExtractor(ParamsExtractor paramsExtractor)
-
setHelper
public void setHelper(ResourceWebScriptHelper helper)
-
getHttpMethod
public org.springframework.http.HttpMethod getHttpMethod()
- Specified by:
getHttpMethod
in interfaceHttpMethodSupport
-
setStreamer
public void setStreamer(ContentStreamer streamer)
-
-