### Home Classes Methods

### In Files

- lib/xmpp4r/pubsub/helper/nodehelper.rb

### Parent

Jabber::PubSub::ServiceHelper

### Methods

- ::new
- #create_node
- #delete_node
- #do_subscribe
- #do_unsubscribe
- #get_affiliations
- #get_all_items
- #get_configuration
- #get_items
- #get_subscribers
- #get_subscriptions
- #publish_content
- #purge_items
- #set_configuration

### Files

- CHANGELOG
- COPYING
- LICENSE
- README.rdoc
- README_ruby19.txt

### Class/Module Index

Quicksearch

- Jabber
- Jabber::ArgumentError
- Jabber::Bytestreams
- Jabber::Bytestreams::IBB
- Jabber::Bytestreams::IBBInitiator
- Jabber::Bytestreams::IBBQueueItem
- Jabber::Bytestreams::IBBTarget
- Jabber::Bytestreams::IqQueryBytestreams
- Jabber::Bytestreams::IqSi
- Jabber::Bytestreams::IqSiFile
- Jabber::Bytestreams::IqSiFileRange
- Jabber::Bytestreams::SOCKS5Bytestreams
- Jabber::Bytestreams::SOCKS5BytestreamsInitiator
- Jabber::Bytestreams::SOCKS5BytestreamsPeer
- Jabber::Bytestreams::SOCKS5BytestreamsServer
- Jabber::Bytestreams::SOCKS5BytestreamsServerStreamHost
- Jabber::Bytestreams::SOCKS5BytestreamsTarget
- Jabber::Bytestreams::SOCKS5Socket
- Jabber::Bytestreams::StreamHost
- Jabber::Bytestreams::StreamHostUsed
- Jabber::Callback
- Jabber::CallbackList
- Jabber::Caps
- Jabber::Caps::C
- Jabber::Caps::Helper
- Jabber::Client
- Jabber::ClientAuthenticationFailure
- Jabber::Command
- Jabber::Command::IqCommand
- Jabber::Command::Responder
- Jabber::Component
- Jabber::ComponentAuthenticationFailure
- Jabber::Connection
- Jabber::Connection::SSLSocketUTF8
- Jabber::Dataforms
- Jabber::Dataforms::XData
- Jabber::Dataforms::XDataField
- Jabber::Dataforms::XDataInstructions
- Jabber::Dataforms::XDataReported
- Jabber::Dataforms::XDataTitle
- Jabber::Delay
- Jabber::Delay::XDelay
- Jabber::Discovery
- Jabber::Discovery::Feature
- Jabber::Discovery::Helper
- Jabber::Discovery::Identity
- Jabber::Discovery::IqQueryDiscoInfo
- Jabber::Discovery::IqQueryDiscoItems
- Jabber::Discovery::Item
- Jabber::Discovery::Responder
- Jabber::EntityTime
- Jabber::EntityTime::IqTime
- Jabber::EntityTime::Responder
- Jabber::ErrorResponse
- Jabber::FeatureNegotiation
- Jabber::FeatureNegotiation::IqFeature
- Jabber::FileTransfer
- Jabber::FileTransfer::FileSource
- Jabber::FileTransfer::Helper
- Jabber::FileTransfer::TransferSource
- Jabber::Framework
- Jabber::Framework::Base
- Jabber::Framework::Bot
- Jabber::HTTPBinding
- Jabber::HTTPBinding::Client
- Jabber::IdGenerator
- Jabber::InvalidChatState
- Jabber::Iq
- Jabber::IqQuery
- Jabber::JID
- Jabber::JabberError
- Jabber::LastActivity
- Jabber::LastActivity::Helper
- Jabber::LastActivity::IqQueryLastActivity
- Jabber::MUC
- Jabber::MUC::IqQueryMUCAdmin
- Jabber::MUC::IqQueryMUCAdminItem
- Jabber::MUC::IqQueryMUCOwner
- Jabber::MUC::MUCBrowser
- Jabber::MUC::MUCClient
- Jabber::MUC::SimpleMUCClient
- Jabber::MUC::UserItem
- Jabber::MUC::XMUC
- Jabber::MUC::XMUCUser
- Jabber::MUC::XMUCUserInvite
- Jabber::MUC::XMUCUserItem
- Jabber::Message
- Jabber::NoNameXmlnsRegistered
- Jabber::NotConnected
- Jabber::Observable
- Jabber::Observable::Contact
- Jabber::Observable::PubSub
- Jabber::Observable::PubSub::AlreadySet
- Jabber::Observable::PubSub::NoService
- Jabber::Observable::Subscriptions
- Jabber::Presence
- Jabber::PubSub
- Jabber::PubSub::Configuration
- Jabber::PubSub::Event
- Jabber::PubSub::EventItem
- Jabber::PubSub::EventItems
- Jabber::PubSub::IqPubSub
- Jabber::PubSub::IqPubSubOwner
- Jabber::PubSub::Item
- Jabber::PubSub::Items
- Jabber::PubSub::NodeBrowser
- Jabber::PubSub::NodeConfig
- Jabber::PubSub::NodeHelper
- Jabber::PubSub::OAuthPubSubStreamHelper
- Jabber::PubSub::OAuthServiceHelper
- Jabber::PubSub::OwnerNodeConfig
- Jabber::PubSub::Publish
- Jabber::PubSub::Retract
- Jabber::PubSub::ServiceHelper
- Jabber::PubSub::Subscription
- Jabber::PubSub::SubscriptionConfig
- Jabber::PubSub::Unsubscribe
- Jabber::RPC
- Jabber::RPC::Client
- Jabber::RPC::IqQueryRPC
- Jabber::RPC::Server
- Jabber::Reliable
- Jabber::Reliable::Connection
- Jabber::Reliable::Listener
- Jabber::Roster
- Jabber::Roster::Helper
- Jabber::Roster::Helper::RosterItem
- Jabber::Roster::IqQueryRoster
- Jabber::Roster::RosterItem
- Jabber::Roster::RosterX
- Jabber::Roster::RosterXItem
- Jabber::Roster::XRoster
- Jabber::Roster::XRosterItem
- Jabber::SASL
- Jabber::SASL::Anonymous
- Jabber::SASL::Base
- Jabber::SASL::DigestMD5
- Jabber::SASL::Plain
- Jabber::SOCKS5Error
- Jabber::Semaphore
- Jabber::ServerDisconnected
- Jabber::Stream
- Jabber::Stream::ThreadBlock
- Jabber::StreamParser
- Jabber::Test
- Jabber::Test::ListenerMocker
- Jabber::UserLocation
- Jabber::UserLocation::Helper
- Jabber::UserLocation::Location
- Jabber::UserTune
- Jabber::UserTune::Helper
- Jabber::UserTune::Tune
- Jabber::Vcard
- Jabber::Vcard::Helper
- Jabber::Vcard::IqVcard
- Jabber::Version
- Jabber::Version::IqQueryVersion
- Jabber::Version::Responder
- Jabber::Version::SimpleResponder
- Jabber::X
- Jabber::XHTML
- Jabber::XHTML::Body
- Jabber::XHTML::HTML
- Jabber::XMPPElement
- Jabber::XMPPStanza
- Jabber::XParent
- REXML
- REXML::Element
- REXML::IOSource
- XMLRPC
- XMLRPC::Create
- Base64
- ObservableThing
- QObserver
- ThreadStore

