Package org.jivesoftware.smackx.pubsub
Class NodeExtension
- java.lang.Object
-
- org.jivesoftware.smackx.pubsub.NodeExtension
-
- All Implemented Interfaces:
org.jivesoftware.smack.packet.Element
,org.jivesoftware.smack.packet.NamedElement
,org.jivesoftware.smack.packet.XmlElement
,org.jivesoftware.smack.packet.XmlLangElement
- Direct Known Subclasses:
AffiliationsExtension
,ConfigurationEvent
,FormNode
,GetItemsRequest
,Item
,ItemsExtension
,OptionsExtension
,PublishItem
,SubscribeExtension
,Subscription
,SubscriptionsExtension
,UnsubscribeExtension
public class NodeExtension extends java.lang.Object implements org.jivesoftware.smack.packet.XmlElement
A class which represents a common element within the pubsub defined schemas. One which has a node as an attribute. This class is used on its own as well as a base class for many others, since the node is a central concept to most pubsub functionality.
-
-
Constructor Summary
Constructors Constructor Description NodeExtension(PubSubElementType elem)
Constructs aNodeExtension
with an element name specified byPubSubElementType
.NodeExtension(PubSubElementType elem, java.lang.String nodeId)
Constructs aNodeExtension
with an element name specified byPubSubElementType
and the specified node id.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addXml(org.jivesoftware.smack.util.XmlStringBuilder xml)
java.lang.String
getElementName()
java.lang.String
getNamespace()
java.lang.String
getNode()
Gets the node id.PubSubNamespace
getPubSubNamespace()
java.lang.String
toString()
org.jivesoftware.smack.util.XmlStringBuilder
toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
-
-
-
Constructor Detail
-
NodeExtension
public NodeExtension(PubSubElementType elem, java.lang.String nodeId)
Constructs aNodeExtension
with an element name specified byPubSubElementType
and the specified node id.- Parameters:
elem
- Defines the element name and namespacenodeId
- Specifies the id of the node
-
NodeExtension
public NodeExtension(PubSubElementType elem)
Constructs aNodeExtension
with an element name specified byPubSubElementType
.- Parameters:
elem
- Defines the element name and namespace
-
-
Method Detail
-
getNode
public java.lang.String getNode()
Gets the node id.- Returns:
- The node id
-
getElementName
public java.lang.String getElementName()
- Specified by:
getElementName
in interfaceorg.jivesoftware.smack.packet.NamedElement
-
getPubSubNamespace
public PubSubNamespace getPubSubNamespace()
-
getNamespace
public final java.lang.String getNamespace()
- Specified by:
getNamespace
in interfaceorg.jivesoftware.smack.packet.XmlElement
-
toXML
public final org.jivesoftware.smack.util.XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
- Specified by:
toXML
in interfaceorg.jivesoftware.smack.packet.Element
-
addXml
protected void addXml(org.jivesoftware.smack.util.XmlStringBuilder xml)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-