public final class RoomConfiguration extends Object
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() |
Collection<rocks.xmpp.addr.Jid> |
getAdministrators()
Gets the administrators.
|
DataForm |
getDataForm()
Gets the underlying form.
|
String |
getDescription()
Gets a short description.
|
Locale |
getLanguage()
Gets the natural language for room discussions.
|
Integer |
getMaxHistoryMessages()
Gets the maximum number of history messages returned by the room.
|
Integer |
getMaxUsers()
Gets the maximum number of room occupants.
|
String |
getName()
Gets the natural-language room name.
|
Collection<rocks.xmpp.addr.Jid> |
getOwners()
Gets the owners.
|
String |
getPassword()
Gets the room password.
|
URI |
getPubSubNode()
Gets the XMPP URI of associated publish-subscribe node.
|
Collection<Role> |
getRolesForWhichPresenceIsBroadcast()
Gets the roles for which presence is broadcast.
|
Collection<Role> |
getRolesThatMayDiscoverRealJids()
Get the roles, which may discover real JIDs.
|
Collection<Role> |
getRolesThatMayRetrieveMemberList()
Gets the roles which may retrieve member list.
|
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 Integer getMaxHistoryMessages()
public Collection<Role> getRolesThatMaySendPrivateMessages()
public boolean isInvitesAllowed()
public boolean isChangeSubjectAllowed()
public boolean isLoggingEnabled()
public Collection<Role> getRolesThatMayRetrieveMemberList()
public Locale getLanguage()
public URI getPubSubNode()
public Integer getMaxUsers()
public boolean isMembersOnly()
public boolean isModerated()
public boolean isPasswordProtected()
public boolean isPersistent()
public Collection<Role> getRolesForWhichPresenceIsBroadcast()
public boolean isPublicRoom()
public Collection<rocks.xmpp.addr.Jid> getAdministrators()
public String getDescription()
public String getName()
public Collection<rocks.xmpp.addr.Jid> getOwners()
public String getPassword()
public Collection<Role> getRolesThatMayDiscoverRealJids()
public DataForm getDataForm()
Copyright © 2014–2016 XMPP.rocks. All rights reserved.