No matching classes.

# Jabber::PubSub::NodeHelper

### Attributes

jid[R]
my_subscriptions[R]
name[R]
nodename[R]

### Public Class Methods

new(stream, jid, nodename = nil, create_if_not_exist = true) click to toggle source

creates a new node new(client,service,nodename)

stream

Jabber::Stream

jid

String

  (jid of the pubsub service)

nodename

String

    # File lib/xmpp4r/pubsub/helper/nodehelper.rb, line 27
    def initialize(stream, jid, nodename = nil, create_if_not_exist = true)
      super(stream,jid)
      @nodename = nodename
      @jid = jid
      @stream = stream

      if create_if_not_exist and !node_exist?
        # if no nodename is given a instant node will created
        # (if the service supports instant nodes)
        @nodename = create_node
      else
        get_subscriptions
      end
    end

### Public Instance Methods

create_node(configuration = Jabber::PubSub::NodeConfig.new) click to toggle source

creates the node create(configuration=nil)

configuration

Jabber::XData

    # File lib/xmpp4r/pubsub/helper/nodehelper.rb, line 46
    def create_node(configuration = Jabber::PubSub::NodeConfig.new)
      unless node_exist?
        super(@nodename,configuration)
      else
        false
      end
    end

delete_node() click to toggle source

