Package org.sonar.wsclient

Examples of org.sonar.wsclient.Sonar.find()


            sonar=Sonar.create(serverUrl);
        }else{
            sonar=Sonar.create(serverUrl, userCredentials.getUsername(), PassEncoder.decodeAsString(userCredentials.getPassword()));
        }
        ServerQuery serverQuery=new ServerQuery();
        return sonar.find(serverQuery).getVersion();
    }
   
    public double getRulesCompliance(UserCredentials userCredentials, String resource) {
        try{
            if(!existsProject(userCredentials, resource)) {
View Full Code Here


            }else{
                sonar=Sonar.create(serverUrl, userCredentials.getUsername(), PassEncoder.decodeAsString(userCredentials.getPassword()));
            }
            ResourceQuery query=new ResourceQuery(resource);
            query.setMetrics(VIOLATIONS_DENSITY_METRICS);
            Resource r = sonar.find(query);
            return r.getMeasure(VIOLATIONS_DENSITY_METRICS).getValue();
        } catch(ConnectionException ex) {
            if(isError401(ex)){
                throw new AuthorizationException(ex);
            }else{
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.