Class RequestHelper
java.lang.Object
org.qubership.integration.platform.engine.opensearch.ism.rest.RequestHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.opensearch.client.opensearch.generic.RequestbuildAddPolicyRequest(com.fasterxml.jackson.databind.ObjectMapper objectMapper, String indexName, String policyId) static org.opensearch.client.opensearch.generic.RequestbuildCreateIndexRequest(com.fasterxml.jackson.databind.ObjectMapper objectMapper, String indexName, Map<String, Object> request) static org.opensearch.client.opensearch.generic.RequestbuildCreatePolicyRequest(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Policy policy) static org.opensearch.client.opensearch.generic.RequestbuildGetPolicyRequest(String policyId) static org.opensearch.client.opensearch.generic.RequestbuildPutIndexMapping(com.fasterxml.jackson.databind.ObjectMapper objectMapper, String indexName, Map<String, Object> request) static org.opensearch.client.opensearch.generic.RequestbuildPutIndexTemplateRequest(com.fasterxml.jackson.databind.ObjectMapper objectMapper, String templateName, Map<String, Object> request) static org.opensearch.client.opensearch.generic.RequestbuildRemovePolicyFromIndexRequest(String indexName) static org.opensearch.client.opensearch.generic.RequestbuildUpdatePolicyRequest(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Policy policy, long seqNo, long primaryTerm) static booleanisHttpError(int status) static voidprocessHttpResponse(org.opensearch.client.opensearch.generic.Response response)
-
Constructor Details
-
RequestHelper
public RequestHelper()
-
-
Method Details
-
buildGetPolicyRequest
public static org.opensearch.client.opensearch.generic.Request buildGetPolicyRequest(String policyId) -
buildCreatePolicyRequest
public static org.opensearch.client.opensearch.generic.Request buildCreatePolicyRequest(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Policy policy) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
buildUpdatePolicyRequest
public static org.opensearch.client.opensearch.generic.Request buildUpdatePolicyRequest(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Policy policy, long seqNo, long primaryTerm) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
buildAddPolicyRequest
public static org.opensearch.client.opensearch.generic.Request buildAddPolicyRequest(com.fasterxml.jackson.databind.ObjectMapper objectMapper, String indexName, String policyId) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
buildRemovePolicyFromIndexRequest
public static org.opensearch.client.opensearch.generic.Request buildRemovePolicyFromIndexRequest(String indexName) -
buildPutIndexTemplateRequest
public static org.opensearch.client.opensearch.generic.Request buildPutIndexTemplateRequest(com.fasterxml.jackson.databind.ObjectMapper objectMapper, String templateName, Map<String, Object> request) throws com.fasterxml.jackson.core.JsonProcessingException- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
buildCreateIndexRequest
public static org.opensearch.client.opensearch.generic.Request buildCreateIndexRequest(com.fasterxml.jackson.databind.ObjectMapper objectMapper, String indexName, Map<String, Object> request) throws com.fasterxml.jackson.core.JsonProcessingException- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
buildPutIndexMapping
public static org.opensearch.client.opensearch.generic.Request buildPutIndexMapping(com.fasterxml.jackson.databind.ObjectMapper objectMapper, String indexName, Map<String, Object> request) throws com.fasterxml.jackson.core.JsonProcessingException- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
isHttpError
public static boolean isHttpError(int status) -
processHttpResponse
public static void processHttpResponse(org.opensearch.client.opensearch.generic.Response response) throws IOException - Throws:
IOException
-