Examples of IssuelinksType


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

public class IssueLinkJsonParserV5 implements JsonParser<IssueLink> {
  private final IssuelinksTypeJsonParserV5 issuelinksTypeJsonParserV5 = new IssuelinksTypeJsonParserV5();

  @Override
  public IssueLink parse(JSONObject json) throws JSONException {
    final IssuelinksType issuelinksType = issuelinksTypeJsonParserV5.parse(json.getJSONObject("type"));
    final IssueLinkType.Direction direction;
    final JSONObject link;
    if (json.has("inwardIssue")) {
      link = json.getJSONObject("inwardIssue");
      direction = IssueLinkType.Direction.INBOUND;
    } else {
      link = json.getJSONObject("outwardIssue");
      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
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.