org.jivesoftware.smackx.pubsub
Class Affiliation
java.lang.Object
org.jivesoftware.smackx.pubsub.Affiliation
- All Implemented Interfaces:
- PacketExtension
public class Affiliation
- extends java.lang.Object
- implements PacketExtension
Represents a affiliation between a user and a node, where the type
defines
the type of affiliation.
Affiliations are retrieved from the PubSubManager.getAffiliations()
method, which
gets affiliations for the calling user, based on the identity that is associated with
the Connection
.
- Author:
- Robin Collier
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
node
protected java.lang.String node
type
protected Affiliation.Type type
Affiliation
public Affiliation(java.lang.String nodeId,
Affiliation.Type affiliation)
- Constructs an affiliation.
- Parameters:
nodeId
- The node the user is affiliated with.affiliation
- The type of affiliation.
getNodeId
public java.lang.String getNodeId()
getType
public Affiliation.Type getType()
getElementName
public java.lang.String getElementName()
- Description copied from interface:
PacketExtension
- Returns the root element name.
- Specified by:
getElementName
in interface PacketExtension
- Returns:
- the element name.
getNamespace
public java.lang.String getNamespace()
- Description copied from interface:
PacketExtension
- Returns the root element XML namespace.
- Specified by:
getNamespace
in interface PacketExtension
- Returns:
- the namespace.
toXML
public java.lang.String toXML()
- Description copied from interface:
PacketExtension
- Returns the XML representation of the PacketExtension.
- Specified by:
toXML
in interface PacketExtension
- Returns:
- the packet extension as XML.
Copyright © 2003-2007 Jive Software.