public class MUCUser extends Object implements ExtensionElement
Modifier and Type | Class and Description |
---|---|
static class |
MUCUser.Decline
Represents a rejection to an invitation from another user to a room.
|
static class |
MUCUser.Invite
Represents an invitation for another user to a room.
|
static class |
MUCUser.Status
Status code assists in presenting notification messages.
|
Modifier and Type | Field and Description |
---|---|
static String |
ELEMENT |
static String |
NAMESPACE |
Constructor and Description |
---|
MUCUser() |
Modifier and Type | Method and Description |
---|---|
void |
addStatusCode(MUCUser.Status status)
Add a status code which hold a code that assists in presenting notification messages.
|
void |
addStatusCodes(Set<MUCUser.Status> statusCodes)
Add the status codes which holds the codes that assists in presenting notification messages.
|
static MUCUser |
from(Stanza packet)
Retrieve the MUCUser PacketExtension from packet, if any.
|
MUCUser.Decline |
getDecline()
Returns the rejection to an invitation from another user to a room.
|
Destroy |
getDestroy()
Returns the notification that the room has been destroyed.
|
String |
getElementName()
Returns the root element name.
|
static MUCUser |
getFrom(Stanza packet)
Deprecated.
use
from(Stanza) instead |
MUCUser.Invite |
getInvite()
Returns the invitation for another user to a room.
|
MUCItem |
getItem()
Returns the item child that holds information about roles, affiliation, jids and nicks.
|
String |
getNamespace()
Returns the root element XML namespace.
|
String |
getPassword()
Returns the password to use to enter Password-Protected Room.
|
Set<MUCUser.Status> |
getStatus()
Returns a set of status which holds the status code that assist in presenting notification messages.
|
boolean |
hasStatus()
Returns true if this MUCUser instance has also
MUCUser.Status information. |
void |
setDecline(MUCUser.Decline decline)
Sets the rejection to an invitation from another user to a room.
|
void |
setDestroy(Destroy destroy)
Sets the notification that the room has been destroyed.
|
void |
setInvite(MUCUser.Invite invite)
Sets the invitation for another user to a room.
|
void |
setItem(MUCItem item)
Sets the item child that holds information about roles, affiliation, jids and nicks.
|
void |
setPassword(String string)
Sets the password to use to enter Password-Protected Room.
|
XmlStringBuilder |
toXML()
Returns the XML representation of this Element.
|
public static final String ELEMENT
public static final String NAMESPACE
public MUCUser()
public String getElementName()
NamedElement
getElementName
in interface NamedElement
public String getNamespace()
ExtensionElement
getNamespace
in interface ExtensionElement
public XmlStringBuilder toXML()
Element
public MUCUser.Invite getInvite()
public MUCUser.Decline getDecline()
public MUCItem getItem()
public String getPassword()
public Set<MUCUser.Status> getStatus()
public boolean hasStatus()
MUCUser.Status
information.
If true
is returned, then getStatus()
will return a non-empty set.
public Destroy getDestroy()
public void setInvite(MUCUser.Invite invite)
invite
- the invitation for another user to a room.public void setDecline(MUCUser.Decline decline)
decline
- the rejection to an invitation from another user to a room.public void setItem(MUCItem item)
item
- the item child that holds information about roles, affiliation, jids and nicks.public void setPassword(String string)
string
- the password to use to enter Password-Protected Room.public void addStatusCodes(Set<MUCUser.Status> statusCodes)
statusCodes
- the status codes which hold the codes that assists in presenting notification
messages.public void addStatusCode(MUCUser.Status status)
status
- the status code which olds a code that assists in presenting notification messages.public void setDestroy(Destroy destroy)
destroy
- the notification that the room has been destroyed.@Deprecated public static MUCUser getFrom(Stanza packet)
from(Stanza)
insteadpacket
- null