public final class RoomConfiguration
extends java.lang.Object
Represents a standardized DataForm
with form type http://jabber.org/protocol/muc#roomconfig
, which can be used to configure a MUC room.
DataForm
to retrieve standard data from it, use:
RoomConfiguration roomConfiguration = new RoomConfiguration(dataForm);
To build a form:
RoomConfiguration roomConfiguration = RoomConfiguration.builder()
.maxHistoryMessages(4)
.rolesThatMaySendPrivateMessages(Arrays.asList(Role.MODERATOR, Role.PARTICIPANT))
.invitesAllowed(true)
.changeSubjectAllowed(true)
.loggingEnabled(true)
.rolesThatMayRetrieveMemberList(Collections.singleton(Role.PARTICIPANT))
.language("en")
.pubSubNode(URI.create("xmpp:pubsub.shakespeare.lit?;node=princely_musings"))
.maxUsers(30)
.membersOnly(true)
.moderated(true)
.passwordProtected(true)
.persistent(true)
.rolesForWhichPresenceIsBroadcast(Arrays.asList(Role.MODERATOR, Role.PARTICIPANT))
.publicRoom(true)
.administrators(Arrays.asList(Jid.of("admin1"), Jid.of("admin2")))
.description("description")
.name("name")
.owners(Arrays.asList(Jid.of("owner1"), Jid.of("owner2")))
.password("pass")
.rolesThatMayDiscoverRealJids(EnumSet.of(Role.MODERATOR))
.build();
Modifier and Type | Class and Description |
---|---|
static class |
RoomConfiguration.Builder
A builder to build a room configuration.
|
Constructor and Description |
---|
RoomConfiguration(DataForm dataForm) |
Modifier and Type | Method and Description |
---|---|
static RoomConfiguration.Builder |
builder() |
java.util.Collection<Jid> |
getAdministrators()
Gets the administrators.
|
DataForm |
getDataForm()
Gets the underlying form.
|
java.lang.String |
getDescription()
Gets a short description.
|
java.util.Locale |
getLanguage()
Gets the natural language for room discussions.
|
java.lang.Integer |
getMaxHistoryMessages()
Gets the maximum number of history messages returned by the room.
|
java.lang.Integer |
getMaxUsers()
Gets the maximum number of room occupants.
|
java.lang.String |
getName()
Gets the natural-language room name.
|
java.util.Collection<Jid> |
getOwners()
Gets the owners.
|
java.lang.String |
getPassword()
Gets the room password.
|
java.net.URI |
getPubSubNode()
Gets the XMPP URI of associated publish-subscribe node.
|
java.util.Collection<Role> |
getRolesForWhichPresenceIsBroadcast()
Gets the roles for which presence is broadcast.
|
java.util.Collection<Role> |
getRolesThatMayDiscoverRealJids()
Get the roles, which may discover real JIDs.
|
java.util.Collection<Role> |
getRolesThatMayRetrieveMemberList()
Gets the roles which may retrieve member list.
|
java.util.Collection<Role> |
getRolesThatMaySendPrivateMessages()
Gets the roles that may send private messages.
|
boolean |
isChangeSubjectAllowed()
Indicates, whether to allow occupants to change subject.
|
boolean |
isInvitesAllowed()
Indicates, whether to allow occupants to invite others.
|
boolean |
isLoggingEnabled()
Indicates, whether to enable public logging of room conversations.
|
boolean |
isMembersOnly()
Indicates, whether the room is members-only.
|
boolean |
isModerated()
Indicates, whether the room is moderated.
|
boolean |
isPasswordProtected()
Indicates, whether the room is password protected.
|
boolean |
isPersistent()
Indicates, whether the room is persistent.
|
boolean |
isPublicRoom()
Indicates, whether the room is public.
|
public RoomConfiguration(DataForm dataForm)
public static RoomConfiguration.Builder builder()
public java.lang.Integer getMaxHistoryMessages()
Gets the maximum number of history messages returned by the room.
public java.util.Collection<Role> getRolesThatMaySendPrivateMessages()
Gets the roles that may send private messages.
public boolean isInvitesAllowed()
Indicates, whether to allow occupants to invite others.
public boolean isChangeSubjectAllowed()
Indicates, whether to allow occupants to change subject.
public boolean isLoggingEnabled()
Indicates, whether to enable public logging of room conversations.
public java.util.Collection<Role> getRolesThatMayRetrieveMemberList()
Gets the roles which may retrieve member list.
public java.util.Locale getLanguage()
Gets the natural language for room discussions.
public java.net.URI getPubSubNode()
Gets the XMPP URI of associated publish-subscribe node.
public java.lang.Integer getMaxUsers()
Gets the maximum number of room occupants.
public boolean isMembersOnly()
Indicates, whether the room is members-only.
public boolean isModerated()
Indicates, whether the room is moderated.
public boolean isPasswordProtected()
Indicates, whether the room is password protected.
public boolean isPersistent()
Indicates, whether the room is persistent.
public java.util.Collection<Role> getRolesForWhichPresenceIsBroadcast()
Gets the roles for which presence is broadcast.
public boolean isPublicRoom()
Indicates, whether the room is public.
public java.util.Collection<Jid> getAdministrators()
Gets the administrators.
public java.lang.String getDescription()
Gets a short description.
public java.lang.String getName()
Gets the natural-language room name.
public java.util.Collection<Jid> getOwners()
Gets the owners.
public java.lang.String getPassword()
Gets the room password.
public java.util.Collection<Role> getRolesThatMayDiscoverRealJids()
Get the roles, which may discover real JIDs.
public DataForm getDataForm()
Gets the underlying form.
Copyright © 2014–2019 XMPP.rocks. All rights reserved.