a:17:{s:9:"#provides";s:24:"dojox.atom.io.Connection";s:9:"#resource";s:21:"atom/io/Connection.js";s:9:"#requires";a:1:{i:0;a:2:{i:0;s:6:"common";i:1;s:19:"dojox.atom.io.model";}}s:24:"dojox.atom.io.Connection";a:6:{s:4:"type";s:8:"Function";s:7:"summary";s:11:"initializer";s:11:"description";s:278:"This object implements a transport layer for working with ATOM feeds and ATOM publishing protocols. Specifically, it provides a mechanism by which feeds can be fetched and entries can be fetched, created deleted, and modified. It also provides access to the introspection data.";s:10:"parameters";a:2:{s:4:"sync";a:1:{s:4:"type";s:7:"Boolean";}s:12:"preventCache";a:1:{s:4:"type";s:7:"Boolean";}}s:6:"source";s:55:" this.sync = sync; this.preventCache = preventCache;";s:9:"classlike";b:1;}s:37:"dojox.atom.io.Connection.preventCache";a:3:{s:9:"prototype";s:24:"dojox.atom.io.Connection";s:8:"instance";s:24:"dojox.atom.io.Connection";s:7:"summary";s:0:"";}s:38:"dojox.atom.io.Connection.alertsEnabled";a:2:{s:9:"prototype";s:24:"dojox.atom.io.Connection";s:7:"summary";s:0:"";}s:32:"dojox.atom.io.Connection.getFeed";a:7:{s:9:"prototype";s:24:"dojox.atom.io.Connection";s:4:"type";s:8:"Function";s:10:"parameters";a:4:{s:3:"url";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:34:"The URL of the ATOM feed to fetch.";}s:8:"callback";a:2:{s:4:"type";s:8:"Function";s:7:"summary";s:172:"A function reference that will handle the feed when it has been retrieved. The callback should accept two parameters: The feed object and the original complete DOM object.";}s:13:"errorCallback";a:1:{s:4:"type";s:8:"Function";}s:5:"scope";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:35:"The scope to use for all callbacks.";}}s:6:"source";s:164:" this._getXmlDoc(url, "feed", new dojox.atom.io.model.Feed(), dojox.atom.io.model._Constants.ATOM_NS, callback, /*handleDocumentRetrieved,*/ errorCallback, scope);";s:7:"summary";s:69:"Function to obtain a s specific ATOM feed from a given ATOM Feed url.";s:11:"description";s:141:"This function takes the URL for a specific ATOM feed and returns the data from that feed to the caller through the use of a callback handler.";s:14:"return_summary";s:60:"Nothing. The return is handled through the callback handler.";}s:35:"dojox.atom.io.Connection.getService";a:7:{s:9:"prototype";s:24:"dojox.atom.io.Connection";s:4:"type";s:8:"Function";s:10:"parameters";a:4:{s:3:"url";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:69:"The URL of the ATOM document to obtain the introspection document of.";}s:8:"callback";a:2:{s:4:"type";s:8:"Function";s:7:"summary";s:208:"A function reference that will handle the introspection document when it has been retrieved. The callback should accept two parameters: The introspection document object and the original complete DOM object.";}s:13:"errorCallback";a:1:{s:4:"type";s:0:"";}s:5:"scope";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:143:" this._getXmlDoc(url, "service", new dojox.atom.io.model.Service(url), dojox.atom.io.model._Constants.APP_NS, callback, errorCallback, scope);";s:7:"summary";s:66:"Function to retrieve an introspection document from the given URL.";s:11:"description";s:93:"This function takes the URL for an ATOM item and feed and returns the introspection document.";s:14:"return_summary";s:60:"Nothing. The return is handled through the callback handler.";}s:33:"dojox.atom.io.Connection.getEntry";a:7:{s:9:"prototype";s:24:"dojox.atom.io.Connection";s:4:"type";s:8:"Function";s:10:"parameters";a:4:{s:3:"url";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:44:"The URL of the ATOM Entry document to parse.";}s:8:"callback";a:2:{s:4:"type";s:8:"Function";s:7:"summary";s:166:"A function reference that will handle the Entry object obtained. The callback should accept two parameters, the dojox.atom.io.model.Entry object and the original dom.";}s:13:"errorCallback";a:1:{s:4:"type";s:0:"";}s:5:"scope";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:137:" this._getXmlDoc(url, "entry", new dojox.atom.io.model.Entry(), dojox.atom.io.model._Constants.ATOM_NS, callback, errorCallback, scope);";s:7:"summary";s:73:"Function to retrieve a single entry from an ATOM feed from the given URL.";s:11:"description";s:138:"This function takes the URL for an ATOM entry and returns the constructed dojox.atom.io.model.Entry object through the specified callback.";s:14:"return_summary";s:60:"Nothing. The return is handled through the callback handler.";}s:35:"dojox.atom.io.Connection._getXmlDoc";a:8:{s:9:"prototype";s:24:"dojox.atom.io.Connection";s:4:"type";s:8:"Function";s:10:"parameters";a:7:{s:3:"url";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:39:"The URL of the XML document to retrieve";}s:8:"nodeName";a:1:{s:4:"type";s:0:"";}s:7:"newNode";a:1:{s:4:"type";s:0:"";}s:9:"namespace";a:1:{s:4:"type";s:0:"";}s:8:"callback";a:2:{s:4:"type";s:8:"Function";s:7:"summary";s:139:"A function reference that will handle the retrieved XML data. The callback should accept one parameter, the DOM of the parsed XML document.";}s:13:"errorCallback";a:1:{s:4:"type";s:0:"";}s:5:"scope";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:2244:" if(!scope){ scope = dojo.global; } var ae = this.alertsEnabled; var xhrArgs = { url: url, handleAs: "xml", sync: this.sync, preventCache: this.preventCache, load: function(data, args){ var node = null; var evaldObj = data; var nodes; if(evaldObj){ //find the first node of the appropriate name if(typeof(evaldObj.getElementsByTagNameNS)!= "undefined"){ nodes = evaldObj.getElementsByTagNameNS(namespace,nodeName); if(nodes && nodes.length > 0){ node = nodes.item(0); }else if(evaldObj.lastChild){ // name_spaces can be used without declaration of atom (for example // gooogle feeds often returns iTunes name_space qualifiers on elements) // Treat this situation like name_spaces not enabled. node = evaldObj.lastChild; } }else if(typeof(evaldObj.getElementsByTagName)!= "undefined"){ // Find the first eith the correct tag name and correct namespace. nodes = evaldObj.getElementsByTagName(nodeName); if(nodes && nodes.length > 0){ for(var i=0; i<nodes.length; i++){ if(nodes[i].namespaceURI == namespace){ node = nodes[i]; break; } } }else if(evaldObj.lastChild){ node = evaldObj.lastChild; } }else if(evaldObj.lastChild){ node = evaldObj.lastChild; }else{ callback.call(scope, null, null, args); return; } newNode.buildFromDom(node); if(callback){ callback.call(scope, newNode, evaldObj, args); }else if(ae){ var _nlsResources = dojo.i18n.getLocalization("dojox.atom.io", "messages"); throw new Error(_nlsResources.noCallback); } }else{ callback.call(scope, null, null, args); } } }; if(this.user && this.user !== null){ xhrArgs.user = this.user; } if(this.password && this.password !== null){ xhrArgs.password = this.password; } if(errorCallback){ xhrArgs.error = function(error, args){errorCallback.call(scope, error, args);}; }else{ xhrArgs.error = function(){ var _nlsResources = dojo.i18n.getLocalization("dojox.atom.io", "messages"); throw new Error(_nlsResources.failedXhr); }; } dojo.xhrGet(xhrArgs);";s:7:"summary";s:81:"Internal Function to retrieve an XML document and pass the results to a callback.";s:11:"description";s:116:"This internal function takes the URL for an XML document and and passes the parsed contents to a specified callback.";s:14:"return_summary";s:60:"Nothing. The return is handled through the callback handler.";s:7:"private";b:1;}s:36:"dojox.atom.io.Connection.updateEntry";a:7:{s:9:"prototype";s:24:"dojox.atom.io.Connection";s:4:"type";s:8:"Function";s:10:"parameters";a:6:{s:5:"entry";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:47:"The dojox.atom.io.model.Entry object to update.";}s:8:"callback";a:2:{s:4:"type";s:8:"Function";s:7:"summary";s:249:"A function reference that will handle the results from the entry update. The callback should accept two parameters: The first is an Entry object, and the second is the URL of that Entry Either can be null, depending on the value of retrieveUpdated.";}s:13:"errorCallback";a:1:{s:4:"type";s:0:"";}s:15:"retrieveUpdated";a:2:{s:4:"type";s:7:"boolean";s:7:"summary";s:123:"A boolean flag denoting if the entry that was updated should then be retrieved and returned to the caller via the callback.";}s:7:"xmethod";a:2:{s:4:"type";s:7:"boolean";s:7:"summary";s:79:"Whether to use POST for PUT/DELETE items and send the X-Method-Override header.";}s:5:"scope";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:35:"The scope to use for all callbacks.";}}s:6:"source";s:2106:" if(!scope){ scope = dojo.global; } entry.updated = new Date(); var url = entry.getEditHref(); if(!url){ var _nlsResources = dojo.i18n.getLocalization("dojox.atom.io", "messages"); throw new Error(_nlsResources.missingEditUrl); } var self = this; var ae = this.alertsEnabled; var xhrArgs = { url: url, handleAs: "text", contentType: "text/xml", sync: this.sync, preventCache: this.preventCache, load: function(data, args){ var location = null; if(retrieveUpdated){ location = args.xhr.getResponseHeader("Location"); if(!location){location = url;} //Function to handle the callback mapping of a getEntry after an update to return the //entry and location. var handleRetrieve = function(entry, dom, args){ if(callback){ callback.call(scope, entry, location, args); }else if(ae){ var _nlsResources = dojo.i18n.getLocalization("dojox.atom.io", "messages"); throw new Error(_nlsResources.noCallback); } }; self.getEntry(location,handleRetrieve); }else{ if(callback){ callback.call(scope, entry, args.xhr.getResponseHeader("Location"), args); }else if(ae){ var _nlsResources = dojo.i18n.getLocalization("dojox.atom.io", "messages"); throw new Error(_nlsResources.noCallback); } } return data; } }; if(this.user && this.user !== null){ xhrArgs.user = this.user; } if(this.password && this.password !== null){ xhrArgs.password = this.password; } if(errorCallback){ xhrArgs.error = function(error, args){errorCallback.call(scope, error, args);}; }else{ xhrArgs.error = function(){ var _nlsResources = dojo.i18n.getLocalization("dojox.atom.io", "messages"); throw new Error(_nlsResources.failedXhr); }; } if(xmethod){ xhrArgs.postData = entry.toString(true); //Set the content to send. xhrArgs.headers = {"X-Method-Override": "PUT"}; dojo.rawXhrPost(xhrArgs); }else{ xhrArgs.putData = entry.toString(true); //Set the content to send. var xhr = dojo.rawXhrPut(xhrArgs); }";s:7:"summary";s:76:"Function to update a specific ATOM entry by putting the new changes via APP.";s:11:"description";s:186:"This function takes a specific dojox.atom.io.model.Entry object and pushes the changes back to the provider of the Entry. The entry MUST have a link tag with rel="edit" for this to work.";s:14:"return_summary";s:60:"Nothing. The return is handled through the callback handler.";}s:33:"dojox.atom.io.Connection.addEntry";a:7:{s:9:"prototype";s:24:"dojox.atom.io.Connection";s:4:"type";s:8:"Function";s:10:"parameters";a:6:{s:5:"entry";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:48:"The dojox.atom.io.model.Entry object to publish.";}s:3:"url";a:1:{s:4:"type";s:0:"";}s:8:"callback";a:2:{s:4:"type";s:8:"Function";s:7:"summary";s:275:"A function reference that will handle the results from the entry publish. The callback should accept two parameters: The first is an dojox.atom.io.model.Entry object, and the second is the location of the entry Either can be null, depending on the value of retrieveUpdated.";}s:13:"errorCallback";a:1:{s:4:"type";s:0:"";}s:13:"retrieveEntry";a:2:{s:4:"type";s:7:"boolean";s:7:"summary";s:123:"A boolean flag denoting if the entry that was created should then be retrieved and returned to the caller via the callback.";}s:5:"scope";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:35:"The scope to use for all callbacks.";}}s:6:"source";s:1983:" if(!scope){ scope = dojo.global; } entry.published = new Date(); entry.updated = new Date(); var feedUrl = entry.feedUrl; var ae = this.alertsEnabled; //Determine which URL to use for the post. if(!url && feedUrl){url = feedUrl;} if(!url){ if(ae){ var _nlsResources = dojo.i18n.getLocalization("dojox.atom.io", "messages"); throw new Error(_nlsResources.missingUrl); } return; } var self = this; var xhrArgs = { url: url, handleAs: "text", contentType: "text/xml", sync: this.sync, preventCache: this.preventCache, postData: entry.toString(true), load: function(data, args){ var location = args.xhr.getResponseHeader("Location"); if(!location){ location = url; } if(!args.retrieveEntry){ if(callback){ callback.call(scope, entry, location, args); }else if(ae){ var _nlsResources = dojo.i18n.getLocalization("dojox.atom.io", "messages"); throw new Error(_nlsResources.noCallback); } }else{ //Function to handle the callback mapping of a getEntry after an update to return the //entry and location. var handleRetrieve = function(entry, dom, args) { if(callback){ callback.call(scope, entry, location, args); }else if(ae){ var _nlsResources = dojo.i18n.getLocalization("dojox.atom.io", "messages"); throw new Error(_nlsResources.noCallback); } }; self.getEntry(location,handleRetrieve); } return data; } }; if(this.user && this.user !== null){ xhrArgs.user = this.user; } if(this.password && this.password !== null){ xhrArgs.password = this.password; } if(errorCallback){ xhrArgs.error = function(error, args){errorCallback.call(scope, error, args);}; }else{ xhrArgs.error = function(){ var _nlsResources = dojo.i18n.getLocalization("dojox.atom.io", "messages"); throw new Error(_nlsResources.failedXhr); }; } dojo.rawXhrPost(xhrArgs);";s:7:"summary";s:66:"Function to add a new ATOM entry by posting the new entry via APP.";s:11:"description";s:121:"This function takes a specific dojox.atom.io.model.Entry object and pushes the changes back to the provider of the Entry.";s:14:"return_summary";s:60:"Nothing. The return is handled through the callback handler.";}s:36:"dojox.atom.io.Connection.deleteEntry";a:7:{s:9:"prototype";s:24:"dojox.atom.io.Connection";s:4:"type";s:8:"Function";s:10:"parameters";a:5:{s:5:"entry";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:47:"The dojox.atom.io.model.Entry object to delete.";}s:8:"callback";a:2:{s:4:"type";s:8:"Function";s:7:"summary";s:129:"A function reference that will handle the results from the entry delete. The callback is called only if the delete is successful.";}s:13:"errorCallback";a:1:{s:4:"type";s:0:"";}s:7:"xmethod";a:1:{s:4:"type";s:0:"";}s:5:"scope";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:1110:" if(!scope){ scope = dojo.global; } var url = null; if(typeof(entry)=="string"){ url = entry; }else{ url = entry.getEditHref(); } if(!url){ var _nlsResources = dojo.i18n.getLocalization("dojox.atom.io", "messages"); callback.call(scope, false, null); throw new Error(_nlsResources.missingUrl); } var xhrArgs = { url: url, handleAs: "text", sync: this.sync, preventCache: this.preventCache, load: function(data, args){ callback.call(scope, args); return data; } }; if(this.user && this.user !== null){ xhrArgs.user = this.user; } if(this.password && this.password !== null){ xhrArgs.password = this.password; } if(errorCallback){ xhrArgs.error = function(error, args){errorCallback.call(scope, error, args);}; }else{ xhrArgs.error = function(){ var _nlsResources = dojo.i18n.getLocalization("dojox.atom.io", "messages"); throw new Error(_nlsResources.failedXhr); }; } if(xmethod){ xhrArgs.headers = {"X-Method-Override": "DELETE"}; dojo.xhrPost(xhrArgs); }else{ dojo.xhrDelete(xhrArgs); }";s:7:"summary";s:49:"Function to delete a specific ATOM entry via APP.";s:11:"description";s:199:"This function takes a specific dojox.atom.io.model.Entry object and calls for a delete on the service housing the ATOM Entry database. The entry MUST have a link tag with rel="edit" for this to work.";s:14:"return_summary";s:60:"Nothing. The return is handled through the callback handler.";}s:29:"dojox.atom.io.Connection.sync";a:2:{s:8:"instance";s:24:"dojox.atom.io.Connection";s:7:"summary";s:0:"";}s:13:"dojox.atom.io";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:10:"dojox.atom";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:"";}}