Example usage for com.google.gwt.gdata.client GDataRequestParameters newInstance

List of usage examples for com.google.gwt.gdata.client GDataRequestParameters newInstance

Introduction

In this page you can find the example usage for com.google.gwt.gdata.client GDataRequestParameters newInstance.

Prototype

public static GDataRequestParameters newInstance() 

Source Link

Usage

From source file:com.google.gwt.gdata.sample.hellogdata.client.CalendarDeleteEventDemo.java

License:Apache License

/**
 * Delete an event entry using the Calendar service and
 * the event entry uri.//w w  w.jav  a2  s .  c  o m
 * On success and failure, display a status message.
 * 
 * @param eventEntryUri The uri of the event entry to delete
 * @param etag The etag of the entry to delete
 */
private void deleteEvent(String eventEntryUri, String etag) {
    showStatus("Deleting event...", false);
    GDataRequestParameters pars = GDataRequestParameters.newInstance();
    pars.setEtag(etag);
    service.deleteEntry(eventEntryUri, new CalendarEventEntryCallback() {
        public void onFailure(CallErrorException caught) {
            showStatus("An error occurred while deleting a Calendar event: " + caught.getMessage(), true);
        }

        public void onSuccess(CalendarEventEntry result) {
            showStatus("Deleted a Calendar event.", false);
        }
    }, pars);
}

From source file:com.google.gwt.gdata.sample.hellogdata.client.ContactsDeleteContactDemo.java

License:Apache License

/**
 * Delete a contact entry using the Contact service and
 * the contact entry uri.//from w  ww .j a va 2s.co m
 * On success and failure, display a status message.
 * 
 * @param contactEntryUri The uri of the contact entry to delete
 * @param etag The etag of the entry to be deleted
 */
private void deleteContact(String contactEntryUri, String etag) {
    showStatus("Deleting a contact...", false);
    GDataRequestParameters pars = GDataRequestParameters.newInstance();
    pars.setEtag(etag);
    service.deleteEntry(contactEntryUri, new ContactEntryCallback() {
        public void onFailure(CallErrorException caught) {
            showStatus("An error occurred while deleting a contact: " + caught.getMessage(), true);
        }

        public void onSuccess(ContactEntry result) {
            showStatus("Deleted a contact.", false);
        }
    }, pars);
}

From source file:com.google.gwt.gdata.sample.hellogdata.client.ContactsDeleteContactGroupDemo.java

License:Apache License

/**
 * Delete a contact group entry using the Contacts service and
 * the contact group entry uri./*  www.  ja  va2  s.c om*/
 * On success and failure, display a status message.
 * 
 * @param contactGroupEntryUri The uri of the contact group entry to delete
 * @param etag The etag of the entry to delete
 */
private void deleteContactGroup(String contactGroupEntryUri, String etag) {
    showStatus("Deleting a contact group...", false);
    GDataRequestParameters pars = GDataRequestParameters.newInstance();
    pars.setEtag(etag);
    service.deleteEntry(contactGroupEntryUri, new ContactGroupEntryCallback() {
        public void onFailure(CallErrorException caught) {
            showStatus("An error occurred while deleting a contact group: " + caught.getMessage(), true);
        }

        public void onSuccess(ContactGroupEntry result) {
            showStatus("Deleted a contact group.", false);
        }
    }, pars);
}