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

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


    } else if ("INBOUND".equals(dirStr)) {
      direction = IssueLinkType.Direction.INBOUND;
    } else {
      throw new JSONException("Invalid value of " + KEY_DIRECTION + " key: [" + dirStr + "]");
    }
    return new IssueLinkType(name, description, direction);
  }
View Full Code Here


  @Override
  public IssueLink parse(JSONObject json) throws JSONException {
    final String key = json.getString("issueKey");
        final URI targetIssueUri = JsonParseUtil.parseURI(json.getString("issue"));
    final IssueLinkType issueLinkType = issueLinkTypeJsonParser.parse(json.getJSONObject("type"));
    return new IssueLink(key, targetIssueUri, issueLinkType);
  }
View Full Code Here

      direction = IssueLinkType.Direction.OUTBOUND;
    }

        final String key = link.getString("key");
        final URI targetIssueUri = JsonParseUtil.parseURI(link.getString("self"));
    final IssueLinkType issueLinkType = new IssueLinkType(issuelinksType.getName(),
        direction.equals(IssueLinkType.Direction.INBOUND) ? issuelinksType.getInward() : issuelinksType.getOutward(), direction);
    return new IssueLink(key, targetIssueUri, issueLinkType);
  }
View Full Code Here

    assertEquals(TestConstants.USER1, issue.getAssignee());

    // issue links
    Assert.assertThat(issue.getIssueLinks(), containsInAnyOrder(
        new IssueLink("TST-1", toUri("http://localhost:8090/jira/rest/api/latest/issue/TST-1"),
            new IssueLinkType("Duplicate", "duplicates", IssueLinkType.Direction.OUTBOUND)),
        new IssueLink("TST-1", toUri("http://localhost:8090/jira/rest/api/latest/issue/TST-1"),
            new IssueLinkType("Duplicate", "is duplicated by", IssueLinkType.Direction.INBOUND))
    ));


    // watchers
    final BasicWatchers watchers = issue.getWatchers();
View Full Code Here

public class IssueLinkJsonParserTest {
    @Test
    public void testParseIssueLink() throws Exception {
        IssueLinkJsonParser parser = new IssueLinkJsonParser();
        final IssueLink issueLink = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/issueLink/valid.json"));
        assertEquals(new IssueLinkType("Duplicate", "duplicates", IssueLinkType.Direction.OUTBOUND), issueLink.getIssueLinkType());
        assertEquals("TST-2", issueLink.getTargetIssueKey());
        assertEquals(TestUtil.toUri("http://localhost:8090/jira/rest/api/latest/issue/TST-2"), issueLink.getTargetIssueUri());
    }
View Full Code Here

    } else if ("INBOUND".equals(dirStr)) {
      direction = IssueLinkType.Direction.INBOUND;
    } else {
      throw new JSONException("Invalid value of " + KEY_DIRECTION + " key: [" + dirStr + "]");
    }
    return new IssueLinkType(name, description, direction);
  }
View Full Code Here

    assertEquals(TestConstants.USER1, issue.getAssignee());

    // issue links
    Assert.assertThat(issue.getIssueLinks(), containsInAnyOrder(
        new IssueLink("TST-1", toUri("http://localhost:8090/jira/rest/api/latest/issue/TST-1"),
            new IssueLinkType("Duplicate", "duplicates", IssueLinkType.Direction.OUTBOUND)),
        new IssueLink("TST-1", toUri("http://localhost:8090/jira/rest/api/latest/issue/TST-1"),
            new IssueLinkType("Duplicate", "is duplicated by", IssueLinkType.Direction.INBOUND))
    ));


    // watchers
    final BasicWatchers watchers = issue.getWatchers();
View Full Code Here

  @Override
  public IssueLink parse(JSONObject json) throws JSONException {
    final String key = json.getString("issueKey");
        final URI targetIssueUri = JsonParseUtil.parseURI(json.getString("issue"));
    final IssueLinkType issueLinkType = issueLinkTypeJsonParser.parse(json.getJSONObject("type"));
    return new IssueLink(key, targetIssueUri, issueLinkType);
  }
View Full Code Here

      direction = IssueLinkType.Direction.OUTBOUND;
    }

        final String key = link.getString("key");
        final URI targetIssueUri = JsonParseUtil.parseURI(link.getString("self"));
    final IssueLinkType issueLinkType = new IssueLinkType(issuelinksType.getName(),
        direction.equals(IssueLinkType.Direction.INBOUND) ? issuelinksType.getInward() : issuelinksType.getOutward(), direction);
    return new IssueLink(key, targetIssueUri, issueLinkType);
  }
View Full Code Here

TOP

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

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.