Class ElasticConnexion

java.lang.Object
fr.paris.lutece.plugins.libraryelastic.util.ElasticConnexion

public final class ElasticConnexion extends Object
The Class ElasticConnexion.
  • Constructor Details

    • ElasticConnexion

      public ElasticConnexion(String strLogin, String strPassword)
      Basic Authentification constructor
      Parameters:
      strServerLogin - Login
      strServerPwd - Password
    • ElasticConnexion

      public ElasticConnexion()
      Constructor
  • Method Details

    • GET

      public String GET(String strURI) throws fr.paris.lutece.util.httpaccess.HttpAccessException
      Send a GET request to Elastic Search server
      Parameters:
      strURI - The URI
      Returns:
      The response
      Throws:
      fr.paris.lutece.util.httpaccess.HttpAccessException
    • PUT

      public String PUT(String strURI, String strJSON) throws fr.paris.lutece.util.httpaccess.HttpAccessException
      Send a PUT request to Elastic Search server
      Parameters:
      strURI - the uri
      strJSON - the json
      Returns:
      the string
      Throws:
      fr.paris.lutece.util.httpaccess.HttpAccessException - http access exception
    • POST

      public String POST(String strURI, String strJSON) throws fr.paris.lutece.util.httpaccess.HttpAccessException
      Send a POST request to Elastic Search server
      Parameters:
      strURI - the uri
      strJSON - the json
      Returns:
      the string
      Throws:
      fr.paris.lutece.util.httpaccess.HttpAccessException - http access exception
    • DELETE

      public String DELETE(String strURI) throws fr.paris.lutece.util.httpaccess.HttpAccessException
      Send a DELETE request to Elastic Search server
      Parameters:
      strURI - the uri
      Returns:
      the string
      Throws:
      fr.paris.lutece.util.httpaccess.HttpAccessException - http access exception