Class Index | File Index

Classes


Namespace tao.items.TaoStack

tao.items
Defined in: core.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
The TaoStack class enables you: - to set up the platform to communicate with (it's by default the TAO plateform but could be any other with the same services provided by the server side) - to set and get variables created by the user or defined by the platform - to manage the source of data that the item could need - to push the communications with the platform
Field Summary
Field Attributes Field Name and Description
 
The push data
 
This object describes the way the data are accessed
 
This object stores the contextual data (sent by the server on load, or on getting them)
 
The stack container
 
The user custom variables container
Method Summary
Method Attributes Method Name and Description
 
getTaoVar(key, label)
Get the value of a TAO varaiable identified by the key
 
Get the value of a previously defined user's custom variable, identified by it's key
 
initDataSource(environment, settings, source)
Initialize and setup the data source.
 
initPush(environment, settings)
Initialize and setup the push.
 
loadData(source)
Load the contextual data
 
push()
push all the data in the stack to the server
 
setTaoVar(key, value, property)
The set method is restricted to scalar, but could be used to reference a property node
 
setUserVar(key, value)
The item author can define it's own variables in order to keep them in the stack and to send them to the plateform.
Namespace Detail
tao.items.TaoStack
The TaoStack class enables you: - to set up the platform to communicate with (it's by default the TAO plateform but could be any other with the same services provided by the server side) - to set and get variables created by the user or defined by the platform - to manage the source of data that the item could need - to push the communications with the platform
Field Detail
dataPush
The push data

dataSource
This object describes the way the data are accessed

dataStore
This object stores the contextual data (sent by the server on load, or on getting them)

taoVars
The stack container

userVars
The user custom variables container
Method Detail
{mixed} getTaoVar(key, label)
Get the value of a TAO varaiable identified by the key
Parameters:
{String} key
{boolean} label Optional
if you want to retrieve the label instead of the complete Object
Returns:
{mixed} value (false if the key is not found)

{String|number|boolean} getUserVar(key)
Get the value of a previously defined user's custom variable, identified by it's key
Parameters:
{String} key
Returns:
{String|number|boolean} value (false if the key is not found)

initDataSource(environment, settings, source)
Initialize and setup the data source.
Parameters:
{Object} environment
{Object} settings
{Object} source
if manual data source
See:
TaoStack.dataSource.environment
TaoStack.dataSource.settings

initPush(environment, settings)
Initialize and setup the push.
Parameters:
{Object} environment
{Object} settings
See:
TaoStack#dataPush#environment
TaoStack#dataPush#settings

loadData(source)
Load the contextual data
Parameters:
{Object} source Optional
the data ONLY for the manual source

push()
push all the data in the stack to the server

setTaoVar(key, value, property)
The set method is restricted to scalar, but could be used to reference a property node
Parameters:
{String} key
{String|number|boolean} value
{String} property Optional
the property uri

setUserVar(key, value)
The item author can define it's own variables in order to keep them in the stack and to send them to the plateform. It's usefull to record cutom field and values that have not been taken in consideration but have a real interest in the item.
Parameters:
{String} key
{String|number|boolean} value

Documentation generated by JsDoc Toolkit 2.3.2 on Wed Nov 03 2010 14:37:40 GMT+0100 (CET)