public class IQOwnerHandler extends ObjectA handler for the IQ packet with namespace http://jabber.org/protocol/muc#owner. This kind of packets are usually sent by room owners. So this handler provides the necessary functionality to support owner requirements such as: room configuration and room destruction.
- Gaston Dombiak
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description
handleIQ(org.xmpp.packet.IQ packet, MUCRole role)Handles the IQ packet sent by an owner of the room.
parseFirstValueAsBoolean(org.xmpp.forms.FormField field, boolean defaultValue)Deprecated.Use FormField#parseFirstValueAsBoolean(String) provided by Tinder version 1.3.1 or newer.
public void handleIQ(org.xmpp.packet.IQ packet, MUCRole role) throws ForbiddenException, ConflictException, CannotBeInvitedException, NotAcceptableExceptionHandles the IQ packet sent by an owner of the room. Possible actions are:
- Return the list of owners
- Return the list of admins
- Change user's affiliation to owner
- Change user's affiliation to admin
- Change user's affiliation to member
- Change user's affiliation to none
- Destroy the room
- Return the room configuration within a dataform
- Update the room configuration based on the sent dataform
packet- the IQ packet sent by an owner of the room.
role- the role of the user that sent the packet.
ForbiddenException- if the user does not have enough permissions (ie. is not an owner).
ConflictException- If the room was going to lose all of its owners.
NotAcceptableException- if the room requires a password that was not supplied
@Deprecated public static boolean parseFirstValueAsBoolean(org.xmpp.forms.FormField field, boolean defaultValue)Use FormField#parseFirstValueAsBoolean(String) provided by Tinder version 1.3.1 or newer.Returns the first value of the formfield as a boolean.
field- A form field (cannot be null)
defaultValue- Returned if first value is null or empty.
- true if the provided input equals '1' or 'true', false if the input equals '0' or 'false'.
IllegalArgumentException- when the input cannot be parsed as a boolean.