public class SolrQueryHTTPClient extends Object implements org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_SAVEPOST_BUFFER |
Constructor and Description |
---|
SolrQueryHTTPClient() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected void |
buildFacetIntervalParameters(org.alfresco.service.cmr.search.SearchParameters searchParameters,
org.apache.commons.codec.net.URLCodec encoder,
StringBuilder url) |
protected void |
buildFacetParameters(org.alfresco.service.cmr.search.SearchParameters searchParameters,
boolean isSharded,
org.apache.commons.codec.net.URLCodec encoder,
StringBuilder url) |
protected void |
buildHightlightParameters(org.alfresco.service.cmr.search.SearchParameters searchParameters,
org.apache.commons.codec.net.URLCodec encoder,
StringBuilder url) |
protected void |
buildPivotParameters(org.alfresco.service.cmr.search.SearchParameters searchParameters,
org.apache.commons.codec.net.URLCodec encoder,
StringBuilder url) |
protected void |
buildRangeParameters(org.alfresco.service.cmr.search.SearchParameters searchParameters,
org.apache.commons.codec.net.URLCodec encoder,
StringBuilder url) |
protected void |
buildShards(StringBuilder url,
List<org.alfresco.service.cmr.repository.StoreRef> storeRefs) |
protected org.json.JSONObject |
buildStatsBody(org.alfresco.service.cmr.search.StatsParameters searchParameters,
String tenant,
Locale locale) |
protected void |
buildStatsParameters(org.alfresco.service.cmr.search.SearchParameters searchParameters,
org.apache.commons.codec.net.URLCodec encoder,
StringBuilder url) |
protected String |
buildStatsUrl(org.alfresco.service.cmr.search.StatsParameters searchParameters,
String baseUrl,
Locale locale,
SolrStoreMappingWrapper mapping) |
void |
buildUrlParameters(org.alfresco.service.cmr.search.SearchParameters searchParameters,
boolean isSharded,
org.apache.commons.codec.net.URLCodec encoder,
StringBuilder url)
Builds most of the Url parameters for a Solr Http request.
|
org.json.JSONObject |
execute(org.alfresco.service.cmr.repository.StoreRef storeRef,
String handler,
HashMap<String,String> params) |
org.alfresco.service.cmr.search.ResultSet |
executeQuery(org.alfresco.service.cmr.search.SearchParameters searchParameters,
String language) |
SolrStatsResult |
executeStatsQuery(org.alfresco.service.cmr.search.StatsParameters searchParameters)
Executes a solr query for statistics
|
void |
init() |
boolean |
isSharded() |
protected org.json.JSONObject |
postQuery(org.apache.commons.httpclient.HttpClient httpClient,
String url,
org.json.JSONObject body) |
protected JSONResult |
postSolrQuery(org.apache.commons.httpclient.HttpClient httpClient,
String url,
org.json.JSONObject body,
SolrJsonProcessor<?> jsonProcessor) |
protected JSONResult |
postSolrQuery(org.apache.commons.httpclient.HttpClient httpClient,
String url,
org.json.JSONObject body,
SolrJsonProcessor<?> jsonProcessor,
String spellCheckParams) |
void |
setAlternativeDictionary(String alternativeDictionary) |
void |
setAnyDenyDenies(boolean anyDenyDenies)
When set, a single DENIED ACL entry for any authority will result in
access being denied as a whole.
|
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setDefaultShardedFacetLimit(int defaultShardedFacetLimit) |
void |
setDefaultUnshardedFacetLimit(int defaultUnshardedFacetLimit) |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setIncludeGroupsForRoleAdmin(boolean includeGroupsForRoleAdmin) |
void |
setLanguageMappings(Map<String,String> languageMappings) |
void |
setMaximumResultsFromUnlimitedQuery(int maximumResultsFromUnlimitedQuery) |
void |
setNamespaceDAO(org.alfresco.repo.dictionary.NamespaceDAO namespaceDAO) |
void |
setNodeDAO(NodeDAO nodeDAO) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService) |
void |
setRepositoryState(RepositoryState repositoryState) |
void |
setShardRegistry(ShardRegistry shardRegistry) |
void |
setStoreMappings(List storeMappings) |
void |
setTenantService(org.alfresco.repo.tenant.TenantService tenantService) |
void |
setUseDynamicShardRegistration(boolean useDynamicShardRegistration) |
public static final int DEFAULT_SAVEPOST_BUFFER
public void init()
public void setAlternativeDictionary(String alternativeDictionary)
public void setRepositoryState(RepositoryState repositoryState)
repositoryState
- the repositoryState to setpublic void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setNodeDAO(NodeDAO nodeDAO)
nodeDAO
- the nodeDao to setpublic void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
public void setNamespaceDAO(org.alfresco.repo.dictionary.NamespaceDAO namespaceDAO)
public void setShardRegistry(ShardRegistry shardRegistry)
public void setUseDynamicShardRegistration(boolean useDynamicShardRegistration)
public void setStoreMappings(List storeMappings)
public void setIncludeGroupsForRoleAdmin(boolean includeGroupsForRoleAdmin)
includeGroupsForRoleAdmin
- the includeGroupsForRoleAdmin to setpublic void setMaximumResultsFromUnlimitedQuery(int maximumResultsFromUnlimitedQuery)
maximumResultsFromUnlimitedQuery
- the maximum number of results to request from an otherwise unlimited querypublic void setAnyDenyDenies(boolean anyDenyDenies)
security.anyDenyDenies
anyDenyDenies
- booleanpublic void setDefaultUnshardedFacetLimit(int defaultUnshardedFacetLimit)
defaultUnshardedFacetLimit
- the defaultUnshardedFacetLimit to setpublic void setDefaultShardedFacetLimit(int defaultShardedFacetLimit)
defaultShardedFacetLimit
- the defaultShardedFacetLimit to setpublic SolrStatsResult executeStatsQuery(org.alfresco.service.cmr.search.StatsParameters searchParameters)
searchParameters
- StatsParametersprotected String buildStatsUrl(org.alfresco.service.cmr.search.StatsParameters searchParameters, String baseUrl, Locale locale, SolrStoreMappingWrapper mapping) throws UnsupportedEncodingException
UnsupportedEncodingException
protected void buildShards(StringBuilder url, List<org.alfresco.service.cmr.repository.StoreRef> storeRefs)
protected org.json.JSONObject buildStatsBody(org.alfresco.service.cmr.search.StatsParameters searchParameters, String tenant, Locale locale) throws org.json.JSONException
org.json.JSONException
public org.alfresco.service.cmr.search.ResultSet executeQuery(org.alfresco.service.cmr.search.SearchParameters searchParameters, String language)
public void buildUrlParameters(org.alfresco.service.cmr.search.SearchParameters searchParameters, boolean isSharded, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) throws UnsupportedEncodingException
searchParameters
- isSharded
- encoder
- url
- UnsupportedEncodingException
protected void buildFacetParameters(org.alfresco.service.cmr.search.SearchParameters searchParameters, boolean isSharded, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) throws UnsupportedEncodingException
UnsupportedEncodingException
protected void buildStatsParameters(org.alfresco.service.cmr.search.SearchParameters searchParameters, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) throws UnsupportedEncodingException
UnsupportedEncodingException
protected void buildPivotParameters(org.alfresco.service.cmr.search.SearchParameters searchParameters, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) throws UnsupportedEncodingException
UnsupportedEncodingException
protected void buildRangeParameters(org.alfresco.service.cmr.search.SearchParameters searchParameters, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) throws UnsupportedEncodingException
UnsupportedEncodingException
protected void buildHightlightParameters(org.alfresco.service.cmr.search.SearchParameters searchParameters, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) throws UnsupportedEncodingException
UnsupportedEncodingException
protected void buildFacetIntervalParameters(org.alfresco.service.cmr.search.SearchParameters searchParameters, org.apache.commons.codec.net.URLCodec encoder, StringBuilder url) throws UnsupportedEncodingException
UnsupportedEncodingException
protected JSONResult postSolrQuery(org.apache.commons.httpclient.HttpClient httpClient, String url, org.json.JSONObject body, SolrJsonProcessor<?> jsonProcessor) throws UnsupportedEncodingException, IOException, org.apache.commons.httpclient.HttpException, org.apache.commons.httpclient.URIException, org.json.JSONException
UnsupportedEncodingException
IOException
org.apache.commons.httpclient.HttpException
org.apache.commons.httpclient.URIException
org.json.JSONException
protected JSONResult postSolrQuery(org.apache.commons.httpclient.HttpClient httpClient, String url, org.json.JSONObject body, SolrJsonProcessor<?> jsonProcessor, String spellCheckParams) throws UnsupportedEncodingException, IOException, org.apache.commons.httpclient.HttpException, org.apache.commons.httpclient.URIException, org.json.JSONException
UnsupportedEncodingException
IOException
org.apache.commons.httpclient.HttpException
org.apache.commons.httpclient.URIException
org.json.JSONException
protected org.json.JSONObject postQuery(org.apache.commons.httpclient.HttpClient httpClient, String url, org.json.JSONObject body) throws UnsupportedEncodingException, IOException, org.apache.commons.httpclient.HttpException, org.apache.commons.httpclient.URIException, org.json.JSONException
UnsupportedEncodingException
IOException
org.apache.commons.httpclient.HttpException
org.apache.commons.httpclient.URIException
org.json.JSONException
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
setBeanFactory
in interface org.springframework.beans.factory.BeanFactoryAware
org.springframework.beans.BeansException
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public org.json.JSONObject execute(org.alfresco.service.cmr.repository.StoreRef storeRef, String handler, HashMap<String,String> params)
storeRef
- handler
- params
- public boolean isSharded()
Copyright © 2005–2017 Alfresco Software. All rights reserved.