Class RosterPacket.Item
java.lang.Object
org.jivesoftware.smack.roster.packet.RosterPacket.Item
- All Implemented Interfaces:
Element,ExtensionElement,NamedElement,XmlElement,XmlLangElement
- Enclosing class:
- RosterPacket
A roster item, which consists of a JID, their name, the type of subscription, and
the groups the roster item belongs to.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGroupName(String groupName) Adds a group name.booleanReturns the root element name.Returns an unmodifiable set of the group names that the roster item belongs to.Returns the roster item type.getJid()Returns the JID of this item.getName()Returns the user's name.Returns the root element XML namespace.getUser()Deprecated.inthashCode()booleanReturns the roster item pre-approval state.booleanvoidremoveGroupName(String groupName) Removes a group name.voidsetApproved(boolean approved) Sets the roster item pre-approval state.voidsetItemType(RosterPacket.ItemType itemType) Sets the roster item type.voidSets the user's name.voidsetSubscriptionPending(boolean subscriptionPending) toXML(XmlEnvironment enclosingNamespace) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jivesoftware.smack.packet.XmlElement
getLanguage, getQName
-
Field Details
-
ELEMENT
The constant value ""item"".- See Also:
-
QNAME
-
GROUP
- See Also:
-
-
Constructor Details
-
Item
Creates a new roster item.- Parameters:
jid- TODO javadoc me pleasename- TODO javadoc me please
-
Item
Creates a new roster item.- Parameters:
jid- the jid.name- the user's name.subscriptionPending- TODO javadoc me please
-
-
Method Details
-
getElementName
Description copied from interface:NamedElementReturns the root element name.- Specified by:
getElementNamein interfaceNamedElement- Returns:
- the element name.
-
getNamespace
Description copied from interface:XmlElementReturns the root element XML namespace.- Specified by:
getNamespacein interfaceXmlElement- Returns:
- the namespace.
-
getUser
Deprecated.usegetJid()instead.Returns the user.- Returns:
- the user.
-
getJid
Returns the JID of this item.- Returns:
- the JID.
-
getName
Returns the user's name.- Returns:
- the user's name.
-
setName
Sets the user's name.- Parameters:
name- the user's name.
-
getItemType
Returns the roster item type.- Returns:
- the roster item type.
-
setItemType
Sets the roster item type.- Parameters:
itemType- the roster item type.
-
setSubscriptionPending
-
isSubscriptionPending
-
isApproved
Returns the roster item pre-approval state.- Returns:
- the pre-approval state.
-
setApproved
Sets the roster item pre-approval state.- Parameters:
approved- the pre-approval flag.
-
getGroupNames
Returns an unmodifiable set of the group names that the roster item belongs to.- Returns:
- an unmodifiable set of the group names.
-
addGroupName
Adds a group name.- Parameters:
groupName- the group name.
-
removeGroupName
Removes a group name.- Parameters:
groupName- the group name.
-
toXML
-
hashCode
-
equals
-
getJid()instead.