dojox/atom/io/Connection (version 1.10)

Summary

This object implements a transport layer for working with ATOM feeds and ATOM publishing protocols.

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.

Usage

var foo = new Connection(sync,preventCache);
dojox/atom/io/Connection
Parameter Type Description
sync Boolean
preventCache Boolean

See the dojox/atom/io/Connection reference documentation for more information.

Property Summary

Method Summary

  • _getXmlDoc(url,nodeName,newNode,namespace,callback,errorCallback,scope) Internal Function to retrieve an XML document and pass the results to a callback.
  • addEntry(entry,url,callback,errorCallback,retrieveEntry,scope) Function to add a new ATOM entry by posting the new entry via APP.
  • deleteEntry(entry,callback,errorCallback,xmethod,scope) Function to delete a specific ATOM entry via APP.
  • getEntry(url,callback,errorCallback,scope) Function to retrieve a single entry from an ATOM feed from the given URL.
  • getFeed(url,callback,errorCallback,scope) Function to obtain a s specific ATOM feed from a given ATOM Feed url.
  • getService(url,callback,errorCallback,scope) Function to retrieve an introspection document from the given URL.
  • updateEntry(entry,callback,errorCallback,retrieveUpdated,xmethod,scope) Function to update a specific ATOM entry by putting the new changes via APP.

Properties

alertsEnabled
preventCache

Methods

_getXmlDoc(url,nodeName,newNode,namespace,callback,errorCallback,scope)

Internal Function to retrieve an XML document and pass the results to a callback.

This internal function takes the URL for an XML document and and passes the parsed contents to a specified callback.

Parameter Type Description
url undefined

String The URL of the XML document to retrieve

nodeName undefined
newNode undefined
namespace undefined
callback undefined

Function A function reference that will handle the retrieved XML data. The callback should accept one parameter, the DOM of the parsed XML document.

errorCallback undefined
scope undefined
Returns:any

Nothing. The return is handled through the callback handler.

addEntry(entry,url,callback,errorCallback,retrieveEntry,scope)

Function to add a new ATOM entry by posting the new entry via APP.

This function takes a specific dojox.atom.io.model.Entry object and pushes the changes back to the provider of the Entry.

Parameter Type Description
entry undefined

Object The dojox.atom.io.model.Entry object to publish.

url undefined
callback undefined

Function 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.

errorCallback undefined
retrieveEntry undefined

boolean A boolean flag denoting if the entry that was created should then be retrieved and returned to the caller via the callback.

scope undefined

Object The scope to use for all callbacks.

Returns:any

Nothing. The return is handled through the callback handler.

deleteEntry(entry,callback,errorCallback,xmethod,scope)

Function to delete a specific ATOM entry via APP.

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.

Parameter Type Description
entry undefined

Object The dojox.atom.io.model.Entry object to delete.

callback undefined

Function A function reference that will handle the results from the entry delete. The callback is called only if the delete is successful.

errorCallback undefined
xmethod undefined
scope undefined
Returns:any

Nothing. The return is handled through the callback handler.

getEntry(url,callback,errorCallback,scope)

Function to retrieve a single entry from an ATOM feed from the given URL.

This function takes the URL for an ATOM entry and returns the constructed dojox.atom.io.model.Entry object through the specified callback.

Parameter Type Description
url undefined

String The URL of the ATOM Entry document to parse.

callback undefined

Function 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.

errorCallback undefined
scope undefined
Returns:any

Nothing. The return is handled through the callback handler.

getFeed(url,callback,errorCallback,scope)

Function to obtain a s specific ATOM feed from a given ATOM Feed url.

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.

Parameter Type Description
url String

The URL of the ATOM feed to fetch.

callback Function

Function 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.

errorCallback Function
scope Object

The scope to use for all callbacks.

Returns:any

Nothing. The return is handled through the callback handler.

getService(url,callback,errorCallback,scope)

Function to retrieve an introspection document from the given URL.

This function takes the URL for an ATOM item and feed and returns the introspection document.

Parameter Type Description
url undefined

String The URL of the ATOM document to obtain the introspection document of.

callback undefined

Function 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.

errorCallback undefined
scope undefined
Returns:any

Nothing. The return is handled through the callback handler.

updateEntry(entry,callback,errorCallback,retrieveUpdated,xmethod,scope)

Function to update a specific ATOM entry by putting the new changes via APP.

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.

Parameter Type Description
entry undefined

Object The dojox.atom.io.model.Entry object to update.

callback undefined

Function 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.

errorCallback undefined
retrieveUpdated undefined

boolean A boolean flag denoting if the entry that was updated should then be retrieved and returned to the caller via the callback.

xmethod undefined

boolean Whether to use POST for PUT/DELETE items and send the X-Method-Override header.

scope undefined

Object The scope to use for all callbacks.

Returns:any

Nothing. The return is handled through the callback handler.

Error in the documentation? Can’t find what you are looking for? Let us know!