Package org.alfresco.rest.api.search
Class SearchApiWebscript
java.lang.Object
org.springframework.extensions.webscripts.AbstractWebScript
org.alfresco.rest.api.search.SearchApiWebscript
- All Implemented Interfaces:
RecognizedParamsExtractor,RequestReader,ResponseWriter,org.springframework.beans.factory.InitializingBean,org.springframework.extensions.webscripts.WebScript
public class SearchApiWebscript
extends org.springframework.extensions.webscripts.AbstractWebScript
implements RecognizedParamsExtractor, RequestReader, ResponseWriter, org.springframework.beans.factory.InitializingBean
An implementation of the {{baseUrl}}/{{networkId}}/public/search/versions/1/search endpoint
- 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
FieldsFields inherited from interface org.alfresco.rest.framework.tools.RecognizedParamsExtractor
KNOWN_PARAMS, PARAM_FILTER_FIELDS, PARAM_FILTER_PROPERTIES, PARAM_INCLUDE, PARAM_INCLUDE_SOURCE_ENTITY, PARAM_ORDERBY, PARAM_PAGING_MAX, PARAM_PAGING_SKIP, PARAM_RELATIONS, PARAM_SELECT, PARAM_WHEREFields inherited from interface org.alfresco.rest.framework.tools.ResponseWriter
CACHE_NEVER, DEFAULT_JSON_CONTENT, DEFAULT_SUCCESS, UTF8 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidexecute(org.springframework.extensions.webscripts.WebScriptRequest webScriptRequest, org.springframework.extensions.webscripts.WebScriptResponse webScriptResponse) protected ParamsgetParams(org.springframework.extensions.webscripts.WebScriptRequest webScriptRequest, List<String> fields, List<String> include, Paging paging) Gets the Params object, parameters come from the SearchQuery json not the requestvoidsetAssistant(ApiAssistant assistant) voidsetHelper(ResourceWebScriptHelper helper) voidsetResultMapper(ResultMapper resultMapper) voidsetSearchMapper(SearchMapper searchMapper) voidsetServiceRegistry(ServiceRegistry serviceRegistry) 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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.alfresco.rest.framework.tools.RecognizedParamsExtractor
findPaging, getClause, getFilter, getFilter, getIncludeClause, getPaging, getRecognizedParams, getRelationFilter, getRequestParameters, getSelectClause, getSort, getWhereClause, rpeLoggerMethods inherited from interface org.alfresco.rest.framework.tools.RequestReader
extractJsonContent, extractJsonContentAsList, rrLoggerMethods inherited from interface org.alfresco.rest.framework.tools.ResponseWriter
renderErrorResponse, renderException, renderJsonResponse, resWriterLogger, setContentInfoOnResponse, setResponse, setResponse
-
Field Details
-
assistant
-
helper
-
-
Constructor Details
-
SearchApiWebscript
public SearchApiWebscript()
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
execute
public void execute(org.springframework.extensions.webscripts.WebScriptRequest webScriptRequest, org.springframework.extensions.webscripts.WebScriptResponse webScriptResponse) throws IOException - Specified by:
executein interfaceorg.springframework.extensions.webscripts.WebScript- Throws:
IOException
-
getParams
protected Params getParams(org.springframework.extensions.webscripts.WebScriptRequest webScriptRequest, List<String> fields, List<String> include, Paging paging) Gets the Params object, parameters come from the SearchQuery json not the request- Parameters:
webScriptRequest-searchQuery-- Returns:
- Params
-
setSearchMapper
-
setResultMapper
-
setAssistant
-
setServiceRegistry
-
setHelper
-