a:11:{s:9:"#provides";s:25:"dojox.data.PersevereStore";s:9:"#resource";s:22:"data/PersevereStore.js";s:9:"#requires";a:4:{i:0;a:2:{i:0;s:6:"common";i:1;s:29:"dojox.data.JsonQueryRestStore";}i:1;a:2:{i:0;s:6:"common";i:1;s:16:"dojox.rpc.Client";}i:2;a:2:{i:0;s:6:"common";i:1;s:24:"dojox.io.xhrScriptPlugin";}i:3;a:2:{i:0;s:6:"common";i:1;s:19:"dojox.io.xhrPlugins";}}s:25:"dojox.data.PersevereStore";a:4:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:29:"dojox.data.JsonQueryRestStore";}s:4:"call";a:1:{i:0;s:29:"dojox.data.JsonQueryRestStore";}}s:9:"classlike";b:1;s:7:"summary";s:0:"";}s:44:"dojox.data.PersevereStore.useFullIdInQueries";a:2:{s:9:"prototype";s:25:"dojox.data.PersevereStore";s:7:"summary";s:0:"";}s:45:"dojox.data.PersevereStore.jsonQueryPagination";a:2:{s:9:"prototype";s:25:"dojox.data.PersevereStore";s:7:"summary";s:0:"";}s:35:"dojox.data.PersevereStore.getStores";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"path";a:3:{s:8:"optional";b:1;s:4:"type";s:6:"String";s:7:"summary";s:125:"URL of the Persevere server's root, this normally just "/" which is the default value if the target is not provided";}s:4:"sync";a:3:{s:8:"optional";b:1;s:4:"type";s:7:"Boolean";s:7:"summary";s:320:"Indicates that the operation should happen synchronously. return: A map/object of datastores will be returned if it is performed asynchronously, otherwise it will return a Deferred object that will provide the map/object. The name of each property is a the name of a store, and the value is the actual data store object.";}}s:6:"source";s:2729:" path = (path && (path.match(/\/$/) ? path : (path + '/'))) || '/'; if(path.match(/^\w*:\/\//)){ // if it is cross-domain, we will use window.name for communication dojo.require("dojox.io.xhrScriptPlugin"); dojox.io.xhrScriptPlugin(path, "callback", dojox.io.xhrPlugins.fullHttpAdapter); } var plainXhr = dojo.xhr; dojo.xhr = function(method,args){ (args.headers = args.headers || {})['Server-Methods'] = false; return plainXhr.apply(dojo,arguments); } var rootService= dojox.rpc.Rest(path,true); dojox.rpc._sync = sync; var dfd = rootService("Class/");//dojo.xhrGet({url: target, sync:!callback, handleAs:'json'}); var results; var stores = {}; var callId = 0; dfd.addCallback(function(schemas){ dojox.json.ref.resolveJson(schemas, { index: dojox.rpc.Rest._index, idPrefix: "/Class/", assignAbsoluteIds: true }); function setupHierarchy(schema){ if(schema['extends'] && schema['extends'].prototype){ if(!schema.prototype || !schema.prototype.isPrototypeOf(schema['extends'].prototype)){ setupHierarchy(schema['extends']); dojox.rpc.Rest._index[schema.prototype.__id] = schema.prototype = dojo.mixin(dojo.delegate(schema['extends'].prototype), schema.prototype); } } } function setupMethods(methodsDefinitions, methodsTarget){ if(methodsDefinitions && methodsTarget){ for(var j in methodsDefinitions){ var methodDef = methodsDefinitions[j]; // if any method definitions indicate that the method should run on the server, than add // it to the prototype as a JSON-RPC method if(methodDef.runAt == "server" && !methodsTarget[j]){ methodsTarget[j] = (function(methodName){ return function(){ // execute a JSON-RPC call var deferred = dojo.rawXhrPost({ url: this.__id, // the JSON-RPC call postData: dojo.toJson({ method: methodName, id: callId++, params: dojo._toArray(arguments) }), handleAs: "json" }); deferred.addCallback(function(response){ // handle the response return response.error ? new Error(response.error) : response.result; }); return deferred; } })(j); } } } } for(var i in schemas){ if(typeof schemas[i] == 'object'){ var schema = schemas[i]; setupHierarchy(schema); setupMethods(schema.methods, schema.prototype = schema.prototype || {}); setupMethods(schema.staticMethods, schema); stores[schemas[i].id] = new dojox.data.PersevereStore({target:new dojo._Url(path,schemas[i].id) + '',schema:schema}); } } return (results = stores); }); dojo.xhr = plainXhr; return sync ? results : dfd;";s:7:"summary";s:72:"Creates Dojo data stores for all the table/classes on a Persevere server";}s:34:"dojox.data.PersevereStore.addProxy";a:3:{s:4:"type";s:8:"Function";s:6:"source";s:155:" dojo.require("dojox.io.xhrPlugins"); // also not necessary, but we can register that Persevere supports proxying dojox.io.xhrPlugins.addProxy("/proxy/");";s:7:"summary";s:73:"Invokes the XHR proxy plugin. Call this if you will be using x-site data.";}s:33:"dojox.json.ref.serializeFunctions";a:1:{s:7:"summary";s:0:"";}s:10:"dojox.data";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}