Package com.google.gdata.data.projecthosting

Examples of com.google.gdata.data.projecthosting.IssueCommentsFeed


      Wavelet wavelet = robot.fetchWavelet(new WaveId(domain, waveId), new WaveletId(domain,
          waveletId), projectName, robot.getRpcServerUrl());
      LOG.info("fetched wavelet id: " + wavelet.getWaveId().getId());
     
     
      IssueCommentsFeed issueCommentsFeed = projectHostingHelper.getComments(issueJdoEntry
          .getProjectName(), issueJdoEntry.getIssueId(), issueJdoEntry.getLocalCommentsCount() + 1);

      if (issueCommentsFeed.getTotalResults() != issueJdoEntry.getLocalCommentsCount()) {
        // Update local comments count.
        issueJdoEntry.setLocalCommentsCount(issueCommentsFeed.getTotalResults());

        util.persistJdo(issueJdoEntry);

        List<IssueCommentsEntry> comments = issueCommentsFeed.getEntries();
        for (IssueCommentsEntry entry : comments) {
          int commentId = projectHostingHelper.getCommentEntryId(entry.getId(), issueJdoEntry
              .getProjectName(), issueJdoEntry.getIssueId() + "");
          TextContent textContent = (TextContent) entry.getContent();
          String content = null;
View Full Code Here


    URL postUrl = new URL("http://code.google.com/feeds/issues/p/" + project + "/issues/full");
    return service.insert(postUrl, entry);
  }

  public IssueCommentsFeed getComments(String project, int issueId, int startIndex) {
    IssueCommentsFeed resultFeed = null;
    try {
      URL feedUrl = new URL("http://code.google.com/feeds/issues/p/" + project + "/issues/"
          + issueId + "/comments/full");
      ;
      Query query = new Query(feedUrl);
View Full Code Here

   */
  protected void printIssueAndComments(IssuesEntry entry)
      throws IOException, ServiceException {
    printIssue(entry);
    String issueId = getIssueId(entry.getId());
    IssueCommentsFeed commentsFeed = getCommentsFeed(issueId);
    printComments(commentsFeed);
  }
View Full Code Here

  /**
   * Declare the extensions of the feeds for the Project Hosting Issue Tracker
   * Data API.
   */
  private void declareExtensions() {
    new IssueCommentsFeed().declareExtensions(extProfile);
    new IssuesFeed().declareExtensions(extProfile);
  }
View Full Code Here

            TaskAttribute url = getAttribute(data, GoogleCodeAttribute.URL);
            url.setValue(this.connector.getTaskUrl(repository.getUrl(), issueId));
        }

        IGoogleCodeClient client = getClient(repository);
        IssueCommentsFeed comments = client.getAllComments(issueId, monitor);
        if (!data.isNew()) {
            addComments(issueId, data, comments, monitor);
        }

        // Set the completion date, this allows Mylyn mark the issue as
        // completed
        // There is no API for this so we make an educated guess
        State state = issueEntry.getState();
        if (!data.isNew() && Value.CLOSED == state.getValue()) {
            // find the last comment that set the issue status to the current
            // value
            // it would be better to find the last comment to set that state to
            // closed
            // but as long as we can't do that this will have to do

            // initialize with issue creation date in case we don't find any
            // comments
            DateTime closingDate = issueEntry.getPublished();
            for (IssueCommentsEntry comment : comments.getEntries()) {
                Updates updates = comment.getUpdates();
                if (updates != null && issueEntry.getStatus().equals(updates.getStatus())) {
                    closingDate = comment.getPublished();
                }
            }
View Full Code Here

TOP

Related Classes of com.google.gdata.data.projecthosting.IssueCommentsFeed

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.