Package com.atlassian.jira.rest.client.domain

Examples of com.atlassian.jira.rest.client.domain.BasicIssue


        return null;
    }

    public BasicIssue addIssue() {
        String key = KEY_BASE + basicIssueId.get();
        BasicIssue basicIssue = new BasicIssue(null, key, basicIssueId.getAndIncrement());
        issues.add(basicIssue);
        return basicIssue;
    }
View Full Code Here


        return comments.get(issueId);
    }


    public BasicIssue getBasicIssue(String key) {
        BasicIssue emptyResponse = new BasicIssue(null, "", (long) -1);
        for (BasicIssue bi : issues) {
            if (bi.getKey().equals(key)) {
                return bi;
            }
        }
View Full Code Here

        Collection<Subtask> subtasks = null;
        Collection<ChangelogGroup> changelog = null;
        Set<String> labels = null;
        JSONObject rawObject = null;

        BasicIssue basicIssue = mockSearchRestClient.getBasicIssue(issueKey);
        Collection<Comment> comments = mockSearchRestClient.getCommentsForIssue(basicIssue.getId());
        Issue issue = new Issue(summary, self, basicIssue.getKey(), basicIssue.getId(), project, issueType, status,
                description, priority, resolution, attachments, reporter, assignee, creationDate, updateDate,
                dueDate, affectedVersions, fixVersions, components, timeTracking, fields, comments,
                transitionsUri, issueLinks,
                votes, worklogs, watchers, expandos, subtasks, changelog, labels, rawObject);
        return issue;
View Full Code Here

    public void singleIssueTest() throws Exception {
        MockEndpoint mockResultEndpoint = getMockEndpoint("mock:result");

        MockJiraRestClient client = (MockJiraRestClient) factory.getClient();
        MockSearchRestClient restClient = (MockSearchRestClient) client.getSearchClient();
        BasicIssue issue1 = restClient.addIssue();

        mockResultEndpoint.expectedBodiesReceived(issue1);
       
        mockResultEndpoint.assertIsSatisfied();
    }
View Full Code Here

    public void multipleIssuesTest() throws Exception {
        MockEndpoint mockResultEndpoint = getMockEndpoint("mock:result");

        MockJiraRestClient client = (MockJiraRestClient) factory.getClient();
        MockSearchRestClient restClient = (MockSearchRestClient) client.getSearchClient();
        BasicIssue issue1 = restClient.addIssue();
        BasicIssue issue2 = restClient.addIssue();
        BasicIssue issue3 = restClient.addIssue();

        mockResultEndpoint.expectedBodiesReceived(issue3, issue2, issue1);

        mockResultEndpoint.assertIsSatisfied();
    }
View Full Code Here

     */
    public class NewIssueProcessor implements Processor {
        @Override
        public void process(Exchange exchange) throws Exception {
            Message in = exchange.getIn();
            BasicIssue issue = in.getBody(BasicIssue.class);
            LOG.debug("Got issue with id " + issue.getId() + " key " + issue.getKey());
        }
View Full Code Here

    public void singleIssueTest() throws Exception {
        MockEndpoint mockResultEndpoint = getMockEndpoint("mock:result");

        MockJiraRestClient jiraRestClient = (MockJiraRestClient) factory.getClient();
        MockSearchRestClient searchRestClient = (MockSearchRestClient) jiraRestClient.getSearchClient();
        BasicIssue issue1 = searchRestClient.addIssue();
        String commentText = "Comment added at " + new Date();
        Comment comment1 = searchRestClient.addCommentToIssue(issue1, commentText);

        mockResultEndpoint.expectedBodiesReceived(comment1);
       
View Full Code Here

    public void multiIssueTest() throws Exception {
        MockEndpoint mockResultEndpoint = getMockEndpoint("mock:result");

        MockJiraRestClient jiraRestClient = (MockJiraRestClient) factory.getClient();
        MockSearchRestClient searchRestClient = (MockSearchRestClient) jiraRestClient.getSearchClient();
        BasicIssue issue1 = searchRestClient.addIssue();
        Comment comment1 = searchRestClient.addCommentToIssue(issue1, "Comment added at " + new Date());
        BasicIssue issue2 = searchRestClient.addIssue();
        Comment comment2 = searchRestClient.addCommentToIssue(issue2, "Comment added at " + new Date());

        mockResultEndpoint.expectedBodiesReceivedInAnyOrder(comment1, comment2);

        mockResultEndpoint.assertIsSatisfied();
View Full Code Here

        Long issueTypeId = exchange.getIn().getHeader("IssueTypeId", Long.class);
        String issueSummary = exchange.getIn().getHeader("IssueSummary", String.class);
        IssueInputBuilder issueBuilder = new IssueInputBuilder(projectKey, issueTypeId);
        issueBuilder.setDescription(exchange.getIn().getBody(String.class));
        issueBuilder.setSummary(issueSummary);
        BasicIssue issue = client().getIssueClient().createIssue(issueBuilder.build(), null);
       
        // support InOut
        if (exchange.getPattern().isOutCapable()) {
            // copy the header of in message to the out message
            exchange.getOut().copyFrom(exchange.getIn());
View Full Code Here

    @Override
    protected int poll() throws Exception {
        Stack<BasicIssue> newIssues = new Stack<BasicIssue>();
        getNewIssues(0, newIssues);
        while (!newIssues.empty()) {
            BasicIssue newIssue = newIssues.pop();
            Exchange e = getEndpoint().createExchange();
            e.getIn().setBody(newIssue);
            getProcessor().process(e);
        }
        return newIssues.size();
View Full Code Here

TOP

Related Classes of com.atlassian.jira.rest.client.domain.BasicIssue

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.