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 StringdoSearchWithPayload(String indices, String rawQuery, String payload)protected StringdoSearchWithPayload(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)insteadStringgetDocument(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)insteadStringgetDocument(String indices, String documentId, javax.ws.rs.core.UriInfo uriInf)protected StringgetElasticsearchBaseUrl()NuxeoPrincipalgetPrincipal()protected StringgetWithRestClient(String endpoint)protected StringgetWithRestClient(String endpoint, String payload)StringsearchWithPayload(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)insteadStringsearchWithPayload(String indices, javax.ws.rs.core.UriInfo uriInf, javax.ws.rs.core.MultivaluedMap<String,String> formParams)StringsearchWithPayload(javax.ws.rs.core.UriInfo uriInf, javax.ws.rs.core.MultivaluedMap<String,String> formParams)StringsearchWithPost(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)insteadStringsearchWithPost(String indices, javax.ws.rs.core.UriInfo uriInf, String payload)StringsearchWithPost(javax.ws.rs.core.UriInfo uriInf, String payload)StringsearchWithUri(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)insteadStringsearchWithUri(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:
IOExceptionorg.json.JSONException
-
searchWithPost
public String searchWithPost(@Context javax.ws.rs.core.UriInfo uriInf, String payload) throws IOException, org.json.JSONException
- Throws:
IOExceptionorg.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:
IOExceptionorg.json.JSONException
-
searchWithPost
public String searchWithPost(String indices, @Context javax.ws.rs.core.UriInfo uriInf, String payload) throws IOException, org.json.JSONException
- Throws:
IOExceptionorg.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:
IOExceptionorg.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:
IOExceptionorg.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:
IOExceptionorg.json.JSONException
-
doSearchWithPayload
protected String doSearchWithPayload(String indices, String rawQuery, String payload) throws IOException, org.json.JSONException
- Throws:
IOExceptionorg.json.JSONException
-
searchWithUri
public String searchWithUri(String indices, @Context javax.ws.rs.core.UriInfo uriInf) throws IOException, org.json.JSONException
- Throws:
IOExceptionorg.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:
IOExceptionorg.json.JSONException
-
getDocument
public String getDocument(String indices, String documentId, @Context javax.ws.rs.core.UriInfo uriInf) throws IOException, org.json.JSONException
- Throws:
IOExceptionorg.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:
IOExceptionorg.json.JSONException
-
getElasticsearchBaseUrl
protected String getElasticsearchBaseUrl()
-
getPrincipal
@NotNull public NuxeoPrincipal getPrincipal()
-
-