Class HttpAccessTransport

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T extends fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.ResponseDto>
      T
      doDelete​(String strEndPointUrl, Map<String,​String> mapParams, Map<String,​String> mapHeadersRequest, Class<T> responseJsonClass, com.fasterxml.jackson.databind.ObjectMapper mapper)
      make a Delete request on given url with parameters
      <T extends fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.ResponseDto>
      T
      doDeleteJSON​(String strEndPointUrl, Map<String,​String> mapParams, Map<String,​String> mapHeadersRequest, Object json, Class<T> responseJsonClass, com.fasterxml.jackson.databind.ObjectMapper mapper)
      make a Delete request on given url with parameters and json in body
      <T extends fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.ResponseDto>
      T
      doGet​(String strEndPointUrl, Map<String,​String> mapParams, Map<String,​String> mapHeadersRequest, Class<T> responseJsonClass, com.fasterxml.jackson.databind.ObjectMapper mapper)
      make a Get request on given url with parameters
      String doPost​(String strUrl, Map<String,​String> mapParams, Map<String,​String> mapHeadersRequest)
      make POST request on given url with params and headers
      <T extends fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.ResponseDto>
      T
      doPostJSON​(String strUrl, Map<String,​String> mapParams, Map<String,​String> mapHeadersRequest, Object json, Class<T> responseJsonClass, com.fasterxml.jackson.databind.ObjectMapper mapper)
      make POST request on given url with params and headers of a JSON object to retrieve another JSON
      <T extends fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.ResponseDto>
      List<T>
      doPostJSONforList​(String strUrl, Map<String,​String> mapParams, Map<String,​String> mapHeadersRequest, Object json, Class<T> responseJsonClass, com.fasterxml.jackson.databind.ObjectMapper mapper)
      make POST request on given url with params and headers of a JSON object to retrieve another JSON
      <T extends fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.ResponseDto>
      T
      doPutJSON​(String strUrl, Map<String,​String> mapParams, Map<String,​String> mapHeadersRequest, Object json, Class<T> responseJsonClass, com.fasterxml.jackson.databind.ObjectMapper mapper)
      make POST request on given url with params and headers of a JSON object to retrieve another JSON
      String getApiEndPointUrl()
      get end point
      void setApiEndPointUrl​(String strApiEndPointUrl)
      set end point
    • Constructor Detail

      • HttpAccessTransport

        public HttpAccessTransport()
    • Method Detail

      • doPost

        public String doPost​(String strUrl,
                             Map<String,​String> mapParams,
                             Map<String,​String> mapHeadersRequest)
                      throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        make POST request on given url with params and headers
        Specified by:
        doPost in interface IHttpTransportProvider
        Parameters:
        strUrl - url to call
        mapParams - params to post
        mapHeadersRequest - headers of the request
        Returns:
        response body as String
        Throws:
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      • doPostJSON

        public <T extends fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.ResponseDto> T doPostJSON​(String strUrl,
                                                                                                               Map<String,​String> mapParams,
                                                                                                               Map<String,​String> mapHeadersRequest,
                                                                                                               Object json,
                                                                                                               Class<T> responseJsonClass,
                                                                                                               com.fasterxml.jackson.databind.ObjectMapper mapper)
                                                                                                        throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        make POST request on given url with params and headers of a JSON object to retrieve another JSON
        Specified by:
        doPostJSON in interface IHttpTransportProvider
        Type Parameters:
        T - of the response
        Parameters:
        strUrl - url to call
        mapParams - params to post
        mapHeadersRequest - headers of the request
        json - JSON object to post
        responseJsonClass - the class
        mapper - mapper for JSON serialize / deserialize
        Returns:
        T
        Throws:
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      • doPutJSON

        public <T extends fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.ResponseDto> T doPutJSON​(String strUrl,
                                                                                                              Map<String,​String> mapParams,
                                                                                                              Map<String,​String> mapHeadersRequest,
                                                                                                              Object json,
                                                                                                              Class<T> responseJsonClass,
                                                                                                              com.fasterxml.jackson.databind.ObjectMapper mapper)
                                                                                                       throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        make POST request on given url with params and headers of a JSON object to retrieve another JSON
        Specified by:
        doPutJSON in interface IHttpTransportProvider
        Type Parameters:
        T - of the response
        Parameters:
        strUrl - url to call
        mapParams - params to post
        mapHeadersRequest - headers of the request
        json - JSON object to post
        responseJsonClass - the class
        mapper - mapper for JSON serialize / deserialize
        Returns:
        T
        Throws:
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      • doPostJSONforList

        public <T extends fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.ResponseDto> List<T> doPostJSONforList​(String strUrl,
                                                                                                                            Map<String,​String> mapParams,
                                                                                                                            Map<String,​String> mapHeadersRequest,
                                                                                                                            Object json,
                                                                                                                            Class<T> responseJsonClass,
                                                                                                                            com.fasterxml.jackson.databind.ObjectMapper mapper)
                                                                                                                     throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        make POST request on given url with params and headers of a JSON object to retrieve another JSON
        Specified by:
        doPostJSONforList in interface IHttpTransportProvider
        Type Parameters:
        T - of the response
        Parameters:
        strUrl - url to call
        mapParams - params to post
        mapHeadersRequest - headers of the request
        json - JSON object to post
        responseJsonClass - the class
        mapper - mapper for JSON serialize / deserialize
        Returns:
        response list
        Throws:
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      • doGet

        public <T extends fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.ResponseDto> T doGet​(String strEndPointUrl,
                                                                                                          Map<String,​String> mapParams,
                                                                                                          Map<String,​String> mapHeadersRequest,
                                                                                                          Class<T> responseJsonClass,
                                                                                                          com.fasterxml.jackson.databind.ObjectMapper mapper)
                                                                                                   throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        Description copied from interface: IHttpTransportProvider
        make a Get request on given url with parameters
        Specified by:
        doGet in interface IHttpTransportProvider
        Type Parameters:
        T - of the response
        Parameters:
        strEndPointUrl - url
        mapParams - param to add to url
        mapHeadersRequest - request header
        responseJsonClass - the class
        mapper - mapper for JSON serialize / deserialize
        Returns:
        response list
        Throws:
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      • doDelete

        public <T extends fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.ResponseDto> T doDelete​(String strEndPointUrl,
                                                                                                             Map<String,​String> mapParams,
                                                                                                             Map<String,​String> mapHeadersRequest,
                                                                                                             Class<T> responseJsonClass,
                                                                                                             com.fasterxml.jackson.databind.ObjectMapper mapper)
                                                                                                      throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        Description copied from interface: IHttpTransportProvider
        make a Delete request on given url with parameters
        Specified by:
        doDelete in interface IHttpTransportProvider
        Type Parameters:
        T - of the response
        Parameters:
        strEndPointUrl - url
        mapParams - param to add to url
        mapHeadersRequest - request header
        responseJsonClass - the class
        mapper - mapper for JSON serialize / deserialize
        Returns:
        response list
        Throws:
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      • doDeleteJSON

        public <T extends fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.common.ResponseDto> T doDeleteJSON​(String strEndPointUrl,
                                                                                                                 Map<String,​String> mapParams,
                                                                                                                 Map<String,​String> mapHeadersRequest,
                                                                                                                 Object json,
                                                                                                                 Class<T> responseJsonClass,
                                                                                                                 com.fasterxml.jackson.databind.ObjectMapper mapper)
                                                                                                          throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        Description copied from interface: IHttpTransportProvider
        make a Delete request on given url with parameters and json in body
        Specified by:
        doDeleteJSON in interface IHttpTransportProvider
        Type Parameters:
        T - of the response
        Parameters:
        strEndPointUrl - url
        mapParams - param to add to url
        mapHeadersRequest - request header
        responseJsonClass - the class
        mapper - mapper for JSON serialize / deserialize
        Returns:
        response list
        Throws:
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException