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

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


    @Override
    public BasicProject parse(JSONObject json) throws JSONException {
        final URI selfUri = JsonParseUtil.getSelfUri(json);
        final String key = json.getString("key");
        final String name = JsonParseUtil.getOptionalString(json, "name");
        return new BasicProject(selfUri, key, name);
    }
View Full Code Here


      return;
    }

    final Iterable<BasicProject> projects = client.getProjectClient().getAllProjects(pm);
    assertEquals(4, Iterables.size(projects));
    final BasicProject tst = Iterables.find(projects, new Predicate<BasicProject>() {
      @Override
      public boolean apply(@Nullable BasicProject input) {
        return input.getKey().equals("TST");
      }
    });
    assertTrue(tst.getSelf().toString().contains(jiraRestRootUri.toString()));

    setAnonymousMode();
    final Iterable<BasicProject> anonymouslyAccessibleProjects = client.getProjectClient().getAllProjects(pm);
    assertEquals(2, Iterables.size(anonymouslyAccessibleProjects));
View Full Code Here

    final BasicPriority priority = getOptionalField(shouldUseNestedValueAttribute, s, PRIORITY_FIELD.id, priorityJsonParser);
    final BasicResolution resolution = getOptionalField(shouldUseNestedValueAttribute, s, RESOLUTION_FIELD.id, resolutionJsonParser);
    final BasicUser assignee = getOptionalField(shouldUseNestedValueAttribute, s, ASSIGNEE_FIELD.id, userJsonParser);
    final BasicUser reporter = getOptionalField(shouldUseNestedValueAttribute, s, REPORTER_FIELD.id, userJsonParser);

    final BasicProject project = projectJsonParser.parse(getFieldUnisex(s, PROJECT_FIELD.id));
    final Collection<IssueLink> issueLinks;
    if (isJira5x0OrNewer) {
      issueLinks = parseOptionalArray(shouldUseNestedValueAttribute, s,
          new JsonWeakParserForJsonObject<IssueLink>(issueLinkJsonParserV5), FIELDS, LINKS_FIELD.id);
    } else {
View Full Code Here

TOP

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

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.