Class Main
- java.lang.Object
-
- org.nuxeo.ecm.webengine.model.impl.AbstractResource<ResourceTypeImpl>
-
- org.nuxeo.ecm.webengine.model.impl.DefaultObject
-
- org.nuxeo.ecm.webengine.model.impl.ModuleRoot
-
- org.nuxeo.elasticsearch.http.readonly.Main
-
- All Implemented Interfaces:
ModuleResource
,Resource
,Adaptable
public class Main extends ModuleRoot
Exposes a limited set of Read Only Elasticsearch REST API.- Since:
- 7.3
-
-
Field Summary
-
Fields inherited from class org.nuxeo.ecm.webengine.model.impl.ModuleRoot
request, sic
-
-
Constructor Summary
Constructors Constructor Description Main()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected String
doSearchWithPayload(String indices, String rawQuery, String payload)
protected String
doSearchWithPayload(String indices, String types, String rawQuery, String payload)
Deprecated, for removal: This API element is subject to removal in a future version.since 11.4, types have been removed since Elasticsearch 7.x, usedoSearchWithPayload(String, String, String)
insteadString
getDocument(String indices, String types, String documentId, javax.ws.rs.core.UriInfo uriInf)
Deprecated, for removal: This API element is subject to removal in a future version.since 11.4, types have been removed since Elasticsearch 7.x, usegetDocument(String, String, UriInfo)
insteadString
getDocument(String indices, String documentId, javax.ws.rs.core.UriInfo uriInf)
protected String
getElasticsearchBaseUrl()
NuxeoPrincipal
getPrincipal()
protected String
getWithRestClient(String endpoint)
protected String
getWithRestClient(String endpoint, String payload)
String
searchWithPayload(String indices, String types, javax.ws.rs.core.UriInfo uriInf, javax.ws.rs.core.MultivaluedMap<String,String> formParams)
Deprecated, for removal: This API element is subject to removal in a future version.since 11.4, types have been removed since Elasticsearch 7.x, usesearchWithPayload(String, UriInfo, MultivaluedMap)
insteadString
searchWithPayload(String indices, javax.ws.rs.core.UriInfo uriInf, javax.ws.rs.core.MultivaluedMap<String,String> formParams)
String
searchWithPayload(javax.ws.rs.core.UriInfo uriInf, javax.ws.rs.core.MultivaluedMap<String,String> formParams)
String
searchWithPost(String indices, String types, javax.ws.rs.core.UriInfo uriInf, String payload)
Deprecated, for removal: This API element is subject to removal in a future version.since 11.4, types have been removed since Elasticsearch 7.x, usesearchWithPost(String, UriInfo, String)
insteadString
searchWithPost(String indices, javax.ws.rs.core.UriInfo uriInf, String payload)
String
searchWithPost(javax.ws.rs.core.UriInfo uriInf, String payload)
String
searchWithUri(String indices, String types, javax.ws.rs.core.UriInfo uriInf)
Deprecated, for removal: This API element is subject to removal in a future version.since 11.4, types have been removed since Elasticsearch 7.x, usesearchWithUri(String, UriInfo)
insteadString
searchWithUri(String indices, javax.ws.rs.core.UriInfo uriInf)
-
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.ModuleRoot
getLink, getSkinResource, handleError, setContext
-
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.DefaultObject
disptachAdapter, isAdapter
-
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.AbstractResource
checkGuard, dispose, getActiveAdapter, getAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, initialize, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.nuxeo.runtime.model.Adaptable
getAdapter
-
Methods inherited from interface org.nuxeo.ecm.webengine.model.Resource
checkGuard, dispose, getActiveAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, isAdapter, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot
-
-
-
-
Method Detail
-
searchWithPayload
public String searchWithPayload(@Context javax.ws.rs.core.UriInfo uriInf, javax.ws.rs.core.MultivaluedMap<String,String> formParams) throws IOException, org.json.JSONException
- Throws:
IOException
org.json.JSONException
-
searchWithPost
public String searchWithPost(@Context javax.ws.rs.core.UriInfo uriInf, String payload) throws IOException, org.json.JSONException
- Throws:
IOException
org.json.JSONException
-
searchWithPayload
public String searchWithPayload(String indices, @Context javax.ws.rs.core.UriInfo uriInf, javax.ws.rs.core.MultivaluedMap<String,String> formParams) throws IOException, org.json.JSONException
- Throws:
IOException
org.json.JSONException
-
searchWithPost
public String searchWithPost(String indices, @Context javax.ws.rs.core.UriInfo uriInf, String payload) throws IOException, org.json.JSONException
- Throws:
IOException
org.json.JSONException
-
searchWithPayload
@Deprecated(since="11.4", forRemoval=true) public String searchWithPayload(String indices, String types, @Context javax.ws.rs.core.UriInfo uriInf, javax.ws.rs.core.MultivaluedMap<String,String> formParams) throws IOException, org.json.JSONException
Deprecated, for removal: This API element is subject to removal in a future version.since 11.4, types have been removed since Elasticsearch 7.x, usesearchWithPayload(String, UriInfo, MultivaluedMap)
instead- Throws:
IOException
org.json.JSONException
-
searchWithPost
@Deprecated(since="11.4", forRemoval=true) public String searchWithPost(String indices, String types, @Context javax.ws.rs.core.UriInfo uriInf, String payload) throws IOException, org.json.JSONException
Deprecated, for removal: This API element is subject to removal in a future version.since 11.4, types have been removed since Elasticsearch 7.x, usesearchWithPost(String, UriInfo, String)
instead- Throws:
IOException
org.json.JSONException
-
doSearchWithPayload
@Deprecated(since="11.4", forRemoval=true) protected String doSearchWithPayload(String indices, String types, String rawQuery, String payload) throws IOException, org.json.JSONException
Deprecated, for removal: This API element is subject to removal in a future version.since 11.4, types have been removed since Elasticsearch 7.x, usedoSearchWithPayload(String, String, String)
instead- Throws:
IOException
org.json.JSONException
-
doSearchWithPayload
protected String doSearchWithPayload(String indices, String rawQuery, String payload) throws IOException, org.json.JSONException
- Throws:
IOException
org.json.JSONException
-
searchWithUri
public String searchWithUri(String indices, @Context javax.ws.rs.core.UriInfo uriInf) throws IOException, org.json.JSONException
- Throws:
IOException
org.json.JSONException
- Since:
- 11.4
-
searchWithUri
@Deprecated(since="11.4", forRemoval=true) public String searchWithUri(String indices, String types, @Context javax.ws.rs.core.UriInfo uriInf) throws IOException, org.json.JSONException
Deprecated, for removal: This API element is subject to removal in a future version.since 11.4, types have been removed since Elasticsearch 7.x, usesearchWithUri(String, UriInfo)
instead- Throws:
IOException
org.json.JSONException
-
getDocument
public String getDocument(String indices, String documentId, @Context javax.ws.rs.core.UriInfo uriInf) throws IOException, org.json.JSONException
- Throws:
IOException
org.json.JSONException
-
getDocument
@Deprecated(since="11.4", forRemoval=true) public String getDocument(String indices, String types, String documentId, @Context javax.ws.rs.core.UriInfo uriInf) throws IOException, org.json.JSONException
Deprecated, for removal: This API element is subject to removal in a future version.since 11.4, types have been removed since Elasticsearch 7.x, usegetDocument(String, String, UriInfo)
instead- Throws:
IOException
org.json.JSONException
-
getElasticsearchBaseUrl
protected String getElasticsearchBaseUrl()
-
getPrincipal
@NotNull public NuxeoPrincipal getPrincipal()
-
-