Package com.atlassian.jira.rest.client

Examples of com.atlassian.jira.rest.client.JiraRestClientFactory


        return getRestClient().getIssueClient().getIssue(bugIdentifier);
    }
   
   
    private JiraRestClient setupJiraClient(String url) throws URISyntaxException {
        JiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
        final JiraRestClient restClient = factory.createWithBasicHttpAuthentication(new URI(url), "rhq-bot", "123456");
        return restClient;
    }
View Full Code Here


  public static Status ignore(final JiraIgnore annotation) {
    if (annotation == null) {
      return Status.NOT_TRACKING;
    }
    try {
      JiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
      JiraRestClient restClient = factory
          .createWithBasicHttpAuthentication(new URI(annotation.server()), getUserName(), getPassword());
      try {
        Issue issue = restClient.getIssueClient().getIssue(annotation.issue()).get();
        if (!issue.getStatus().getName().equalsIgnoreCase("CLOSED")) {
          return Status.OPEN;
View Full Code Here

        intro.append("**********************************************************************************************\r\n");
        System.out.println(intro.toString());

        // Construct the JRJC client
        System.out.println(String.format("Logging in to %s with username '%s' and password '%s'", JIRA_URL, JIRA_ADMIN_USERNAME, JIRA_ADMIN_PASSWORD));
        JiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
        URI uri = new URI(JIRA_URL);
        JiraRestClient client = factory.createWithBasicHttpAuthentication(uri, JIRA_ADMIN_USERNAME, JIRA_ADMIN_PASSWORD);

        // Invoke the JRJC Client
        Promise<User> promise = client.getUserClient().getUser("admin");
        User user = promise.claim();

View Full Code Here

        // the Atlassian Plugin SDK. If this is not the case in your JIRA instance, you will need to change these values.
        final String jiraUser = "admin";
        final String jiraPassword = "admin";

        // Setup the JRJC
        JiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
        URI jiraServerUri;
        try
        {
            jiraServerUri = new URI(jiraBaseURL);
        }
        catch (URISyntaxException e)
        {
            throw new ServletException("Could not understand the JIRA Base URL: " + e.getMessage(), e);
        }

        JiraRestClient client = factory.createWithBasicHttpAuthentication(jiraServerUri, jiraUser, jiraPassword);
        String userToRetrieve = userManager.getRemoteUsername();
        if (StringUtils.isBlank(userToRetrieve))
            userToRetrieve = jiraUser;

        Promise<User> promise = client.getUserClient().getUser(userToRetrieve);
View Full Code Here

TOP

Related Classes of com.atlassian.jira.rest.client.JiraRestClientFactory

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.