org.jivesoftware.smackx.pubsub
Class Affiliation

java.lang.Object
  extended by org.jivesoftware.smackx.pubsub.Affiliation
All Implemented Interfaces:
org.jivesoftware.smack.packet.PacketExtension

public class Affiliation
extends java.lang.Object
implements org.jivesoftware.smack.packet.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 XMPPConnection.

Author:
Robin Collier

Nested Class Summary
static class Affiliation.Type
           
 
Constructor Summary
Affiliation(java.lang.String nodeId, Affiliation.Type affiliation)
          Constructs an affiliation.
 
Method Summary
 java.lang.String getElementName()
           
 java.lang.String getNamespace()
           
 java.lang.String getNodeId()
           
 Affiliation.Type getType()
           
 java.lang.String toXML()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.
Method Detail

getNodeId

public java.lang.String getNodeId()

getType

public Affiliation.Type getType()

getElementName

public java.lang.String getElementName()
Specified by:
getElementName in interface org.jivesoftware.smack.packet.PacketExtension

getNamespace

public java.lang.String getNamespace()
Specified by:
getNamespace in interface org.jivesoftware.smack.packet.PacketExtension

toXML

public java.lang.String toXML()
Specified by:
toXML in interface org.jivesoftware.smack.packet.PacketExtension