Package rocks.xmpp.extensions.muc.model
Class RoomConfiguration.Builder
- java.lang.Object
-
- rocks.xmpp.extensions.data.model.DataForm.Builder<RoomConfiguration.Builder>
-
- rocks.xmpp.extensions.muc.model.RoomConfiguration.Builder
-
- Enclosing class:
- RoomConfiguration
public static final class RoomConfiguration.Builder extends DataForm.Builder<RoomConfiguration.Builder>
A builder to build a room configuration. The form is of typeDataForm.Type.SUBMIT
by default.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RoomConfiguration.Builder
administrators(Collection<Jid> admins)
Full list of room admins.RoomConfiguration
build()
Builds the room configuration.RoomConfiguration.Builder
changeSubjectAllowed(boolean changeSubjectAllowed)
Whether to allow occupants to change subject.RoomConfiguration.Builder
description(String description)
Short description of room.RoomConfiguration.Builder
invitesAllowed(boolean invitesAllowed)
Whether to allow occupants to invite othersRoomConfiguration.Builder
language(Locale language)
Natural language for room discussions.RoomConfiguration.Builder
loggingEnabled(boolean loggingEnabled)
Whether to enable public logging of room conversations.RoomConfiguration.Builder
maxHistoryMessages(int maxHistoryMessages)
Sets the maximum number of history messages returned by the room.RoomConfiguration.Builder
maxUsers(Integer maxUsers)
Maximum number of room occupants.RoomConfiguration.Builder
membersOnly(boolean membersOnly)
Whether to make room members-only.RoomConfiguration.Builder
moderated(boolean moderated)
Whether to make room moderated.RoomConfiguration.Builder
name(String name)
Natural-language room name.RoomConfiguration.Builder
owners(Collection<Jid> owners)
Full list of room owners.RoomConfiguration.Builder
password(String password)
The room password.RoomConfiguration.Builder
passwordProtected(boolean passwordProtected)
Whether a password is required to enter.RoomConfiguration.Builder
persistent(boolean persistent)
Whether to make room persistent.RoomConfiguration.Builder
publicRoom(boolean publicRoom)
Whether to allow public searching for room.RoomConfiguration.Builder
pubSubNode(URI pubsubNode)
XMPP URI of associated publish-subcribe node.RoomConfiguration.Builder
rolesForWhichPresenceIsBroadcast(Collection<Role> roles)
Roles for which presence is broadcast.RoomConfiguration.Builder
rolesThatMayDiscoverRealJids(Collection<Role> roles)
Roles that may discover real JIDs of occupants.RoomConfiguration.Builder
rolesThatMayRetrieveMemberList(Collection<Role> rolesThatMayRetrieveMemberList)
Roles that may retrieve member list.RoomConfiguration.Builder
rolesThatMaySendPrivateMessages(Collection<Role> rolesThatMaySendPrivateMessages)
Roles that may send private messages.-
Methods inherited from class rocks.xmpp.extensions.data.model.DataForm.Builder
fields, formType, instructions, items, pages, reportedFields, title, type
-
-
-
-
Method Detail
-
maxHistoryMessages
public RoomConfiguration.Builder maxHistoryMessages(int maxHistoryMessages)
Sets the maximum number of history messages returned by the room.- Parameters:
maxHistoryMessages
- The maximum number of history messages returned by the room.- Returns:
- The builder.
-
rolesThatMaySendPrivateMessages
public RoomConfiguration.Builder rolesThatMaySendPrivateMessages(Collection<Role> rolesThatMaySendPrivateMessages)
Roles that may send private messages.- Parameters:
rolesThatMaySendPrivateMessages
- The roles.- Returns:
- The builder.
-
invitesAllowed
public RoomConfiguration.Builder invitesAllowed(boolean invitesAllowed)
Whether to allow occupants to invite others- Parameters:
invitesAllowed
- Whether to allow occupants to invite others- Returns:
- The builder.
-
changeSubjectAllowed
public RoomConfiguration.Builder changeSubjectAllowed(boolean changeSubjectAllowed)
Whether to allow occupants to change subject.- Parameters:
changeSubjectAllowed
- Whether to allow occupants to change subject.- Returns:
- The builder.
-
loggingEnabled
public RoomConfiguration.Builder loggingEnabled(boolean loggingEnabled)
Whether to enable public logging of room conversations.- Parameters:
loggingEnabled
- Whether to enable public logging of room conversations.- Returns:
- The builder.
-
rolesThatMayRetrieveMemberList
public RoomConfiguration.Builder rolesThatMayRetrieveMemberList(Collection<Role> rolesThatMayRetrieveMemberList)
Roles that may retrieve member list.- Parameters:
rolesThatMayRetrieveMemberList
- Roles that may retrieve member list.- Returns:
- The builder.
-
language
public RoomConfiguration.Builder language(Locale language)
Natural language for room discussions.- Parameters:
language
- The language.- Returns:
- The builder.
-
pubSubNode
public RoomConfiguration.Builder pubSubNode(URI pubsubNode)
XMPP URI of associated publish-subcribe node.- Parameters:
pubsubNode
- The URI.- Returns:
- The builder.
-
maxUsers
public RoomConfiguration.Builder maxUsers(Integer maxUsers)
Maximum number of room occupants.- Parameters:
maxUsers
- The max users.- Returns:
- The builder.
-
membersOnly
public RoomConfiguration.Builder membersOnly(boolean membersOnly)
Whether to make room members-only.- Parameters:
membersOnly
- Whether to make room members-only.- Returns:
- The builder.
-
moderated
public RoomConfiguration.Builder moderated(boolean moderated)
Whether to make room moderated.- Parameters:
moderated
- Whether to make room moderated.- Returns:
- The builder.
-
passwordProtected
public RoomConfiguration.Builder passwordProtected(boolean passwordProtected)
Whether a password is required to enter.- Parameters:
passwordProtected
- Whether a password is required to enter.- Returns:
- The builder.
-
persistent
public RoomConfiguration.Builder persistent(boolean persistent)
Whether to make room persistent.- Parameters:
persistent
- Whether to maker room persistent.- Returns:
- The builder.
-
rolesForWhichPresenceIsBroadcast
public RoomConfiguration.Builder rolesForWhichPresenceIsBroadcast(Collection<Role> roles)
Roles for which presence is broadcast.- Parameters:
roles
- Roles for which presence is broadcast.- Returns:
- The builder.
-
publicRoom
public RoomConfiguration.Builder publicRoom(boolean publicRoom)
Whether to allow public searching for room.- Parameters:
publicRoom
- Whether to allow public searching for room.- Returns:
- The builder.
-
administrators
public RoomConfiguration.Builder administrators(Collection<Jid> admins)
Full list of room admins.- Parameters:
admins
- The admins.- Returns:
- The builder.
-
description
public RoomConfiguration.Builder description(String description)
Short description of room.- Parameters:
description
- The description.- Returns:
- The builder.
-
name
public RoomConfiguration.Builder name(String name)
Natural-language room name.- Parameters:
name
- The name.- Returns:
- The builder.
-
owners
public RoomConfiguration.Builder owners(Collection<Jid> owners)
Full list of room owners.- Parameters:
owners
- Full list of room owners.- Returns:
- The builder.
-
password
public RoomConfiguration.Builder password(String password)
The room password.- Parameters:
password
- The password.- Returns:
- The builder.
-
rolesThatMayDiscoverRealJids
public RoomConfiguration.Builder rolesThatMayDiscoverRealJids(Collection<Role> roles)
Roles that may discover real JIDs of occupants.- Parameters:
roles
- Roles that may discover real JIDs of occupants.- Returns:
- The builder.
-
build
public RoomConfiguration build()
Builds the room configuration.- Returns:
- The room configuration.
-
-