Package org.jivesoftware.smackx.pubsub
Class Affiliation
- java.lang.Object
-
- org.jivesoftware.smackx.pubsub.Affiliation
-
- All Implemented Interfaces:
Element,ExtensionElement,FullyQualifiedElement,NamedElement,XmlLangElement
public class Affiliation extends java.lang.Object implements ExtensionElement
Represents a affiliation between a user and a node, where theAffiliation.Typedefines the type of affiliation. Affiliations are retrieved from thePubSubManager.getAffiliations()method, which gets affiliations for the calling user, based on the identity that is associated with theXMPPConnection.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAffiliation.AffiliationNamespacestatic classAffiliation.Type
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringELEMENT
-
Constructor Summary
Constructors Constructor Description Affiliation(java.lang.String node, Affiliation.Type affiliation)Constructs an affiliation.Affiliation(java.lang.String node, Affiliation.Type affiliation, Affiliation.AffiliationNamespace namespace)Constructs an affiliation.Affiliation(BareJid jid, Affiliation.Type affiliation)Construct a affiliation modification request.Affiliation(BareJid jid, Affiliation.Type affiliation, Affiliation.AffiliationNamespace namespace)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Affiliation.TypegetAffiliation()java.lang.StringgetElementName()Returns the root element name.BareJidgetJid()java.lang.StringgetNamespace()Returns the root element XML namespace.java.lang.StringgetNode()java.lang.StringgetNodeId()Deprecated.usegetNode()instead.PubSubNamespacegetPubSubNamespace()Affiliation.TypegetType()Deprecated.usegetAffiliation()instead.booleanisAffiliationModification()Check if this is an affiliation element to modify affiliations on a node.XmlStringBuildertoXML(XmlEnvironment enclosingNamespace)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smack.packet.FullyQualifiedElement
getLanguage, getQName
-
-
-
-
Field Detail
-
ELEMENT
public static final java.lang.String ELEMENT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Affiliation
public Affiliation(java.lang.String node, Affiliation.Type affiliation)
Constructs an affiliation.- Parameters:
node- The node the user is affiliated with.affiliation- the optional affiliation.
-
Affiliation
public Affiliation(java.lang.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
public Affiliation(BareJid jid, Affiliation.Type affiliation)
Construct a affiliation modification request.- Parameters:
jid- TODO javadoc me pleaseaffiliation- TODO javadoc me please
-
Affiliation
public Affiliation(BareJid jid, Affiliation.Type affiliation, Affiliation.AffiliationNamespace namespace)
-
-
Method Detail
-
getNodeId
@Deprecated public java.lang.String getNodeId()
Deprecated.usegetNode()instead.Get the node.- Returns:
- the node.
-
getNode
public java.lang.String getNode()
-
getType
@Deprecated public Affiliation.Type getType()
Deprecated.usegetAffiliation()instead.Get the type.- Returns:
- the type.
-
getAffiliation
public Affiliation.Type getAffiliation()
-
getElementName
public java.lang.String getElementName()
Description copied from interface:NamedElementReturns the root element name.- Specified by:
getElementNamein interfaceNamedElement- Returns:
- the element name.
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:FullyQualifiedElementReturns the root element XML namespace.- Specified by:
getNamespacein interfaceFullyQualifiedElement- Returns:
- the namespace.
-
getPubSubNamespace
public PubSubNamespace 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 XmlStringBuilder toXML(XmlEnvironment enclosingNamespace)
-
-