Class Index | Minimal

Classes


Class jabberwerx.PEPNode


Extends jabberwerx.PubSubNode.

Represents a PEP node.

This class provides the following events:

Class Summary
Constructor Attributes Constructor Name and Description
 
jabberwerx.PEPNode(jid, node, ctrl)

Creates a new PEPNode for the given JID, node, and PEPController.

Field Summary
Field Attributes Field Name and Description
<static> <constant>  
jabberwerx.PEPNode.CURRENT_ITEM
An item ID used for simple single-item publishing.
Fields borrowed from class jabberwerx.PubSubNode:
autoRetrieve
Fields borrowed from class jabberwerx.Entity:
features, identities, jid, node, properties
Method Summary
Method Attributes Method Name and Description
 
Creates the node in the pub-sub service.
 
Deletes the node in the pub-sub service.
 

Destroys this PEPNode.

 
Enable or disable a node's jabberwerx.PubSubItem caching.
 

Subscribes to this PEPNode.

 

Unsubscribes from this PEPNode.

Methods borrowed from class jabberwerx.PubSubNode:
applyConfig, fetchAffiliations, fetchConfig, getDelegatedFor, getItems, isCachingItems, publish, retract, retrieve, updateAffiliation
Methods borrowed from class jabberwerx.Entity:
apply, getAllPresence, getDisplayName, getGroups, getPrimaryPresence, getResourcePresence, hasFeature, hasIdentity, isActive, matches, remove, setDisplayName, setGroups, toString, update, updatePresence
Methods borrowed from class jabberwerx.JWModel:
applyEvent, event, shouldBeSavedWithGraph
Methods borrowed from class jabberwerx.JWBase:
getClassName, graphUnserialized, init, invocation, shouldBeSerializedInline, wasUnserialized, willBeSerialized
Class Detail
jabberwerx.PEPNode(jid, node, ctrl)

Creates a new PEPNode for the given JID, node, and PEPController.

NOTE: This type should not be constructed directly. Instead, use jabberwerx.PEPController#node to obtain an instance.

Parameters:
{jabberwerx.JID} jid
The JID
{String} node
The node
{jabberwerx.PEPController|jabberwerx.PEPNode} ctrl
The owning controller or delegate
Throws:
{TypeError}
If {ctrl} is not valid; or if {node} is not valid
Field Detail
<static> <constant> jabberwerx.PEPNode.CURRENT_ITEM
An item ID used for simple single-item publishing.
Method Detail
createNode(cb)
Creates the node in the pub-sub service. This implementation always throws a jabberwerx.util.NotSupportedError.
Parameters:
{Function} cb Optional
The callback
Throws:
{jabberwerx.util.NotSupportedError}
This method is not supported

deleteNode(cb)
Deletes the node in the pub-sub service. This implementation always throws a jabberwerx.util.NotSupportedError.
Parameters:
{Function} cb Optional
The callback
Throws:
{jabberwerx.util.NotSupportedError}
This method is not supported

destroy()

Destroys this PEPNode. This method first unsubscribes then calls the superclass' implementation.


setCachingItems(enable)
Enable or disable a node's jabberwerx.PubSubItem caching. Item caching is always enabled in jabberwerx.PEPNode. This implementation always throws a jabberwerx.util.NotSupportedError.
Parameters:
{Boolean} enable
Throws:
{jabberwerx.util.NotSupportedError}
This method is not supported

subscribe(cb)

Subscribes to this PEPNode. This method performs an implicit subscription by updating the capabilities to add the feature "+notify".

The callback, if defined, is expected to match the following:

 function callback(err) {
     this;   // this PubSubNode
     err;    // the stanza error if subscribe failed
 }
Parameters:
{Function} cb Optional
The callback
Throws:
{TypeError}
If {cb} is defined and not a function
See:
#unsubscribe

unsubscribe(cb)

Unsubscribes from this PEPNode. This method performs an implicit unsubscription by updating the capabilities to remove the feature "+notify".

The callback, if defined, is expected to match the following:

 function callback(err) {
     this;   // this PubSubNode
     err;    // the stanza error if unsubscribe failed
 }
Parameters:
{Function} cb Optional
The callback
Throws:
{TypeError}
If {cb} is defined and not a function
See:
#subscribe

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 02 2014 13:23:42 GMT-0600 (MDT)