Package org.jivesoftware.smackx.pubsub
Class Affiliation
java.lang.Object
org.jivesoftware.smackx.pubsub.Affiliation
- All Implemented Interfaces:
org.jivesoftware.smack.packet.Element,org.jivesoftware.smack.packet.NamedElement,org.jivesoftware.smack.packet.XmlElement,org.jivesoftware.smack.packet.XmlLangElement
Represents a affiliation between a user and a node, where the
Affiliation.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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAffiliation(String node, Affiliation.Type affiliation) Constructs an affiliation.Affiliation(String node, Affiliation.Type affiliation, Affiliation.AffiliationNamespace namespace) Constructs an affiliation.Affiliation(org.jxmpp.jid.BareJid jid, Affiliation.Type affiliation) Construct a affiliation modification request.Affiliation(org.jxmpp.jid.BareJid jid, Affiliation.Type affiliation, Affiliation.AffiliationNamespace namespace) -
Method Summary
Modifier and TypeMethodDescriptionorg.jxmpp.jid.BareJidgetJid()getNode()Deprecated.getType()Deprecated.usegetAffiliation()instead.booleanCheck if this is an affiliation element to modify affiliations on a node.org.jivesoftware.smack.util.XmlStringBuildertoXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jivesoftware.smack.packet.Element
toXML, toXMLMethods inherited from interface org.jivesoftware.smack.packet.XmlElement
getLanguage, getQName
-
Field Details
-
ELEMENT
- See Also:
-
-
Constructor Details
-
Affiliation
Constructs an affiliation.- Parameters:
node- The node the user is affiliated with.affiliation- the optional affiliation.
-
Affiliation
public Affiliation(String node, Affiliation.Type affiliation, Affiliation.AffiliationNamespace namespace) Constructs an affiliation.- Parameters:
node- The node the user is affiliated with.affiliation- the optional affiliation.namespace- the affiliation's namespace.
-
Affiliation
Construct a affiliation modification request.- Parameters:
jid- TODO javadoc me pleaseaffiliation- TODO javadoc me please
-
Affiliation
public Affiliation(org.jxmpp.jid.BareJid jid, Affiliation.Type affiliation, Affiliation.AffiliationNamespace namespace)
-
-
Method Details
-
getNodeId
Deprecated.usegetNode()instead.Get the node.- Returns:
- the node.
-
getNode
-
getType
Deprecated.usegetAffiliation()instead.Get the type.- Returns:
- the type.
-
getAffiliation
-
getJid
public org.jxmpp.jid.BareJid getJid() -
getElementName
- Specified by:
getElementNamein interfaceorg.jivesoftware.smack.packet.NamedElement
-
getNamespace
- Specified by:
getNamespacein interfaceorg.jivesoftware.smack.packet.XmlElement
-
getPubSubNamespace
-
isAffiliationModification
public boolean isAffiliationModification()Check if this is an affiliation element to modify affiliations on a node.- Returns:
trueif this is an affiliation element to modify affiliations on a node,falseotherwise.- Since:
- 4.2
-
toXML
public org.jivesoftware.smack.util.XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) - Specified by:
toXMLin interfaceorg.jivesoftware.smack.packet.Element
-
getNode()instead.