Class WebScriptOptionsMetaData
java.lang.Object
org.springframework.extensions.webscripts.AbstractWebScript
org.alfresco.rest.framework.webscripts.ApiWebScript
org.alfresco.rest.framework.webscripts.metadata.WebScriptOptionsMetaData
- All Implemented Interfaces:
ResourceMetaDataWriter
,org.springframework.extensions.webscripts.WebScript
Provides general information about an Api call and its methods.
- Author:
- Gethin James
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.extensions.webscripts.AbstractWebScript
org.springframework.extensions.webscripts.AbstractWebScript.ScriptDetails
-
Field Summary
Fields inherited from class org.alfresco.rest.framework.webscripts.ApiWebScript
assistant, encryptTempFiles, maxContentSize, memoryThreshold, streamFactory, tempDirectoryName, transactionService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ResourceMetaDataWriter
chooseWriter
(org.springframework.extensions.webscripts.WebScriptRequest req) Chooses the correct writer to use based on the supplied "format" paramvoid
execute
(Api api, org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse res) static Object
processResult
(ResourceWithMetadata resource, Map<String, ResourceWithMetadata> apiResources) Processes the resulting resource and returns the data to be displayedvoid
setLookupDictionary
(ResourceLookupDictionary lookupDictionary) void
setWriters
(Map<String, ResourceMetaDataWriter> writers) void
writeMetaData
(OutputStream out, ResourceWithMetadata resource, Map<String, ResourceWithMetadata> allApiResources) Write the metadata to the OutputStreamMethods 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
-
Constructor Details
-
WebScriptOptionsMetaData
public WebScriptOptionsMetaData()
-
-
Method Details
-
setLookupDictionary
-
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
-
chooseWriter
protected ResourceMetaDataWriter chooseWriter(org.springframework.extensions.webscripts.WebScriptRequest req) Chooses the correct writer to use based on the supplied "format" param- Parameters:
req
- - the WebScriptRequest- Returns:
- ResourceMetaDataWriter - a matching writer - DEFAULT is this class.
-
processResult
public static Object processResult(ResourceWithMetadata resource, Map<String, ResourceWithMetadata> apiResources) Processes the resulting resource and returns the data to be displayed- Parameters:
resource
- ResourceWithMetadata- Returns:
- Either a ExecutionResult or a CollectionWithPagingInfo
-
writeMetaData
public void writeMetaData(OutputStream out, ResourceWithMetadata resource, Map<String, ResourceWithMetadata> allApiResources) throws IOExceptionDescription copied from interface:ResourceMetaDataWriter
Write the metadata to the OutputStream- Specified by:
writeMetaData
in interfaceResourceMetaDataWriter
- Parameters:
out
- OutputStreamresource
- - the selected resourceallApiResources
- - all resources for the API version- Throws:
IOException
-
setWriters
-