Package com.google.gdata.data.contacts

Examples of com.google.gdata.data.contacts.ContactEntry


                if(gQuery.isCancelled())
                {
                    return ret;
                }

                ContactEntry entry = contactFeed.getEntries().get(i);

                if(filter(entry, gQuery.getQueryPattern()))
                {
                    GoogleContactsEntry gcEntry = null;
View Full Code Here


                if(gQuery.isCancelled())
                {
                    return ret;
                }

                ContactEntry entry = contactFeed.getEntries().get(i);

                if(filter(entry, gQuery.getQueryPattern()))
                {
                    GoogleContactsEntry gcEntry = null;
View Full Code Here

                if(gQuery.isCancelled())
                {
                    return ret;
                }

                ContactEntry entry = contactFeed.getEntries().get(i);

                if(filter(entry, gQuery.getQueryPattern()))
                {
                    GoogleContactsEntry gcEntry = null;
View Full Code Here

        return;
      }
      group.delete();
    } else {
      // get the contact then delete them
      ContactEntry contact = getContactInternal(parameters.getId());
      if (contact == null) {
        System.err.println("No contact found with id: " + parameters.getId());
        return;
      }
      contact.delete();
    }
  }
View Full Code Here

      if (group.hasExtendedProperties()) {
        extendedProperties.addAll(group.getExtendedProperties());
      }
      printGroup(canonicalGroup.update());
    } else {
      ContactEntry contact = buildContact(parameters);
      // get the contact then update it
      ContactEntry canonicalContact = getContactInternal(parameters.getId());
      ElementHelper.updateContact(canonicalContact, contact);
      printContact(canonicalContact.update());
    }
  }
View Full Code Here

      ContactGroupEntry addedGroup =
          service.insert(feedUrl, buildGroup(parameters));
      printGroup(addedGroup);
      lastAddedId = addedGroup.getId();
    } else {
      ContactEntry addedContact =
          service.insert(feedUrl, buildContact(parameters));
      printContact(addedContact);
      // Store id of the added contact so that scripts can use it in next steps
      lastAddedId = addedContact.getId();
    }
  }
View Full Code Here

   * @param parameters parameters
   * @return A contact.
   */
  private static ContactEntry buildContact(
      ContactsExampleParameters parameters) {
    ContactEntry contact = new ContactEntry();
    ElementHelper.buildContact(contact, parameters.getElementDesc());
    return contact;
  }
View Full Code Here

      status.setIndexed(false);
      while (index < this.profiles.size()) {
        ContactFeed requestFeed = new ContactFeed();

        for (int i = 0; i < this.batchSize && index < this.profiles.size(); ++i, ++index) {
          ContactEntry entry = this.profiles.get(index);

          entry.setStatus(status);
          BatchUtils.setBatchOperationType(entry, BatchOperationType.UPDATE);
          requestFeed.getEntries().add(entry);
        }

        ContactFeed responseFeed =
View Full Code Here

          }
       
        info(resultFeed.getTitle().getPlainText());

        for (int i = 0; i < resultFeed.getEntries().size(); i++) {
          ContactEntry entry = resultFeed.getEntries().get(i);
          info("\t" + entry.getTitle().getPlainText());

          info("Email addresses:");
          for (Email email : entry.getEmailAddresses()) {
            info(" " + email.getAddress());
            if (email.getRel() != null) {
              info(" rel:" + email.getRel());
            }
            if (email.getLabel() != null) {
              info(" label:" + email.getLabel());
            }
          }

          info("IM addresses:");
          for (Im im : entry.getImAddresses()) {
            info(" " + im.getAddress());
            if (im.getLabel() != null) {
              info(" label:" + im.getLabel());
            }
            if (im.getLabel() != null) {
              info(" rel:" + im.getLabel());
            }
            if (im.getProtocol() != null) {
              System.out.print(" protocol:" + im.getProtocol());
            }
          }

          info("Groups:");
          for (GroupMembershipInfo group : entry
              .getGroupMembershipInfos()) {
            String groupHref = group.getHref();
            info("  Id: " + groupHref);
          }

          info("Extended Properties:");
          for (ExtendedProperty property : entry
              .getExtendedProperties()) {
            if (property.getValue() != null) {
              info("  " + property.getName() + "(value) = "
                  + property.getValue());
            } else if (property.getXmlBlob() != null) {
              info("  " + property.getName() + "(xmlBlob)= "
                  + property.getXmlBlob().getBlob());
            }
          }

          String photoLink = entry.getContactPhotoLink().getHref();
          info("Photo Link: " + photoLink);

          // if (photoLink.getEtag() != null) {
          // System.out.println("Contact Photo's ETag: "
          // + photoLink.getEtag());
View Full Code Here

TOP

Related Classes of com.google.gdata.data.contacts.ContactEntry

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.