Class IQExtendedChannelSearchHandler
java.lang.Object
org.jivesoftware.openfire.muc.spi.IQExtendedChannelSearchHandler
This class adds support for the search functionality for MUC rooms as defined in XEP-0433: Extended Channel Search.
- Author:
- Guus der Kinderen, guus.der.kinderen@gmail.com
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static SystemProperty<Boolean>
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
ConstructorsConstructorDescriptionIQExtendedChannelSearchHandler
(MultiUserChatService mucService) Creates a new instance of the search provider. -
Method Summary
Modifier and TypeMethodDescriptionorg.xmpp.packet.IQ
handleIQ
(org.xmpp.packet.IQ iq) Constructs an answer on a IQ stanza that contains a search request.protected List<MUCRoomSearchInfo>
searchForChatrooms
(org.jivesoftware.openfire.muc.spi.IQExtendedChannelSearchHandler.SearchParameters params) static List<MUCRoomSearchInfo>
sortByAddress
(List<MUCRoomSearchInfo> mucs) Order the provided list by JID of the MUCstatic List<MUCRoomSearchInfo>
Sorts the provided list in such a way that the MUC with the most users will be the first one in the list.
-
Field Details
-
VAR_ALL
- See Also:
-
VAR_SINNAME
- See Also:
-
VAR_Q
- See Also:
-
VAR_SINDESCRIPTION
- See Also:
-
VAR_SINADDRESS
- See Also:
-
VAR_MIN_USERS
- See Also:
-
VAR_KEY
- See Also:
-
ERRORMESSAGE_UNSUPPORTED_KEY_VALUE
- See Also:
-
PROPERTY_ENABLED
-
REQUEST_ELEMENT_NAME
- See Also:
-
RESPONSE_ELEMENT_NAME
- See Also:
-
NAMESPACE
- See Also:
-
SEARCH_FORM_TYPE
- See Also:
-
-
Constructor Details
-
IQExtendedChannelSearchHandler
Creates a new instance of the search provider.- Parameters:
mucService
- The server for which to return search results.
-
-
Method Details
-
handleIQ
public org.xmpp.packet.IQ handleIQ(org.xmpp.packet.IQ iq) Constructs an answer on a IQ stanza that contains a search request. The answer will be an IQ stanza of type 'result' or 'error'.- Parameters:
iq
- The IQ stanza that is the search request.- Returns:
- An answer to the provided request.
-
searchForChatrooms
protected List<MUCRoomSearchInfo> searchForChatrooms(org.jivesoftware.openfire.muc.spi.IQExtendedChannelSearchHandler.SearchParameters params) -
sortByAddress
Order the provided list by JID of the MUC- Parameters:
mucs
- The unordered list that will be sorted.- Returns:
- The order list of MUC rooms.
-
sortByUserAmount
Sorts the provided list in such a way that the MUC with the most users will be the first one in the list. Rooms with equal amounts of users are ordered by JID.- Parameters:
mucs
- The unordered list that will be sorted.- Returns:
- The sorted list of MUC rooms.
-