Request.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. define("dojo/data/api/Request", ["../.."], function(dojo) {
  2. // module:
  3. // dojo/data/api/Request
  4. // summary:
  5. // TODOC
  6. dojo.declare("dojo.data.api.Request", null, {
  7. // summary:
  8. // This class defines out the semantics of what a 'Request' object looks like
  9. // when returned from a fetch() method. In general, a request object is
  10. // nothing more than the original keywordArgs from fetch with an abort function
  11. // attached to it to allow users to abort a particular request if they so choose.
  12. // No other functions are required on a general Request object return. That does not
  13. // inhibit other store implementations from adding extentions to it, of course.
  14. //
  15. // This is an abstract API that data provider implementations conform to.
  16. // This file defines methods signatures and intentionally leaves all the
  17. // methods unimplemented.
  18. //
  19. // For more details on fetch, see dojo.data.api.Read.fetch().
  20. abort: function(){
  21. // summary:
  22. // This function is a hook point for stores to provide as a way for
  23. // a fetch to be halted mid-processing.
  24. // description:
  25. // This function is a hook point for stores to provide as a way for
  26. // a fetch to be halted mid-processing. For more details on the fetch() api,
  27. // please see dojo.data.api.Read.fetch().
  28. throw new Error('Unimplemented API: dojo.data.api.Request.abort');
  29. }
  30. });
  31. return dojo.data.api.Request;
  32. });