java.lang.Object
org.qubership.integration.platform.engine.opensearch.ism.rest.RequestHelper

public class RequestHelper extends Object
  • 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