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 TypeMethodDescriptionvoid
addGroupName
(String groupName) Adds a group name.boolean
Returns 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.int
hashCode()
boolean
Returns the roster item pre-approval state.boolean
void
removeGroupName
(String groupName) Removes a group name.void
setApproved
(boolean approved) Sets the roster item pre-approval state.void
setItemType
(RosterPacket.ItemType itemType) Sets the roster item type.void
Sets the user's name.void
setSubscriptionPending
(boolean subscriptionPending) toXML
(XmlEnvironment enclosingNamespace) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods 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: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.
-
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.