Fetch properties from Sonarqube via Sonarqube wsClient -


i'd fetch sonar.timemachine.period1 via wsclient. seeing doesn't have one, decided bake 1 myself

private map<string, string> retrieveperiodproperties(final wsclient wsclient, int requestedperiod) {     if (requestedperiod > 0) {         final wsrequest propertieswsrequestperiod =                 new getrequest("api/properties/sonar.timemachine.period" + requestedperiod);         final wsresponse propertieswsresponseperiod =                 wsclient.wsconnector().call(propertieswsrequestperiod);         if (propertieswsresponseperiod.issuccessful()) {             string resp = propertieswsresponseperiod.content();             map<string, string> map = new hashmap<>();             map.put(integer.tostring(requestedperiod), resp);             return map;         }     }     return new hashmap<>(); } 

but return empty map<>

any lead can go direction?

you can use org.sonar.api.config.settings fetch properties defined in sonarqube.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -