Package org.sonar.wsclient

Examples of org.sonar.wsclient.SonarClient


        return getIssues(auth, query);
    }
   
    private List<RadarIssue> getIssues(UserCredentials userCredentials, IssueQuery query) {
        try{
            SonarClient client;
            if(userCredentials == null) {
                client = SonarClient.create(serverUrl);
            }else{
                client=SonarClient.builder().url(serverUrl).login(userCredentials.getUsername()).password(PassEncoder.decodeAsString(userCredentials.getPassword())).build();
            }
            IssueClient issueClient = client.issueClient();
            List<RadarIssue> issues=new LinkedList<>();
            Map<String, Rule> rulesCache=new HashMap<>();
            Issues result;
            int pageIndex=1;
            do{
View Full Code Here


        }
    }
   
    public List<ActionPlan> getActionPlans(UserCredentials userCredentials, String resource){
        try{
            SonarClient client;
            if(userCredentials == null) {
                client = SonarClient.create(serverUrl);
            }else{
                client=SonarClient.builder().url(serverUrl).login(userCredentials.getUsername()).password(PassEncoder.decodeAsString(userCredentials.getPassword())).build();
            }
            return client.actionPlanClient().find(resource);
        }catch(HttpException ex) {
            if(ex.status() == UNAUTHORIZED_RESPONSE_STATUS){
                throw new AuthorizationException(ex);
            }else{
                throw ex;
View Full Code Here

TOP

Related Classes of org.sonar.wsclient.SonarClient

Copyright © 2018 www.massapicom. 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.