* @param parameters parameters storing updated contact values.
*/
public void updateEntry(ContactsExampleParameters parameters)
throws IOException, ServiceException {
if (parameters.isGroupFeed()) {
ContactGroupEntry group = buildGroup(parameters);
// get the group then update it
ContactGroupEntry canonicalGroup = getGroupInternal(parameters.getId());
canonicalGroup.setTitle(group.getTitle());
canonicalGroup.setContent(group.getContent());
// update fields
List<ExtendedProperty> extendedProperties =
canonicalGroup.getExtendedProperties();
extendedProperties.clear();
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);