Package fr.becpg.repo.web.scripts.search
Class SearchWebScript
java.lang.Object
org.springframework.extensions.webscripts.AbstractWebScript
fr.becpg.repo.web.scripts.search.AbstractSearchWebScript
fr.becpg.repo.web.scripts.search.SearchWebScript
- All Implemented Interfaces:
org.springframework.extensions.webscripts.WebScript
Webscript that send the result of a search
- Version:
- $Id: $Id
- Author:
- matthieu
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.extensions.webscripts.AbstractWebScript
org.springframework.extensions.webscripts.AbstractWebScript.ScriptDetails -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AttributeExtractorServiceprivate static final org.apache.commons.logging.Logprivate org.alfresco.service.ServiceRegistryFields inherited from class fr.becpg.repo.web.scripts.search.AbstractSearchWebScript
advSearchService, namespaceService, nodeService, PARAM_CONTAINER, PARAM_EXTRA_PARAMS, PARAM_FILTER, PARAM_FILTER_DATA, PARAM_FILTER_PARAMS, PARAM_ITEMTYPE, PARAM_MAX_RESULTS, PARAM_NODEREF, PARAM_PAGE, PARAM_PAGE_SIZE, PARAM_QUERY, PARAM_REPOSITORY, PARAM_SITE, PARAM_SORT, PARAM_TAG, PARAM_TERM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse res) private NodeDataExtractorgetExtractor(org.alfresco.service.cmr.repository.NodeRef nodeRef, List<AttributeExtractorField> metadataFields) private IntegergetNumParameter(org.springframework.extensions.webscripts.WebScriptRequest req, String paramName) private org.json.JSONObjectprocessResults(List<org.alfresco.service.cmr.repository.NodeRef> results, List<AttributeExtractorField> metadataFields) voidsetAttributeExtractorService(AttributeExtractorService attributeExtractorService) Setter for the fieldattributeExtractorService.voidsetServiceRegistry(org.alfresco.service.ServiceRegistry serviceRegistry) Setter for the fieldserviceRegistry.Methods inherited from class fr.becpg.repo.web.scripts.search.AbstractSearchWebScript
doSearch, setAdvSearchService, setNamespaceService, setNodeServiceMethods 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
-
Field Details
-
logger
private static final org.apache.commons.logging.Log logger -
serviceRegistry
private org.alfresco.service.ServiceRegistry serviceRegistry -
attributeExtractorService
-
-
Constructor Details
-
SearchWebScript
public SearchWebScript()
-
-
Method Details
-
setAttributeExtractorService
Setter for the field
attributeExtractorService.- Parameters:
attributeExtractorService- the propertyService to set
-
setServiceRegistry
public void setServiceRegistry(org.alfresco.service.ServiceRegistry serviceRegistry) Setter for the field
serviceRegistry.- Parameters:
serviceRegistry- the serviceRegistry to set
-
execute
public void execute(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse res) throws IOException - Throws:
IOException
-
getNumParameter
-
processResults
private org.json.JSONObject processResults(List<org.alfresco.service.cmr.repository.NodeRef> results, List<AttributeExtractorField> metadataFields) throws org.json.JSONException - Throws:
org.json.JSONException
-
getExtractor
private NodeDataExtractor getExtractor(org.alfresco.service.cmr.repository.NodeRef nodeRef, List<AttributeExtractorField> metadataFields)
-