Request.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved.
  3. Available via Academic Free License >= 2.1 OR the modified BSD license.
  4. see: http://dojotoolkit.org/license for details
  5. */
  6. if(!dojo._hasResource["dojo.data.api.Request"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
  7. dojo._hasResource["dojo.data.api.Request"] = true;
  8. dojo.provide("dojo.data.api.Request");
  9. dojo.declare("dojo.data.api.Request", null, {
  10. // summary:
  11. // This class defines out the semantics of what a 'Request' object looks like
  12. // when returned from a fetch() method. In general, a request object is
  13. // nothing more than the original keywordArgs from fetch with an abort function
  14. // attached to it to allow users to abort a particular request if they so choose.
  15. // No other functions are required on a general Request object return. That does not
  16. // inhibit other store implementations from adding extentions to it, of course.
  17. //
  18. // This is an abstract API that data provider implementations conform to.
  19. // This file defines methods signatures and intentionally leaves all the
  20. // methods unimplemented.
  21. //
  22. // For more details on fetch, see dojo.data.api.Read.fetch().
  23. abort: function(){
  24. // summary:
  25. // This function is a hook point for stores to provide as a way for
  26. // a fetch to be halted mid-processing.
  27. // description:
  28. // This function is a hook point for stores to provide as a way for
  29. // a fetch to be halted mid-processing. For more details on the fetch() api,
  30. // please see dojo.data.api.Read.fetch().
  31. throw new Error('Unimplemented API: dojo.data.api.Request.abort');
  32. }
  33. });
  34. }