The only place where I do anything with the deleted flag is related
to removing group memberships. I dont believe this should affect the
entry's deleted flag, right?
for (GroupMembershipInfo group : entry.getGroupMembershipInfos())
{ if (group.getHref() == null)
continue;
group.setDeleted(true); }
On Mon, Dec 5, 2011 at 9:28 AM, Alexey Panteleev <[email protected]> wrote:
>
> I may be setting the delete flag for group memberships but not the person
> record itself.
> I will double check ...
> Thanks
>
>
> On 12/5/11 9:23 AM, "Alain Vongsouvanh" <[email protected]> wrote:
>
> Hello Alexey,
>
> Usually, you shouldn't be able to retrieve a single deleted contact as the
> API will return a 404 Not Found. The only way to retrieve a deleted contact
> is by retrieving the entire list of contact and using the showdeleted or
> updated-min query parameters.
>
> My guess is that this marker gets added somewhere in your code.
> One thing you could do though is to explicitly remove the deleted marker:
> entryToUpdate.setDeleted(null);
>
> Best,
> Alain
>
> On Fri, Dec 2, 2011 at 6:45 PM, Alexey Panteleev <[email protected]> wrote:
>
> Hi,
> I am getting the InvalidEntryException because I update a deleted entry.
> But I can't avoid this because hasDeleted method returns false for me.
> What am I doing wrong? What is the right way to check the 'deleted'
> attribute?
>
> ContactEntry entryToUpdate = myService.getEntry(new URL(contId),
> ContactEntry.class);
>
> if (entryToUpdate.hasDeleted())
>
> // dont update
>
>
> Caused by: com.google.gdata.util.InvalidEntryException: Bad Request
> Contact entries received from a client must not have deleted set to true
>
> at
> com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:594)
> at
> com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:563)
> at
> com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:552)
> at
> com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:530)
> at
> com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:535)
> at com.google.gdata.client.Service.update(Service.java:1563)
> at com.google.gdata.client.Service.update(Service.java:1530)
> at
> com.google.gdata.client.GoogleService.update(GoogleService.java:583)
>
--
Founder / Project Lead
Yoxel Systems
Skype ID: yoxel.com
Twitter: @yoxeldotcom
Telephone: +1 415 230 0189
--
You received this message because you are subscribed to the Google
Groups "Google Contacts, Shared Contacts and User Profiles APIs" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://code.google.com/apis/contacts/community/forum.html