deletes the node delete

    # File lib/xmpp4r/pubsub/helper/nodehelper.rb, line 74
    def delete_node
      delete(@nodename)
    end

do_subscribe() click to toggle source

subscribe to this node do_subscribe

    # File lib/xmpp4r/pubsub/helper/nodehelper.rb, line 125
    def do_subscribe
      subscribe_to(@nodename)
      get_subscriptions
    end

do_unsubscribe(subid) click to toggle source

unsubscribe from this node do_unsubscribe(subid = nil)

subid

String

    # File lib/xmpp4r/pubsub/helper/nodehelper.rb, line 134
    def do_unsubscribe(subid)
      unsubscribe(@nodename,subid)
    end

get_affiliations() click to toggle source

get all node affiliations get_affiliations

    # File lib/xmpp4r/pubsub/helper/nodehelper.rb, line 104
    def get_affiliations
      affiliations
    end

get_all_items() click to toggle source

gets all items from the node get_all_items

    # File lib/xmpp4r/pubsub/helper/nodehelper.rb, line 89
    def get_all_items
      get_items_from(@nodename)
    end

get_configuration(subid = nil) click to toggle source

get the configuration of the node get_configuration(configuration=nil)

configuration

Jabber::XData

    # File lib/xmpp4r/pubsub/helper/nodehelper.rb, line 58
    def get_configuration(subid = nil)
      get_options(@nodename, subid)
    end

get_items(count) click to toggle source

get a count of items get_items(count)

count

Fixnum

    # File lib/xmpp4r/pubsub/helper/nodehelper.rb, line 97
    def get_items(count)
      get_items_from(@nodename,count)
    end

get_subscribers() click to toggle source

get all subscribers subscribed on this node get_subscribers

    # File lib/xmpp4r/pubsub/helper/nodehelper.rb, line 118
    def get_subscribers
      @subscriptions = subscribers(@nodename)
    end

get_subscriptions() click to toggle source

get all subscriptions on this node get_subscriptions

    # File lib/xmpp4r/pubsub/helper/nodehelper.rb, line 111
    def get_subscriptions
      get_subscriptions_from(@nodename)
    end

publish_content(items) click to toggle source

publishing content on this node publish_content(items)

items

REXML::Element

    # File lib/xmpp4r/pubsub/helper/nodehelper.rb, line 82
    def publish_content(items)
      publish_item_to(@nodename,items)
    end

purge_items() click to toggle source

purge all items from this node purge_items

    # File lib/xmpp4r/pubsub/helper/nodehelper.rb, line 141
    def purge_items
      purge(@nodename)
    end

set_configuration(configuration,subid = nil) click to toggle source

set the configuration of the node set_configuration(configuration=nil)

configuration

Jabber::XData

subid

String

  default is nil

    # File lib/xmpp4r/pubsub/helper/nodehelper.rb, line 67
    def set_configuration(configuration,subid = nil)
      set_options(@nodename, configuration, subid)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.