private WebTarget createWebTarget(String restPath,Map<String,String> queryParams){
  WebTarget webTarget;
  try {
    URI u=new URI(this.baseURI + "/plugins/restapi/v1/" + restPath);
    Client client=createrRestClient();
    webTarget=client.target(u);
    if (queryParams != null && !queryParams.isEmpty()) {
      for (      Map.Entry<String,String> entry : queryParams.entrySet()) {
        if (entry.getKey() != null && entry.getValue() != null) {
          LOG.debug("PARAM: {} = {}",entry.getKey(),entry.getValue());
          webTarget=webTarget.queryParam(entry.getKey(),entry.getValue());
        }
      }
    }
  }
 catch (  Exception e) {
    LOG.error("Error",e);
    return null;
  }
  return webTarget;
}

private WebTarget createWebTarget ( String restPath , Map < String , String > queryParams ) { WebTarget webTarget ; try { URI u = new URI ( this . baseURI + "/plugins/restapi/v1/" + restPath ) ; Client client = createrRestClient ( ) ; webTarget = client . target ( u ) ; if ( queryParams != null && ! queryParams . isEmpty ( ) ) { for ( Map . Entry < String , String > entry : queryParams . entrySet ( ) ) { if ( entry . getKey ( ) != null && entry . getValue ( ) != null ) { LOG . debug ( "PARAM: {} = {}" , entry . getKey ( ) , entry . getValue ( ) ) ; webTarget = webTarget . queryParam ( entry . getKey ( ) , entry . getValue ( ) ) ; } } } } catch ( Exception e ) { LOG . error ( "Error" , e ) ; return null ; } return webTarget ; }
creates the web target .
