Package com.google.gdata.data

Examples of com.google.gdata.data.Person


    }
   
    if (entry.getAuthors() != null) {
      List authorList = new LinkedList();
      for (Iterator ai = entry.getAuthors().iterator(); ai.hasNext(); ) {
        Person person = (Person) ai.next();
        authorList.add(Value.getStringValue(person.getName()) );
        if (person.getEmail() != null) {
          authorList.add(Value.getStringValue( person.getEmail()) );
        }
      }
      map.put(PROPNAME_AUTHOR, new SimpleProperty(authorList));
    }
View Full Code Here


    entry.setContent(new HtmlTextConstruct(content));
    entry.setStatus(new Status("New"));
    Owner owner = new Owner();
    owner.setUsername(new Username(user));

    Person author = new Person();
    author.setName(user);
    entry.getAuthors().add(author);

    while (labels.hasNext()) {
      String label = labels.next();
      if (!label.trim().equals("")) {
View Full Code Here

  public IssueCommentsEntry createComment(String project, int issueId, String name, String content) {
    IssueCommentsEntry entry = new IssueCommentsEntry();
    entry.setContent(new HtmlTextConstruct(content));

    Person author = new Person();
    author.setName(name);
    entry.getAuthors().add(author);

    URL postUrl;
    try {
      postUrl = new URL("http://code.google.com/feeds/issues/p/" + project + "/issues/" + issueId
View Full Code Here

    if (entry.getTitle() != null) {
      System.out.println("\tSummary\n\t\t" + entry.getTitle().getPlainText());
    }

    Person author = entry.getAuthors().get(0);
    printPerson("Reporter", author.getName(), author.getUri());

    TextContent textContent = (TextContent) entry.getContent();
    if ((textContent != null) && (textContent.getContent() != null)) {
      HtmlTextConstruct textConstruct =
          (HtmlTextConstruct) textContent.getContent();
View Full Code Here

      System.out.printf("Comment #%s:\t%s\n", commentId, entry.getId());
    } else {
      System.out.println("Comment");
    }

    Person author = entry.getAuthors().get(0);
    printPerson("Author", author.getName(), author.getUri());

    TextContent textContent = (TextContent) entry.getContent();
    if ((textContent != null) && (textContent.getContent() != null)) {
      HtmlTextConstruct textConstruct =
          (HtmlTextConstruct) textContent.getContent();
View Full Code Here

  /**
   * Creates a new issue that can be inserted to the issues feed.
   */
  protected IssuesEntry makeNewIssue() {
    Person author = new Person();
    author.setName(username);

    Owner owner = new Owner();
    owner.setUsername(new Username(username));

    Cc cc = new Cc();
View Full Code Here

  /**
   * Creates a comment that updates an existing issue.
   */
  protected IssueCommentsEntry makeUpdatingComment() {
    Person author = new Person();
    author.setName(username);

    // Create issue updates
    Updates updates = new Updates();
    updates.setSummary(new Summary("New issue summary"));
    updates.setStatus(new Status("Accepted"));
View Full Code Here

  /**
   * Creates a comment without any updates.
   */
  protected IssueCommentsEntry makePlainComment() {
    Person author = new Person();
    author.setName(username);

    // Create issue comment entry
    IssueCommentsEntry entry = new IssueCommentsEntry();
    entry.getAuthors().add(author);
    entry.setContent(new HtmlTextConstruct("Some comment"));
View Full Code Here

  /**
   * Creates a comment that closes an issue by setting Status to "Fixed".
   */
  protected IssueCommentsEntry makeClosingComment() {
    Person author = new Person();
    author.setName(username);

    // Set the Status as Fixed
    Updates updates = new Updates();
    updates.setStatus(new Status("Fixed"));

View Full Code Here

      throws ServiceException, IOException {
    // Create the entry to insert
    Entry myEntry = new Entry();
    myEntry.setTitle(new PlainTextConstruct(title));
    myEntry.setContent(new PlainTextConstruct(content));
    Person author = new Person(authorName, null, userName);
    myEntry.getAuthors().add(author);
    myEntry.setDraft(isDraft);

    // Ask the service to insert the new entry
    URL postUrl = new URL(feedUri + POSTS_FEED_URI_SUFFIX);
View Full Code Here

TOP

Related Classes of com.google.gdata.data.Person

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.