OpenLayers OpenLayers

Ticket #1677 (closed feature: fixed)

Opened 4 months ago

Last modified 3 months ago

bring changes to protocol base class

Reported by: elemoine Assigned to:
Priority: major Milestone: 2.7 Release
Component: Protocol Version: SVN
Keywords: Cc:
State: Complete

Description

This ticket is a proposal for bringing a few changes to the protocol base class.

  • make the read, create, update and delete methods return an OpenLayers.Protocol.Response object, this is useful for two things:
    • for synchronous protocols like Gears and HTML5
    • for asynchronous (XHR-based) protocols when the caller needs some data before the response is actually received from the server, e.g. access the request object to abort the XHR request
  • make commit return an array of OpenLayers.Protocol.Response objects, for example XHR-based protocols will return one OpenLayers.Protocol.Response object per XHR request, so that caller can abort anyone of them
  • introduce new properties to OpenLayers.Protocol.Response
    • last to indicate whether the response is the last in a commit, this property is true by default and must be set appropriately by the commit method of protocols
    • requestType to indicate if the response corresponds to a "create", "read", "update", or "delete" request, this is useful to commit users to know what kind of response was received
  • include the bits of patch-1646-r7729-A0.diff in #1646

Patch to come.

Attachments

patch-1677-r7754-A0.diff (4.6 kB) - added by elemoine on 08/27/08 05:17:04.

Change History

08/14/08 09:41:54 changed by elemoine

  • priority changed from minor to major.
  • state set to Review.
  • version changed from 2.6 to SVN.
  • milestone set to 2.7 Release.

08/25/08 03:17:49 changed by fredj

  • owner set to fredj.
  • component changed from general to Protocol.

08/25/08 03:17:58 changed by fredj

  • owner deleted.

08/27/08 05:17:04 changed by elemoine

  • attachment patch-1677-r7754-A0.diff added.

08/28/08 09:15:47 changed by fredj

  • state changed from Review to Commit.

Since nobody (?) use a real protocol yet you can safely commit this without breaking existent code

08/28/08 09:33:11 changed by elemoine

  • status changed from new to closed.
  • state changed from Commit to Complete.
  • resolution set to fixed.

(In [7883]) bring changes to protocol base class, r=fredj (closes #1677)