|
Wildfire 3.1.1 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jivesoftware.wildfire.muc.spi.MUCRoomImpl
public class MUCRoomImpl
Simple in-memory implementation of a chatroom. A MUCRoomImpl could represent a persistent room which means that its configuration will be maintained in synch with its representation in the database.
| Method Summary | |
|---|---|
List<Presence> |
addAdmin(String bareJID,
MUCRole sendRole)
Adds a new user to the list of admins. |
List<Presence> |
addAdmins(List<String> newAdmins,
MUCRole senderRole)
Adds a list of users to the list of admins. |
void |
addFirstOwner(String bareJID)
Adds a new user to the list of owners. |
List<Presence> |
addMember(String bareJID,
String nickname,
MUCRole sendRole)
Adds a new user to the list of members. |
Presence |
addModerator(JID jid,
MUCRole senderRole)
Changes the role of the user within the room to moderator. |
List<Presence> |
addNone(String bareJID,
MUCRole senderRole)
Removes the user from all the other affiliation list thus giving the user a NONE affiliation. |
List<Presence> |
addOutcast(String bareJID,
String reason,
MUCRole senderRole)
Adds a new user to the list of outcast users. |
List<Presence> |
addOwner(String bareJID,
MUCRole sendRole)
Adds a new user to the list of owners. |
List<Presence> |
addOwners(List<String> newOwners,
MUCRole senderRole)
Adds a list of users to the list of owners. |
Presence |
addParticipant(JID jid,
String reason,
MUCRole senderRole)
Changes the role of the user within the room to participant. |
Presence |
addVisitor(JID jid,
MUCRole senderRole)
Changes the role of the user within the room to visitor. |
boolean |
canAnyoneDiscoverJID()
Returns true if every presence packet will include the JID of every occupant. |
boolean |
canBroadcastPresence(String roleToBroadcast)
Returns true if the presences of the requested role will be broadcasted. |
boolean |
canChangeNickname()
Returns true if room occupants are allowed to change their nicknames in the room. |
boolean |
canOccupantsChangeSubject()
Returns true if participants are allowed to change the room's subject. |
boolean |
canOccupantsInvite()
Returns true if occupants can invite other users to the room. |
void |
changeSubject(Message packet,
MUCRole role)
Changes the room's subject if the occupant has enough permissions. |
Presence |
createPresence(Presence.Type presenceType)
Create a new presence in this room for the given role. |
void |
destroyRoom(String alternateJID,
String reason)
Destroys the room. |
Collection<String> |
getAdmins()
Returns a collection with the current list of admins. |
MUCRole.Affiliation |
getAffiliation(String bareJID)
Returns the affiliation state of the user in the room. |
long |
getChatLength()
Returns the total length of the chat session. |
Date |
getCreationDate()
Returns the date when the room was created. |
String |
getDescription()
Returns a description set by the room's owners about the room. |
Date |
getEmptyDate()
Returns the date when the last occupant left the room. |
long |
getID()
Obtain a unique numerical id for this room. |
IQAdminHandler |
getIQAdminHandler()
|
IQOwnerHandler |
getIQOwnerHandler()
|
int |
getMaxUsers()
Returns the maximum number of occupants that can be simultaneously in the room. |
Collection<String> |
getMembers()
Returns a collection with the current list of room members. |
Collection<MUCRole> |
getModerators()
Returns a collection with the current list of room moderators. |
Date |
getModificationDate()
Returns the last date when the room's configuration was modified. |
String |
getName()
Get the name of this room. |
String |
getNaturalLanguageName()
Returns the natural language name of the room. |
MUCRole |
getOccupant(String nickname)
Obtain the role of a given user by nickname. |
MUCRole |
getOccupantByFullJID(JID jid)
Obtain the role of a given user in the room by his full JID. |
Collection<MUCRole> |
getOccupants()
Obtain the roles of all users in the chatroom. |
List<MUCRole> |
getOccupantsByBareJID(String jid)
Obtain the roles of a given user in the room by his bare JID. |
int |
getOccupantsCount()
Returns the number of occupants in the chatroom at the moment. |
Collection<String> |
getOutcasts()
Returns a collection with the current list of outcast users. |
Collection<String> |
getOwners()
Returns a collection with the current list of owners. |
Collection<MUCRole> |
getParticipants()
Returns a collection with the current list of room participants. |
String |
getPassword()
Returns the password that the user must provide to enter the room. |
String |
getReservedNickname(String bareJID)
Returns the reserved room nickname for the bare JID or null if none. |
MUCRole |
getRole()
Obtain the role of the chat server (mainly for addressing messages and presence). |
List<String> |
getRolesToBroadcastPresence()
Returns the list of roles of which presence will be broadcasted to the rest of the occupants. |
MUCRoomHistory |
getRoomHistory()
Returns the history of the room which includes chat transcripts. |
String |
getSubject()
Returns the last subject that some occupant set to the room. |
boolean |
hasOccupant(String nickname)
Determine if a given nickname is taken. |
boolean |
isLocked()
Returns true if the room is locked. |
boolean |
isLogEnabled()
Returns true if the room's conversation is being logged. |
boolean |
isLoginRestrictedToNickname()
Returns true if registered users can only join the room using their registered nickname. |
boolean |
isManuallyLocked()
Returns true if the room is locked and it was locked by a room owner after the room was initially configured. |
boolean |
isMembersOnly()
Returns true if the room requires an invitation to enter. |
boolean |
isModerated()
Returns if the room in which only those with "voice" may send messages to all occupants. |
boolean |
isPasswordProtected()
Returns true if a user cannot enter without first providing the correct password. |
boolean |
isPersistent()
Returns true if the room is not destroyed if the last occupant exits. |
boolean |
isPublicRoom()
Returns true if the room is searchable and visible through service discovery. |
boolean |
isRegistrationEnabled()
Returns true if users are allowed to register with the room. |
MUCRole |
joinRoom(String nickname,
String password,
HistoryRequest historyRequest,
MUCUser user,
Presence presence)
Joins the room using the given nickname. |
Presence |
kickOccupant(JID jid,
JID actorJID,
String reason)
Kicks a user from the room. |
void |
leaveRoom(String nickname)
Remove a member from the chat room. |
void |
lock(MUCRole senderRole)
Locks the room so that users cannot join the room. |
void |
nicknameChanged(String oldNick,
String newNick)
An event callback fired whenever an occupant changes his nickname within the chatroom. |
void |
saveToDB()
Saves the room configuration to the DB. |
void |
send(Packet packet)
Sends a packet to the user. |
void |
sendInvitation(JID to,
String reason,
MUCRole senderRole,
List<org.dom4j.Element> extensions)
Sends an invitation to a user. |
void |
sendInvitationRejection(JID to,
String reason,
JID sender)
Sends the rejection to the inviter. |
void |
sendPrivatePacket(Packet packet,
MUCRole senderRole)
Sends a private packet to a selected occupant. |
void |
sendPublicMessage(Message message,
MUCRole senderRole)
Sends a message to the all the occupants. |
void |
serverBroadcast(String msg)
Broadcast a given message to all members of this chat room. |
void |
setCanAnyoneDiscoverJID(boolean canAnyoneDiscoverJID)
Sets if every presence packet will include the JID of every occupant. |
void |
setCanOccupantsChangeSubject(boolean canOccupantsChangeSubject)
Sets if participants are allowed to change the room's subject. |
void |
setCanOccupantsInvite(boolean canOccupantsInvite)
Sets if occupants can invite other users to the room. |
void |
setChangeNickname(boolean canChange)
Sets if room occupants are allowed to change their nicknames in the room. |
void |
setCreationDate(Date creationDate)
Sets the date when the room was created. |
void |
setDescription(String description)
Sets a description set by the room's owners about the room. |
void |
setEmptyDate(Date emptyDate)
Sets the date when the last occupant left the room. |
void |
setID(long roomID)
Sets a new room ID if the room has just been saved to the database or sets the saved ID of the room in the database while loading the room. |
void |
setLogEnabled(boolean logEnabled)
Sets if the room's conversation is being logged. |
void |
setLoginRestrictedToNickname(boolean restricted)
Sets if registered users can only join the room using their registered nickname. |
void |
setMaxUsers(int maxUsers)
Sets the maximum number of occupants that can be simultaneously in the room. |
List<Presence> |
setMembersOnly(boolean membersOnly)
Sets if the room requires an invitation to enter. |
void |
setModerated(boolean moderated)
Sets if the room in which only those with "voice" may send messages to all occupants. |
void |
setModificationDate(Date modificationDate)
Sets the last date when the room's configuration was modified. |
void |
setNaturalLanguageName(String naturalLanguageName)
Sets the natural language name of the room. |
void |
setPassword(String password)
Sets the password that the user must provide to enter the room. |
void |
setPersistent(boolean persistent)
Sets if the room is not destroyed if the last occupant exits. |
void |
setPublicRoom(boolean publicRoom)
Sets if the room is searchable and visible through service discovery. |
void |
setRegistrationEnabled(boolean registrationEnabled)
Sets if users are allowed to register with the room. |
void |
setRolesToBroadcastPresence(List<String> rolesToBroadcastPresence)
Sets the list of roles of which presence will be broadcasted to the rest of the occupants. |
void |
setSavedToDB(boolean saved)
Sets if the room has already been made persistent. |
void |
setSubject(String subject)
Sets the last subject that some occupant set to the room. |
void |
unlock(MUCRole senderRole)
Unlocks the room so that users can join the room. |
boolean |
wasSavedToDB()
Returns true if the room has already been made persistent. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public String getName()
MUCRoom
getName in interface MUCRoompublic long getID()
MUCRoom
getID in interface MUCRoompublic void setID(long roomID)
MUCRoom
setID in interface MUCRoomroomID - the saved ID of the room in the DB or a new one if the room is being saved to
the DB.public Date getCreationDate()
MUCRoom
getCreationDate in interface MUCRoompublic void setCreationDate(Date creationDate)
MUCRoom
setCreationDate in interface MUCRoomcreationDate - the date when the room was created.public Date getModificationDate()
MUCRoom
getModificationDate in interface MUCRoompublic void setModificationDate(Date modificationDate)
MUCRoom
setModificationDate in interface MUCRoommodificationDate - the last date when the room's configuration was modified.public void setEmptyDate(Date emptyDate)
MUCRoom
setEmptyDate in interface MUCRoomemptyDate - the date when the last occupant left the room or null if there are occupants
in the room.public Date getEmptyDate()
MUCRoom
getEmptyDate in interface MUCRoompublic MUCRole getRole()
MUCRoom
getRole in interface MUCRoom
public MUCRole getOccupant(String nickname)
throws UserNotFoundException
MUCRoom
getOccupant in interface MUCRoomnickname - The nickname of the user you'd like to obtain
UserNotFoundException - If there is no user with the given nickname
public List<MUCRole> getOccupantsByBareJID(String jid)
throws UserNotFoundException
MUCRoom
getOccupantsByBareJID in interface MUCRoomjid - The bare jid of the user you'd like to obtain
UserNotFoundException - If there is no user with the given nickname
public MUCRole getOccupantByFullJID(JID jid)
throws UserNotFoundException
MUCRoom
getOccupantByFullJID in interface MUCRoomjid - The full jid of the user you'd like to obtain
UserNotFoundException - If there is no user with the given nicknamepublic Collection<MUCRole> getOccupants()
MUCRoom
getOccupants in interface MUCRoompublic int getOccupantsCount()
MUCRoom
getOccupantsCount in interface MUCRoompublic boolean hasOccupant(String nickname)
MUCRoom
hasOccupant in interface MUCRoomnickname - The nickname of the user you'd like to obtain
public String getReservedNickname(String bareJID)
MUCRoom
getReservedNickname in interface MUCRoombareJID - The bare jid of the user of which you'd like to obtain his reserved nickname.
public MUCRole.Affiliation getAffiliation(String bareJID)
MUCRoomNote: Prerequisite - A lock must already be obtained before sending this message.
getAffiliation in interface MUCRoombareJID - The bare jid of the user of which you'd like to obtain his affiliation.
public MUCRole joinRoom(String nickname,
String password,
HistoryRequest historyRequest,
MUCUser user,
Presence presence)
throws UnauthorizedException,
UserAlreadyExistsException,
RoomLockedException,
ForbiddenException,
RegistrationRequiredException,
ConflictException,
ServiceUnavailableException,
NotAcceptableException
MUCRoom
joinRoom in interface MUCRoomnickname - The nickname the user wants to use in the chatroom.password - The password provided by the user to enter the chatroom or null if none.historyRequest - The amount of history that the user request or null meaning default.user - The user joining.presence - The presence sent by the user to join the room.
UnauthorizedException - If the user doesn't have permision to join the room.
UserAlreadyExistsException - If the nickname is already taken.
RoomLockedException - If the user is trying to join a locked room.
ForbiddenException - If the user is an outcast.
RegistrationRequiredException - If the user is not a member of a members-only room.
ConflictException - If another user attempts to join the room with a
nickname reserved by the first user.
ServiceUnavailableException - If the user cannot join the room since the max number
of users has been reached.
NotAcceptableException - If the registered user is trying to join with a
nickname different than the reserved nickname.
public void leaveRoom(String nickname)
throws UserNotFoundException
MUCRoom
leaveRoom in interface MUCRoomnickname - The user to remove
UserNotFoundException - If the nickname is not found.
public void destroyRoom(String alternateJID,
String reason)
MUCRoom
destroyRoom in interface MUCRoomalternateJID - the alternate JID. Commonly used to provide a replacement room.reason - the reason why the room was destroyed.
public Presence createPresence(Presence.Type presenceType)
throws UnauthorizedException
MUCRoom
createPresence in interface MUCRoomUnauthorizedException - If the user doesn't have permission to leave the roompublic void serverBroadcast(String msg)
MUCRoom
serverBroadcast in interface MUCRoommsg - The message to broadcast
public void sendPublicMessage(Message message,
MUCRole senderRole)
throws ForbiddenException
MUCRoom
sendPublicMessage in interface MUCRoommessage - The message to send.senderRole - the role of the user that is trying to send a public message.
ForbiddenException - If the user is not allowed to send a public message (i.e. does not
have voice in the room).
public void sendPrivatePacket(Packet packet,
MUCRole senderRole)
throws NotFoundException
MUCRoom
sendPrivatePacket in interface MUCRoompacket - The packet to send.senderRole - the role of the user that is trying to send a public message.
NotFoundException - If the user is sending a packet to a room JID that does not exist.public void send(Packet packet)
MUCRoom
send in interface MUCRoompacket - The packet to sendpublic long getChatLength()
MUCRoom
getChatLength in interface MUCRoompublic void addFirstOwner(String bareJID)
MUCRoomMUCRoom.addOwner(String,MUCRole).
addFirstOwner in interface MUCRoombareJID - The bare JID of the user to add as owner.
public List<Presence> addOwner(String bareJID,
MUCRole sendRole)
throws ForbiddenException
MUCRoom
addOwner in interface MUCRoombareJID - The bare JID of the user to add as owner.sendRole - the role of the user that is trying to modify the owners list.
ForbiddenException - If the user is not allowed to modify the owner list.
public List<Presence> addAdmin(String bareJID,
MUCRole sendRole)
throws ForbiddenException,
ConflictException
MUCRoom
addAdmin in interface MUCRoombareJID - The bare JID of the user to add as admin.sendRole - The role of the user that is trying to modify the admins list.
ForbiddenException - If the user is not allowed to modify the admin list.
ConflictException - If the room was going to lose all its owners.
public List<Presence> addMember(String bareJID,
String nickname,
MUCRole sendRole)
throws ForbiddenException,
ConflictException
MUCRoom
addMember in interface MUCRoombareJID - The bare JID of the user to add as a member.nickname - The reserved nickname of the member for the room or null if none.sendRole - the role of the user that is trying to modify the members list.
ForbiddenException - If the user is not allowed to modify the members list.
ConflictException - If the desired room nickname is already reserved for the room or if
the room was going to lose all its owners.
public List<Presence> addOutcast(String bareJID,
String reason,
MUCRole senderRole)
throws NotAllowedException,
ForbiddenException,
ConflictException
MUCRoom
addOutcast in interface MUCRoombareJID - The bare JID of the user to add as an outcast.reason - The reason why the user was banned.senderRole - The role of the user that initiated the ban.
NotAllowedException - Thrown if trying to ban an owner or an administrator.
ForbiddenException - If the user is not allowed to modify the outcast list.
ConflictException - If the room was going to lose all its owners.
public List<Presence> addNone(String bareJID,
MUCRole senderRole)
throws ForbiddenException,
ConflictException
MUCRoom
addNone in interface MUCRoombareJID - The bare JID of the user to keep with a NONE affiliation.senderRole - The role of the user that set the affiliation to none.
ForbiddenException - If the user is not allowed to modify the none list.
ConflictException - If the room was going to lose all its owners.public boolean isLocked()
MUCRoom
isLocked in interface MUCRoompublic boolean isManuallyLocked()
MUCRoom
isManuallyLocked in interface MUCRoom
public void nicknameChanged(String oldNick,
String newNick)
MUCRoom
nicknameChanged in interface MUCRoomoldNick - old nickname within the room.newNick - new nickname within the room.
public void changeSubject(Message packet,
MUCRole role)
throws ForbiddenException
MUCRoomThe new subject will be added to the history of the room.
changeSubject in interface MUCRoompacket - the sent packet to change the room's subject.role - the role of the user that is trying to change the subject.
ForbiddenException - If the user is not allowed to change the subject.public String getSubject()
MUCRoom
getSubject in interface MUCRoompublic void setSubject(String subject)
MUCRoom
setSubject in interface MUCRoomsubject - the last known subject of the room.
public void sendInvitation(JID to,
String reason,
MUCRole senderRole,
List<org.dom4j.Element> extensions)
throws ForbiddenException
MUCRoom
sendInvitation in interface MUCRoomto - the JID of the user that is being invited.reason - the reason of the invitation or null if none.senderRole - the role of the occupant that sent the invitation.extensions - the list of extensions sent with the original message invitation or null
if none.
ForbiddenException - If the user is not allowed to send the invitation.
public void sendInvitationRejection(JID to,
String reason,
JID sender)
MUCRoom
sendInvitationRejection in interface MUCRoomto - the JID of the user that is originated the invitation.reason - the reason for the rejection or null if none.sender - the JID of the invitee that is rejecting the invitation.public IQOwnerHandler getIQOwnerHandler()
getIQOwnerHandler in interface MUCRoompublic IQAdminHandler getIQAdminHandler()
getIQAdminHandler in interface MUCRoompublic MUCRoomHistory getRoomHistory()
MUCRoom
getRoomHistory in interface MUCRoompublic Collection<String> getOwners()
MUCRoom
getOwners in interface MUCRoompublic Collection<String> getAdmins()
MUCRoom
getAdmins in interface MUCRoompublic Collection<String> getMembers()
MUCRoom
getMembers in interface MUCRoompublic Collection<String> getOutcasts()
MUCRoom
getOutcasts in interface MUCRoompublic Collection<MUCRole> getModerators()
MUCRoom
getModerators in interface MUCRoompublic Collection<MUCRole> getParticipants()
MUCRoom
getParticipants in interface MUCRoom
public Presence addModerator(JID jid,
MUCRole senderRole)
throws ForbiddenException
MUCRoom
addModerator in interface MUCRoomjid - The full JID of the occupant to give moderator privileges.senderRole - The role of the user that is granting moderator privileges to an occupant.
ForbiddenException - If the user is not allowed to grant moderator privileges.
public Presence addParticipant(JID jid,
String reason,
MUCRole senderRole)
throws NotAllowedException,
ForbiddenException
MUCRoom
addParticipant in interface MUCRoomjid - The full JID of the occupant to give participant privileges.reason - The reason why participant privileges were gave to the user or null
if none.senderRole - The role of the user that is granting participant privileges to an occupant.
NotAllowedException - If trying to change the moderator role to an owner or an admin.
ForbiddenException - If the user is not allowed to grant participant privileges.
public Presence addVisitor(JID jid,
MUCRole senderRole)
throws NotAllowedException,
ForbiddenException
MUCRoom
addVisitor in interface MUCRoomjid - the full JID of the occupant to change to visitor.senderRole - the role of the user that is changing the role to visitor.
NotAllowedException - if trying to change the moderator role to an owner or an admin.
ForbiddenException - if the user is not a moderator.
public Presence kickOccupant(JID jid,
JID actorJID,
String reason)
throws NotAllowedException
MUCRoom
kickOccupant in interface MUCRoomjid - The full JID of the kicked user.actorJID - The JID of the actor that initiated the kick.reason - The reason why the user was kicked.
NotAllowedException - Thrown if trying to ban an owner or an administrator.public boolean canAnyoneDiscoverJID()
MUCRoom
canAnyoneDiscoverJID in interface MUCRoompublic void setCanAnyoneDiscoverJID(boolean canAnyoneDiscoverJID)
MUCRoom
setCanAnyoneDiscoverJID in interface MUCRoomcanAnyoneDiscoverJID - boolean that specifies if every presence packet will include the
JID of every occupant.public boolean canOccupantsChangeSubject()
MUCRoom
canOccupantsChangeSubject in interface MUCRoompublic void setCanOccupantsChangeSubject(boolean canOccupantsChangeSubject)
MUCRoom
setCanOccupantsChangeSubject in interface MUCRoomcanOccupantsChangeSubject - boolean that specifies if participants are allowed to
change the room's subject.public boolean canOccupantsInvite()
MUCRoom
canOccupantsInvite in interface MUCRoompublic void setCanOccupantsInvite(boolean canOccupantsInvite)
MUCRoom
setCanOccupantsInvite in interface MUCRoomcanOccupantsInvite - boolean that specified in any occupant can invite other users to
the room.public String getNaturalLanguageName()
MUCRoom
getNaturalLanguageName in interface MUCRoompublic void setNaturalLanguageName(String naturalLanguageName)
MUCRoom
setNaturalLanguageName in interface MUCRoomnaturalLanguageName - the natural language name of the room.public String getDescription()
MUCRoom
getDescription in interface MUCRoompublic void setDescription(String description)
MUCRoom
setDescription in interface MUCRoomdescription - a description set by the room's owners about the room.public boolean isMembersOnly()
MUCRoom
isMembersOnly in interface MUCRoompublic List<Presence> setMembersOnly(boolean membersOnly)
MUCRoom
setMembersOnly in interface MUCRoommembersOnly - if true then the room is members-only.
public boolean isLogEnabled()
MUCRoom
isLogEnabled in interface MUCRoompublic void setLogEnabled(boolean logEnabled)
MUCRoom
setLogEnabled in interface MUCRoomlogEnabled - boolean that specified if the room's conversation must be logged.public void setLoginRestrictedToNickname(boolean restricted)
MUCRoom
setLoginRestrictedToNickname in interface MUCRoomrestricted - if registered users can only join the room using their registered nickname.public boolean isLoginRestrictedToNickname()
MUCRoom
isLoginRestrictedToNickname in interface MUCRoompublic void setChangeNickname(boolean canChange)
MUCRoomNotice that this feature is not supported by the MUC spec so answering a not_acceptable error may break some cliens.
setChangeNickname in interface MUCRoomcanChange - if room occupants are allowed to change their nicknames in the room.public boolean canChangeNickname()
MUCRoomNotice that this feature is not supported by the MUC spec so answering a not_acceptable error may break some cliens.
canChangeNickname in interface MUCRoompublic void setRegistrationEnabled(boolean registrationEnabled)
MUCRoom
setRegistrationEnabled in interface MUCRoomregistrationEnabled - if users are allowed to register with the room.public boolean isRegistrationEnabled()
MUCRoom
isRegistrationEnabled in interface MUCRoompublic int getMaxUsers()
MUCRoom
getMaxUsers in interface MUCRoompublic void setMaxUsers(int maxUsers)
MUCRoom
setMaxUsers in interface MUCRoommaxUsers - the maximum number of occupants that can be simultaneously in the room. Zero
means unlimited number of occupants.public boolean isModerated()
MUCRoom
isModerated in interface MUCRoompublic void setModerated(boolean moderated)
MUCRoom
setModerated in interface MUCRoommoderated - if the room in which only those with "voice" may send messages to all
occupants.public String getPassword()
MUCRoom
getPassword in interface MUCRoompublic void setPassword(String password)
MUCRoom
setPassword in interface MUCRoompassword - the password that the user must provide to enter the room.public boolean isPasswordProtected()
MUCRoom
isPasswordProtected in interface MUCRoompublic boolean isPersistent()
MUCRoom
isPersistent in interface MUCRoompublic boolean wasSavedToDB()
MUCRoom
wasSavedToDB in interface MUCRoompublic void setSavedToDB(boolean saved)
MUCRoom
setSavedToDB in interface MUCRoomsaved - boolean that indicates if the room was saved to the database.public void setPersistent(boolean persistent)
MUCRoom
setPersistent in interface MUCRoompersistent - if the room is not destroyed if the last occupant exits.public boolean isPublicRoom()
MUCRoom
isPublicRoom in interface MUCRoompublic void setPublicRoom(boolean publicRoom)
MUCRoom
setPublicRoom in interface MUCRoompublicRoom - if the room is searchable and visible through service discovery.public List<String> getRolesToBroadcastPresence()
MUCRoom
getRolesToBroadcastPresence in interface MUCRoompublic void setRolesToBroadcastPresence(List<String> rolesToBroadcastPresence)
MUCRoom
setRolesToBroadcastPresence in interface MUCRoomrolesToBroadcastPresence - the list of roles of which presence will be broadcasted to
the rest of the occupants.public boolean canBroadcastPresence(String roleToBroadcast)
MUCRoom
canBroadcastPresence in interface MUCRoomroleToBroadcast - the role to check if its presences will be broadcasted.
public void lock(MUCRole senderRole)
throws ForbiddenException
MUCRoom
lock in interface MUCRoomsenderRole - the role of the occupant that locked the room.
ForbiddenException - If the user is not an owner of the room.
public void unlock(MUCRole senderRole)
throws ForbiddenException
MUCRoom
unlock in interface MUCRoomsenderRole - the role of the occupant that unlocked the room.
ForbiddenException - If the user is not an owner of the room.
public List<Presence> addAdmins(List<String> newAdmins,
MUCRole senderRole)
throws ForbiddenException,
ConflictException
MUCRoom
addAdmins in interface MUCRoomnewAdmins - the list of bare JIDs of the users to add to the list of existing admins.senderRole - the role of the user that is trying to modify the admins list.
ForbiddenException - If the user is not allowed to modify the admin list.
ConflictException - If the room was going to lose all its owners.
public List<Presence> addOwners(List<String> newOwners,
MUCRole senderRole)
throws ForbiddenException
MUCRoom
addOwners in interface MUCRoomnewOwners - the list of bare JIDs of the users to add to the list of existing owners.senderRole - the role of the user that is trying to modify the owners list.
ForbiddenException - If the user is not allowed to modify the owner list.public void saveToDB()
MUCRoom
saveToDB in interface MUCRoom
|
Wildfire 3.1.1 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||