Package org.alfresco.repo.search.impl
Class AbstractJSONAPIResult
java.lang.Object
org.alfresco.repo.search.impl.AbstractJSONAPIResult
- All Implemented Interfaces:
JSONAPIResult
- Direct Known Subclasses:
SolrActionAclReportResult,SolrActionAclTxReportResult,SolrActionCheckResult,SolrActionFixResult,SolrActionNodeReportResult,SolrActionReportResult,SolrActionStatusResult,SolrActionTxReportResult,SolrCommandBackupResult
JSON returned from SOLR API Parser This class defines common properties and performs response header parsing. An abstract method is provided for implementers to parse Core Information.
- Since:
- 6.2
- Author:
- aborroy
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCores()Name of the cores managed by SOLRInformation from the cores to be exposed in JMX Beans The names and the structure of the properties depend on the type of the ActiongetPropertyValueMap(org.json.JSONObject json) Creates a property-value Map from a JSON Object containing properties and values This method provides the right input for MBeans to expose the SOLR response values from the ResponseTime to perform the requested action or command in SOLRHTTP Response code But for 200, that is being returned as 0protected abstract voidprocessCoresInfoJson(org.json.JSONObject json) Parses the JSON to set this Java Object values related to Core Informationprotected voidprocessJson(org.json.JSONObject json) Parses the JSON to set this Java Object values
-
Field Details
-
status
-
queryTime
-
cores
-
coresInfo
-
-
Constructor Details
-
AbstractJSONAPIResult
public AbstractJSONAPIResult()
-
-
Method Details
-
getQueryTime
Description copied from interface:JSONAPIResultTime to perform the requested action or command in SOLR- Specified by:
getQueryTimein interfaceJSONAPIResult- Returns:
- Number of milliseconds
-
getStatus
Description copied from interface:JSONAPIResultHTTP Response code But for 200, that is being returned as 0- Specified by:
getStatusin interfaceJSONAPIResult- Returns:
- Number representing an HTTP Status
-
getCores
Description copied from interface:JSONAPIResultName of the cores managed by SOLR- Specified by:
getCoresin interfaceJSONAPIResult- Returns:
- A list with the names of the cores
-
getCoresInfo
Description copied from interface:JSONAPIResultInformation from the cores to be exposed in JMX Beans The names and the structure of the properties depend on the type of the Action- Specified by:
getCoresInfoin interfaceJSONAPIResult- Returns:
- Core information by core name
-
processJson
protected void processJson(org.json.JSONObject json) throws org.json.JSONException Parses the JSON to set this Java Object values- Parameters:
json- JSONObject returned by SOLR API- Throws:
org.json.JSONException
-
getPropertyValueMap
protected Map<String,Object> getPropertyValueMap(org.json.JSONObject json) throws org.json.JSONException Creates a property-value Map from a JSON Object containing properties and values This method provides the right input for MBeans to expose the SOLR response values from the Response- Parameters:
json- Simple JSON Object containing only properties- Returns:
- Property-value Map
- Throws:
org.json.JSONException
-
processCoresInfoJson
protected abstract void processCoresInfoJson(org.json.JSONObject json) throws org.json.JSONException Parses the JSON to set this Java Object values related to Core Information- Parameters:
json- JSONObject returned by SOLR API- Throws:
org.json.JSONException
-