Package org.jivesoftware.smackx.pubsub
Class Affiliation
java.lang.Object
org.jivesoftware.smackx.pubsub.Affiliation
- All Implemented Interfaces:
Element
,NamedElement
,XmlElement
,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
Modifier and TypeClassDescriptionstatic enum
static enum
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAffiliation
(String node, Affiliation.Type affiliation) Constructs an affiliation.Affiliation
(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
Modifier and TypeMethodDescriptionReturns the root element name.getJid()
Returns the root element XML namespace.getNode()
Deprecated.getType()
Deprecated.usegetAffiliation()
instead.boolean
Check if this is an affiliation element to modify affiliations on a node.toXML
(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.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(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
-
getElementName
Description copied from interface:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
getNamespace
Description copied from interface:XmlElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceXmlElement
- Returns:
- the namespace.
-
getPubSubNamespace
-
isAffiliationModification
Check if this is an affiliation element to modify affiliations on a node.- Returns:
true
if this is an affiliation element to modify affiliations on a node,false
otherwise.- Since:
- 4.2
-
toXML
-
getNode()
instead.