Class Index | File Index

Classes


Class ContentObjectAPI


Defined in: abstract-content-object.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<static>  
ContentObjectAPI.WRITEABLE_PROPS
Method Summary
Method Attributes Method Name and Description
<static>  
ContentObjectAPI.clear()
Clears this object from its constructor's cache so that the next attempt to access this object will result in a brand new instance being initialized and placed in the cache.
<static>  
ContentObjectAPI.decode(str, success, error)
For a given string, replace all occurances of "" with appropriate HTML markup, allowing notated tags to be rendered within the surrounding HTML content.
<static>  
ContentObjectAPI.encode(An, A)
Replaces tag blocks with appropriate "" notation in a given string.
<static>  
ContentObjectAPI.folder(success, error)
Get this content object's parent folder.
<static>  
ContentObjectAPI.id()
Gets this object's id.
<static>  
ContentObjectAPI.node(success, error)
Get this content object's node.
<static>  
ContentObjectAPI.prop(property, value)
Reads the proporty `property' of this content object if this property is among those in the WRITEABLE_PROPS array.
<static>  
ContentObjectAPI.remove(success, error)
Deletes this content object from its containing parent.
<static>  
ContentObjectAPI.save(settings, success, error)
Saves changes made to this content object to the backend.
Class Detail
ContentObjectAPI()
Field Detail
<static> {Writeable properties for all content objects.} ContentObjectAPI.WRITEABLE_PROPS
Method Detail
<static> ContentObjectAPI.clear()
Clears this object from its constructor's cache so that the next attempt to access this object will result in a brand new instance being initialized and placed in the cache.

<static> ContentObjectAPI.decode(str, success, error)
For a given string, replace all occurances of "" with appropriate HTML markup, allowing notated tags to be rendered within the surrounding HTML content. The `success()' handler will receives a string containing the contents of the `str' string with references to "" having been inflated into their appropriate tag rendering.
Parameters:
{string} str
The content string, in which "" tags will be inflated with their HTML rendering.
{function(ContentObjectAPI))} success
Success callback that will receive the decoded string.
{function(GCNError):boolean=} error
Optional custom error handler.

<static> {string} ContentObjectAPI.encode(An, A)
Replaces tag blocks with appropriate "" notation in a given string. Given an element whose innerHTML is:
		"My Tag",
`encode()' will return:
		"".
Parameters:
{!jQuery} An
element whose contents are to be encoded.
{?function(!Element): string} A
function that returns the serialized contents of the given element as a HTML string, excluding the start and end tag of the element. If not provided, jQuery.html() will be used.
Returns:
{string} The encoded HTML string.

<static> {FolderAPI} ContentObjectAPI.folder(success, error)
Get this content object's parent folder.
Defined in: abstract-tag-container.js.
Parameters:
{funtion(FolderAPI)=} success
Optional callback to receive a FolderAPI object as the only argument.
{function(GCNError):boolean=} error
Optional custom error handler.
Returns:
{FolderAPI} This object's parent folder.

<static> {number} ContentObjectAPI.id()
Gets this object's id. We'll return the id of the object when it has been loaded. This can only be a localid. Otherwise we'll return the id which was provided by the user. This can either be a localid or a globalid.
Returns:
{number}

<static> {NodeAPI} ContentObjectAPI.node(success, error)
Get this content object's node.
Defined in: abstract-tag-container.js.
Parameters:
{funtion(NodeAPI)=} success
Optional callback to receive a NodeAPI object as the only argument.
{function(GCNError):boolean=} error
Optional custom error handler.
Returns:
{NodeAPI} This object's node.

<static> {?*} ContentObjectAPI.prop(property, value)
Reads the proporty `property' of this content object if this property is among those in the WRITEABLE_PROPS array. If a send argument is provided, them the property is updated with that value.
Parameters:
{String} property
Name of the property to be read or updated.
{String} value
Value to be set property to.
Throws:
UNFETCHED_OBJECT_ACCESS
READONLY_ATTRIBUTE
Returns:
{?*} Meta attribute.

<static> ContentObjectAPI.remove(success, error)
Deletes this content object from its containing parent.
Parameters:
{function(ContentObjectAPI)=} success
Optional callback that receives this object as its only argument.
{function(GCNError):boolean=} error
Optional customer error handler.

<static> ContentObjectAPI.save(settings, success, error)
Saves changes made to this content object to the backend.
Parameters:
{object=} settings
Optional settings to pass on to the ajax function.
{function(ContentObjectAPI)=} success
Optional callback that receives this object as its only argument.
{function(GCNError):boolean=} error
Optional customer error handler.

Documentation generated by JsDoc Toolkit 2.3.2 on Fri Aug 24 2012 13:50:01 GMT+0200 (CEST)