Commit 72966962 authored by guus's avatar guus

I'd like MUCRoom to extend another interface (Result). The MUCRoom interface...

I'd like MUCRoom to extend another interface (Result). The MUCRoom interface was recently changed to extend the Externalizable interface. As duplicate inheritance in Java isn't an option, I refactored MUCRoom to be an abstract class instead. The classes that implemented MUCRoom didn't seem to extend any other class, that's why I hope I can get away with this. :) Gato, do you agree? I'd like your feedback before I proceed.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/branches/rsm@9170 b35dd754-fafc-0310-a699-88a17e54d16e
parent 87a9a68d
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* Copyright (C) 2004 Jive Software. All rights reserved. * Copyright (C) 2004 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU public abstract License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
*/ */
...@@ -22,6 +22,7 @@ import org.jivesoftware.openfire.user.UserAlreadyExistsException; ...@@ -22,6 +22,7 @@ import org.jivesoftware.openfire.user.UserAlreadyExistsException;
import org.jivesoftware.openfire.user.UserNotFoundException; import org.jivesoftware.openfire.user.UserNotFoundException;
import org.jivesoftware.util.JiveConstants; import org.jivesoftware.util.JiveConstants;
import org.jivesoftware.util.NotFoundException; import org.jivesoftware.util.NotFoundException;
import org.jivesoftware.util.resultsetmanager.Result;
import org.xmpp.packet.JID; import org.xmpp.packet.JID;
import org.xmpp.packet.Message; import org.xmpp.packet.Message;
import org.xmpp.packet.Packet; import org.xmpp.packet.Packet;
...@@ -40,14 +41,14 @@ import java.util.List; ...@@ -40,14 +41,14 @@ import java.util.List;
* @author Gaston Dombiak * @author Gaston Dombiak
*/ */
@JiveID(JiveConstants.MUC_ROOM) @JiveID(JiveConstants.MUC_ROOM)
public interface MUCRoom extends Externalizable { public abstract class MUCRoom implements Externalizable, Result {
/** /**
* Get the name of this room. * Get the name of this room.
* *
* @return The name for this room * @return The name for this room
*/ */
String getName(); public abstract String getName();
/** /**
* Obtain a unique numerical id for this room. Useful for storing rooms in databases. If the * Obtain a unique numerical id for this room. Useful for storing rooms in databases. If the
...@@ -56,7 +57,7 @@ public interface MUCRoom extends Externalizable { ...@@ -56,7 +57,7 @@ public interface MUCRoom extends Externalizable {
* @return The unique id for this room or -1 if the room is temporary and is not logging the * @return The unique id for this room or -1 if the room is temporary and is not logging the
* conversation. * conversation.
*/ */
long getID(); public abstract long getID();
/** /**
* Sets a new room ID if the room has just been saved to the database or sets the saved ID of * Sets a new room ID if the room has just been saved to the database or sets the saved ID of
...@@ -65,21 +66,21 @@ public interface MUCRoom extends Externalizable { ...@@ -65,21 +66,21 @@ public interface MUCRoom extends Externalizable {
* @param roomID the saved ID of the room in the DB or a new one if the room is being saved to * @param roomID the saved ID of the room in the DB or a new one if the room is being saved to
* the DB. * the DB.
*/ */
void setID(long roomID); public abstract void setID(long roomID);
/** /**
* Returns the date when the room was created. * Returns the date when the room was created.
* *
* @return the date when the room was created. * @return the date when the room was created.
*/ */
Date getCreationDate(); public abstract Date getCreationDate();
/** /**
* Sets the date when the room was created. * Sets the date when the room was created.
* *
* @param creationDate the date when the room was created. * @param creationDate the date when the room was created.
*/ */
void setCreationDate(Date creationDate); public abstract void setCreationDate(Date creationDate);
/** /**
* Returns the last date when the room's configuration was modified. If the room's configuration * Returns the last date when the room's configuration was modified. If the room's configuration
...@@ -87,7 +88,7 @@ public interface MUCRoom extends Externalizable { ...@@ -87,7 +88,7 @@ public interface MUCRoom extends Externalizable {
* *
* @return the last date when the room's configuration was modified. * @return the last date when the room's configuration was modified.
*/ */
Date getModificationDate(); public abstract Date getModificationDate();
/** /**
* Sets the last date when the room's configuration was modified. If the room's configuration * Sets the last date when the room's configuration was modified. If the room's configuration
...@@ -95,7 +96,7 @@ public interface MUCRoom extends Externalizable { ...@@ -95,7 +96,7 @@ public interface MUCRoom extends Externalizable {
* *
* @param modificationDate the last date when the room's configuration was modified. * @param modificationDate the last date when the room's configuration was modified.
*/ */
void setModificationDate(Date modificationDate); public abstract void setModificationDate(Date modificationDate);
/** /**
* Sets the date when the last occupant left the room. A null value means that there are * Sets the date when the last occupant left the room. A null value means that there are
...@@ -104,7 +105,7 @@ public interface MUCRoom extends Externalizable { ...@@ -104,7 +105,7 @@ public interface MUCRoom extends Externalizable {
* @param emptyDate the date when the last occupant left the room or null if there are occupants * @param emptyDate the date when the last occupant left the room or null if there are occupants
* in the room. * in the room.
*/ */
void setEmptyDate(Date emptyDate); public abstract void setEmptyDate(Date emptyDate);
/** /**
* Returns the date when the last occupant left the room. A null value means that there are * Returns the date when the last occupant left the room. A null value means that there are
...@@ -113,14 +114,14 @@ public interface MUCRoom extends Externalizable { ...@@ -113,14 +114,14 @@ public interface MUCRoom extends Externalizable {
* @return the date when the last occupant left the room or null if there are occupants in the * @return the date when the last occupant left the room or null if there are occupants in the
* room at the moment. * room at the moment.
*/ */
Date getEmptyDate(); public abstract Date getEmptyDate();
/** /**
* Obtain the role of the chat server (mainly for addressing messages and presence). * Obtain the role of the chat server (mainly for addressing messages and presence).
* *
* @return The role for the chat room itself * @return The role for the chat room itself
*/ */
MUCRole getRole(); public abstract MUCRole getRole();
/** /**
* Obtain the role of a given user by nickname. * Obtain the role of a given user by nickname.
...@@ -129,7 +130,7 @@ public interface MUCRoom extends Externalizable { ...@@ -129,7 +130,7 @@ public interface MUCRoom extends Externalizable {
* @return The user's role in the room * @return The user's role in the room
* @throws UserNotFoundException If there is no user with the given nickname * @throws UserNotFoundException If there is no user with the given nickname
*/ */
MUCRole getOccupant(String nickname) throws UserNotFoundException; public abstract MUCRole getOccupant(String nickname) throws UserNotFoundException;
/** /**
* Obtain the roles of a given user in the room by his bare JID. A user can have several roles, * Obtain the roles of a given user in the room by his bare JID. A user can have several roles,
...@@ -139,7 +140,7 @@ public interface MUCRoom extends Externalizable { ...@@ -139,7 +140,7 @@ public interface MUCRoom extends Externalizable {
* @return The user's roles in the room * @return The user's roles in the room
* @throws UserNotFoundException If there is no user with the given nickname * @throws UserNotFoundException If there is no user with the given nickname
*/ */
List<MUCRole> getOccupantsByBareJID(String jid) throws UserNotFoundException; public abstract List<MUCRole> getOccupantsByBareJID(String jid) throws UserNotFoundException;
/** /**
* Returns the role of a given user in the room by his full JID or <tt>null</tt> * Returns the role of a given user in the room by his full JID or <tt>null</tt>
...@@ -148,21 +149,21 @@ public interface MUCRoom extends Externalizable { ...@@ -148,21 +149,21 @@ public interface MUCRoom extends Externalizable {
* @param jid The full jid of the user you'd like to obtain * @param jid The full jid of the user you'd like to obtain
* @return The user's role in the room or null if not found. * @return The user's role in the room or null if not found.
*/ */
MUCRole getOccupantByFullJID(JID jid); public abstract MUCRole getOccupantByFullJID(JID jid);
/** /**
* Obtain the roles of all users in the chatroom. * Obtain the roles of all users in the chatroom.
* *
* @return a collection with all users in the chatroom * @return a collection with all users in the chatroom
*/ */
Collection<MUCRole> getOccupants(); public abstract Collection<MUCRole> getOccupants();
/** /**
* Returns the number of occupants in the chatroom at the moment. * Returns the number of occupants in the chatroom at the moment.
* *
* @return int the number of occupants in the chatroom at the moment. * @return int the number of occupants in the chatroom at the moment.
*/ */
int getOccupantsCount(); public abstract int getOccupantsCount();
/** /**
* Determine if a given nickname is taken. * Determine if a given nickname is taken.
...@@ -170,7 +171,7 @@ public interface MUCRoom extends Externalizable { ...@@ -170,7 +171,7 @@ public interface MUCRoom extends Externalizable {
* @param nickname The nickname of the user you'd like to obtain * @param nickname The nickname of the user you'd like to obtain
* @return True if a nickname is taken * @return True if a nickname is taken
*/ */
boolean hasOccupant(String nickname); public abstract boolean hasOccupant(String nickname);
/** /**
* Returns the reserved room nickname for the bare JID or null if none. * Returns the reserved room nickname for the bare JID or null if none.
...@@ -178,7 +179,7 @@ public interface MUCRoom extends Externalizable { ...@@ -178,7 +179,7 @@ public interface MUCRoom extends Externalizable {
* @param bareJID The bare jid of the user of which you'd like to obtain his reserved nickname. * @param bareJID The bare jid of the user of which you'd like to obtain his reserved nickname.
* @return the reserved room nickname for the bare JID or null if none. * @return the reserved room nickname for the bare JID or null if none.
*/ */
String getReservedNickname(String bareJID); public abstract String getReservedNickname(String bareJID);
/** /**
* Returns the affiliation state of the user in the room. Possible affiliations are * Returns the affiliation state of the user in the room. Possible affiliations are
...@@ -189,7 +190,7 @@ public interface MUCRoom extends Externalizable { ...@@ -189,7 +190,7 @@ public interface MUCRoom extends Externalizable {
* @param bareJID The bare jid of the user of which you'd like to obtain his affiliation. * @param bareJID The bare jid of the user of which you'd like to obtain his affiliation.
* @return the affiliation state of the user in the room. * @return the affiliation state of the user in the room.
*/ */
MUCRole.Affiliation getAffiliation(String bareJID); public abstract MUCRole.Affiliation getAffiliation(String bareJID);
/** /**
* Joins the room using the given nickname. * Joins the room using the given nickname.
...@@ -212,7 +213,7 @@ public interface MUCRoom extends Externalizable { ...@@ -212,7 +213,7 @@ public interface MUCRoom extends Externalizable {
* @throws NotAcceptableException If the registered user is trying to join with a * @throws NotAcceptableException If the registered user is trying to join with a
* nickname different than the reserved nickname. * nickname different than the reserved nickname.
*/ */
LocalMUCRole joinRoom(String nickname, String password, HistoryRequest historyRequest, LocalMUCUser user, public abstract LocalMUCRole joinRoom(String nickname, String password, HistoryRequest historyRequest, LocalMUCUser user,
Presence presence) throws UnauthorizedException, UserAlreadyExistsException, Presence presence) throws UnauthorizedException, UserAlreadyExistsException,
RoomLockedException, ForbiddenException, RegistrationRequiredException, RoomLockedException, ForbiddenException, RegistrationRequiredException,
ConflictException, ServiceUnavailableException, NotAcceptableException; ConflictException, ServiceUnavailableException, NotAcceptableException;
...@@ -222,7 +223,7 @@ public interface MUCRoom extends Externalizable { ...@@ -222,7 +223,7 @@ public interface MUCRoom extends Externalizable {
* *
* @param leaveRole room occupant that left the room. * @param leaveRole room occupant that left the room.
*/ */
void leaveRoom(MUCRole leaveRole); public abstract void leaveRoom(MUCRole leaveRole);
/** /**
* Destroys the room. Each occupant will be removed and will receive a presence stanza of type * Destroys the room. Each occupant will be removed and will receive a presence stanza of type
...@@ -232,7 +233,7 @@ public interface MUCRoom extends Externalizable { ...@@ -232,7 +233,7 @@ public interface MUCRoom extends Externalizable {
* @param alternateJID the alternate JID. Commonly used to provide a replacement room. * @param alternateJID the alternate JID. Commonly used to provide a replacement room.
* @param reason the reason why the room was destroyed. * @param reason the reason why the room was destroyed.
*/ */
void destroyRoom(String alternateJID, String reason); public abstract void destroyRoom(String alternateJID, String reason);
/** /**
* Create a new presence in this room for the given role. * Create a new presence in this room for the given role.
...@@ -240,7 +241,7 @@ public interface MUCRoom extends Externalizable { ...@@ -240,7 +241,7 @@ public interface MUCRoom extends Externalizable {
* @return The new presence * @return The new presence
* @throws UnauthorizedException If the user doesn't have permission to leave the room * @throws UnauthorizedException If the user doesn't have permission to leave the room
*/ */
Presence createPresence(Presence.Type type) throws UnauthorizedException; public abstract Presence createPresence(Presence.Type type) throws UnauthorizedException;
/** /**
* Broadcast a given message to all members of this chat room. The sender is always set to * Broadcast a given message to all members of this chat room. The sender is always set to
...@@ -248,14 +249,14 @@ public interface MUCRoom extends Externalizable { ...@@ -248,14 +249,14 @@ public interface MUCRoom extends Externalizable {
* *
* @param msg The message to broadcast * @param msg The message to broadcast
*/ */
void serverBroadcast(String msg); public abstract void serverBroadcast(String msg);
/** /**
* Returns the total length of the chat session. * Returns the total length of the chat session.
* *
* @return length of chat session in milliseconds. * @return length of chat session in milliseconds.
*/ */
public long getChatLength(); public abstract long getChatLength();
/** /**
* Adds a new user to the list of owners. The user is the actual creator of the room. Only the * Adds a new user to the list of owners. The user is the actual creator of the room. Only the
...@@ -264,7 +265,7 @@ public interface MUCRoom extends Externalizable { ...@@ -264,7 +265,7 @@ public interface MUCRoom extends Externalizable {
* *
* @param bareJID The bare JID of the user to add as owner. * @param bareJID The bare JID of the user to add as owner.
*/ */
public void addFirstOwner(String bareJID); public abstract void addFirstOwner(String bareJID);
/** /**
* Adds a new user to the list of owners. * Adds a new user to the list of owners.
...@@ -275,7 +276,7 @@ public interface MUCRoom extends Externalizable { ...@@ -275,7 +276,7 @@ public interface MUCRoom extends Externalizable {
* join the room. * join the room.
* @throws ForbiddenException If the user is not allowed to modify the owner list. * @throws ForbiddenException If the user is not allowed to modify the owner list.
*/ */
public List<Presence> addOwner(String bareJID, MUCRole senderRole) throws ForbiddenException; public abstract List<Presence> addOwner(String bareJID, MUCRole senderRole) throws ForbiddenException;
/** /**
* Adds a list of users to the list of owners. * Adds a list of users to the list of owners.
...@@ -286,7 +287,7 @@ public interface MUCRoom extends Externalizable { ...@@ -286,7 +287,7 @@ public interface MUCRoom extends Externalizable {
* join the room. * join the room.
* @throws ForbiddenException If the user is not allowed to modify the owner list. * @throws ForbiddenException If the user is not allowed to modify the owner list.
*/ */
public List<Presence> addOwners(List<String> newOwners, MUCRole senderRole) public abstract List<Presence> addOwners(List<String> newOwners, MUCRole senderRole)
throws ForbiddenException; throws ForbiddenException;
/** /**
...@@ -299,7 +300,7 @@ public interface MUCRoom extends Externalizable { ...@@ -299,7 +300,7 @@ public interface MUCRoom extends Externalizable {
* @throws ForbiddenException If the user is not allowed to modify the admin list. * @throws ForbiddenException If the user is not allowed to modify the admin list.
* @throws ConflictException If the room was going to lose all its owners. * @throws ConflictException If the room was going to lose all its owners.
*/ */
public List<Presence> addAdmins(List<String> newAdmins, MUCRole senderRole) public abstract List<Presence> addAdmins(List<String> newAdmins, MUCRole senderRole)
throws ForbiddenException, ConflictException; throws ForbiddenException, ConflictException;
/** /**
...@@ -312,7 +313,7 @@ public interface MUCRoom extends Externalizable { ...@@ -312,7 +313,7 @@ public interface MUCRoom extends Externalizable {
* @throws ForbiddenException If the user is not allowed to modify the admin list. * @throws ForbiddenException If the user is not allowed to modify the admin list.
* @throws ConflictException If the room was going to lose all its owners. * @throws ConflictException If the room was going to lose all its owners.
*/ */
public List<Presence> addAdmin(String bareJID, MUCRole senderRole) throws ForbiddenException, public abstract List<Presence> addAdmin(String bareJID, MUCRole senderRole) throws ForbiddenException,
ConflictException; ConflictException;
/** /**
...@@ -327,7 +328,7 @@ public interface MUCRoom extends Externalizable { ...@@ -327,7 +328,7 @@ public interface MUCRoom extends Externalizable {
* @throws ConflictException If the desired room nickname is already reserved for the room or if * @throws ConflictException If the desired room nickname is already reserved for the room or if
* the room was going to lose all its owners. * the room was going to lose all its owners.
*/ */
public List<Presence> addMember(String bareJID, String nickname, MUCRole senderRole) public abstract List<Presence> addMember(String bareJID, String nickname, MUCRole senderRole)
throws ForbiddenException, ConflictException; throws ForbiddenException, ConflictException;
/** /**
...@@ -342,7 +343,7 @@ public interface MUCRoom extends Externalizable { ...@@ -342,7 +343,7 @@ public interface MUCRoom extends Externalizable {
* @throws ForbiddenException If the user is not allowed to modify the outcast list. * @throws ForbiddenException If the user is not allowed to modify the outcast list.
* @throws ConflictException If the room was going to lose all its owners. * @throws ConflictException If the room was going to lose all its owners.
*/ */
public List<Presence> addOutcast(String bareJID, String reason, MUCRole senderRole) public abstract List<Presence> addOutcast(String bareJID, String reason, MUCRole senderRole)
throws NotAllowedException, ForbiddenException, ConflictException; throws NotAllowedException, ForbiddenException, ConflictException;
/** /**
...@@ -355,7 +356,7 @@ public interface MUCRoom extends Externalizable { ...@@ -355,7 +356,7 @@ public interface MUCRoom extends Externalizable {
* @throws ForbiddenException If the user is not allowed to modify the none list. * @throws ForbiddenException If the user is not allowed to modify the none list.
* @throws ConflictException If the room was going to lose all its owners. * @throws ConflictException If the room was going to lose all its owners.
*/ */
public List<Presence> addNone(String bareJID, MUCRole senderRole) throws ForbiddenException, public abstract List<Presence> addNone(String bareJID, MUCRole senderRole) throws ForbiddenException,
ConflictException; ConflictException;
/** /**
...@@ -368,7 +369,7 @@ public interface MUCRoom extends Externalizable { ...@@ -368,7 +369,7 @@ public interface MUCRoom extends Externalizable {
* an existing occupant. * an existing occupant.
* @throws ForbiddenException If the user is not allowed to grant moderator privileges. * @throws ForbiddenException If the user is not allowed to grant moderator privileges.
*/ */
public Presence addModerator(JID fullJID, MUCRole senderRole) throws ForbiddenException; public abstract Presence addModerator(JID fullJID, MUCRole senderRole) throws ForbiddenException;
/** /**
* Changes the role of the user within the room to participant. A participant is allowed to send * Changes the role of the user within the room to participant. A participant is allowed to send
...@@ -383,7 +384,7 @@ public interface MUCRoom extends Externalizable { ...@@ -383,7 +384,7 @@ public interface MUCRoom extends Externalizable {
* @throws NotAllowedException If trying to change the moderator role to an owner or an admin. * @throws NotAllowedException If trying to change the moderator role to an owner or an admin.
* @throws ForbiddenException If the user is not allowed to grant participant privileges. * @throws ForbiddenException If the user is not allowed to grant participant privileges.
*/ */
public Presence addParticipant(JID fullJID, String reason, MUCRole senderRole) public abstract Presence addParticipant(JID fullJID, String reason, MUCRole senderRole)
throws NotAllowedException, ForbiddenException; throws NotAllowedException, ForbiddenException;
/** /**
...@@ -398,7 +399,7 @@ public interface MUCRoom extends Externalizable { ...@@ -398,7 +399,7 @@ public interface MUCRoom extends Externalizable {
* @throws NotAllowedException if trying to change the moderator role to an owner or an admin. * @throws NotAllowedException if trying to change the moderator role to an owner or an admin.
* @throws ForbiddenException if the user is not a moderator. * @throws ForbiddenException if the user is not a moderator.
*/ */
public Presence addVisitor(JID jid, MUCRole senderRole) throws NotAllowedException, public abstract Presence addVisitor(JID jid, MUCRole senderRole) throws NotAllowedException,
ForbiddenException; ForbiddenException;
/** /**
...@@ -408,7 +409,7 @@ public interface MUCRoom extends Externalizable { ...@@ -408,7 +409,7 @@ public interface MUCRoom extends Externalizable {
* *
* @return true if the room is locked. * @return true if the room is locked.
*/ */
public boolean isLocked(); public abstract boolean isLocked();
/** /**
* Returns true if the room is locked and it was locked by a room owner after the room was * Returns true if the room is locked and it was locked by a room owner after the room was
...@@ -417,7 +418,7 @@ public interface MUCRoom extends Externalizable { ...@@ -417,7 +418,7 @@ public interface MUCRoom extends Externalizable {
* @return true if the room is locked and it was locked by a room owner after the room was * @return true if the room is locked and it was locked by a room owner after the room was
* initially configured. * initially configured.
*/ */
public boolean isManuallyLocked(); public abstract boolean isManuallyLocked();
/** /**
* An event callback fired whenever an occupant updated his presence in the chatroom. * An event callback fired whenever an occupant updated his presence in the chatroom.
...@@ -425,7 +426,7 @@ public interface MUCRoom extends Externalizable { ...@@ -425,7 +426,7 @@ public interface MUCRoom extends Externalizable {
* @param occupantRole occupant that changed his presence in the room. * @param occupantRole occupant that changed his presence in the room.
* @param newPresence presence sent by the occupant. * @param newPresence presence sent by the occupant.
*/ */
public void presenceUpdated(MUCRole occupantRole, Presence newPresence); public abstract void presenceUpdated(MUCRole occupantRole, Presence newPresence);
/** /**
* An event callback fired whenever an occupant changes his nickname within the chatroom. * An event callback fired whenever an occupant changes his nickname within the chatroom.
...@@ -435,7 +436,7 @@ public interface MUCRoom extends Externalizable { ...@@ -435,7 +436,7 @@ public interface MUCRoom extends Externalizable {
* @param oldNick old nickname within the room. * @param oldNick old nickname within the room.
* @param newNick new nickname within the room. * @param newNick new nickname within the room.
*/ */
public void nicknameChanged(MUCRole occupantRole, Presence newPresence, String oldNick, String newNick); public abstract void nicknameChanged(MUCRole occupantRole, Presence newPresence, String oldNick, String newNick);
/** /**
* Changes the room's subject if the occupant has enough permissions. The occupant must be * Changes the room's subject if the occupant has enough permissions. The occupant must be
...@@ -448,14 +449,14 @@ public interface MUCRoom extends Externalizable { ...@@ -448,14 +449,14 @@ public interface MUCRoom extends Externalizable {
* @param role the role of the user that is trying to change the subject. * @param role the role of the user that is trying to change the subject.
* @throws ForbiddenException If the user is not allowed to change the subject. * @throws ForbiddenException If the user is not allowed to change the subject.
*/ */
public void changeSubject(Message packet, MUCRole role) throws ForbiddenException; public abstract void changeSubject(Message packet, MUCRole role) throws ForbiddenException;
/** /**
* Returns the last subject that some occupant set to the room. * Returns the last subject that some occupant set to the room.
* *
* @return the last subject that some occupant set to the room. * @return the last subject that some occupant set to the room.
*/ */
public String getSubject(); public abstract String getSubject();
/** /**
* Sets the last subject that some occupant set to the room. This message will only be used * Sets the last subject that some occupant set to the room. This message will only be used
...@@ -463,7 +464,7 @@ public interface MUCRoom extends Externalizable { ...@@ -463,7 +464,7 @@ public interface MUCRoom extends Externalizable {
* *
* @param subject the last known subject of the room. * @param subject the last known subject of the room.
*/ */
public void setSubject(String subject); public abstract void setSubject(String subject);
/** /**
* Sends a message to the all the occupants. In a moderated room, this privilege is restricted * Sends a message to the all the occupants. In a moderated room, this privilege is restricted
...@@ -471,11 +472,11 @@ public interface MUCRoom extends Externalizable { ...@@ -471,11 +472,11 @@ public interface MUCRoom extends Externalizable {
* send a message to all other occupants. * send a message to all other occupants.
* *
* @param message The message to send. * @param message The message to send.
* @param senderRole the role of the user that is trying to send a public message. * @param senderRole the role of the user that is trying to send a public abstract message.
* @throws ForbiddenException If the user is not allowed to send a public message (i.e. does not * @throws ForbiddenException If the user is not allowed to send a public abstract message (i.e. does not
* have voice in the room). * have voice in the room).
*/ */
public void sendPublicMessage(Message message, MUCRole senderRole) throws ForbiddenException; public abstract void sendPublicMessage(Message message, MUCRole senderRole) throws ForbiddenException;
/** /**
* Sends a private packet to a selected occupant. The packet can be a Message for private * Sends a private packet to a selected occupant. The packet can be a Message for private
...@@ -483,10 +484,10 @@ public interface MUCRoom extends Externalizable { ...@@ -483,10 +484,10 @@ public interface MUCRoom extends Externalizable {
* to other room occupants. * to other room occupants.
* *
* @param packet The packet to send. * @param packet The packet to send.
* @param senderRole the role of the user that is trying to send a public message. * @param senderRole the role of the user that is trying to send a public abstract message.
* @throws NotFoundException If the user is sending a packet to a room JID that does not exist. * @throws NotFoundException If the user is sending a packet to a room JID that does not exist.
*/ */
public void sendPrivatePacket(Packet packet, MUCRole senderRole) throws NotFoundException; public abstract void sendPrivatePacket(Packet packet, MUCRole senderRole) throws NotFoundException;
/** /**
* Kicks a user from the room. If the user was in the room, the returned updated presence will * Kicks a user from the room. If the user was in the room, the returned updated presence will
...@@ -498,19 +499,19 @@ public interface MUCRoom extends Externalizable { ...@@ -498,19 +499,19 @@ public interface MUCRoom extends Externalizable {
* @return the updated presence of the kicked user or null if the user was not in the room. * @return the updated presence of the kicked user or null if the user was not in the room.
* @throws NotAllowedException Thrown if trying to ban an owner or an administrator. * @throws NotAllowedException Thrown if trying to ban an owner or an administrator.
*/ */
public Presence kickOccupant(JID fullJID, JID actorJID, String reason) public abstract Presence kickOccupant(JID fullJID, JID actorJID, String reason)
throws NotAllowedException; throws NotAllowedException;
public IQOwnerHandler getIQOwnerHandler(); public abstract IQOwnerHandler getIQOwnerHandler();
public IQAdminHandler getIQAdminHandler(); public abstract IQAdminHandler getIQAdminHandler();
/** /**
* Returns the history of the room which includes chat transcripts. * Returns the history of the room which includes chat transcripts.
* *
* @return the history of the room which includes chat transcripts. * @return the history of the room which includes chat transcripts.
*/ */
public MUCRoomHistory getRoomHistory(); public abstract MUCRoomHistory getRoomHistory();
/** /**
* Returns a collection with the current list of owners. The collection contains the bareJID of * Returns a collection with the current list of owners. The collection contains the bareJID of
...@@ -518,7 +519,7 @@ public interface MUCRoom extends Externalizable { ...@@ -518,7 +519,7 @@ public interface MUCRoom extends Externalizable {
* *
* @return a collection with the current list of owners. * @return a collection with the current list of owners.
*/ */
public Collection<String> getOwners(); public abstract Collection<String> getOwners();
/** /**
* Returns a collection with the current list of admins. The collection contains the bareJID of * Returns a collection with the current list of admins. The collection contains the bareJID of
...@@ -526,7 +527,7 @@ public interface MUCRoom extends Externalizable { ...@@ -526,7 +527,7 @@ public interface MUCRoom extends Externalizable {
* *
* @return a collection with the current list of admins. * @return a collection with the current list of admins.
*/ */
public Collection<String> getAdmins(); public abstract Collection<String> getAdmins();
/** /**
* Returns a collection with the current list of room members. The collection contains the * Returns a collection with the current list of room members. The collection contains the
...@@ -536,7 +537,7 @@ public interface MUCRoom extends Externalizable { ...@@ -536,7 +537,7 @@ public interface MUCRoom extends Externalizable {
* *
* @return a collection with the current list of members. * @return a collection with the current list of members.
*/ */
public Collection<String> getMembers(); public abstract Collection<String> getMembers();
/** /**
* Returns a collection with the current list of outcast users. An outcast user is not allowed * Returns a collection with the current list of outcast users. An outcast user is not allowed
...@@ -545,7 +546,7 @@ public interface MUCRoom extends Externalizable { ...@@ -545,7 +546,7 @@ public interface MUCRoom extends Externalizable {
* *
* @return a collection with the current list of outcast users. * @return a collection with the current list of outcast users.
*/ */
public Collection<String> getOutcasts(); public abstract Collection<String> getOutcasts();
/** /**
* Returns a collection with the current list of room moderators. The collection contains the * Returns a collection with the current list of room moderators. The collection contains the
...@@ -553,7 +554,7 @@ public interface MUCRoom extends Externalizable { ...@@ -553,7 +554,7 @@ public interface MUCRoom extends Externalizable {
* *
* @return a collection with the current list of moderators. * @return a collection with the current list of moderators.
*/ */
public Collection<MUCRole> getModerators(); public abstract Collection<MUCRole> getModerators();
/** /**
* Returns a collection with the current list of room participants. The collection contains the * Returns a collection with the current list of room participants. The collection contains the
...@@ -561,7 +562,7 @@ public interface MUCRoom extends Externalizable { ...@@ -561,7 +562,7 @@ public interface MUCRoom extends Externalizable {
* *
* @return a collection with the current list of moderators. * @return a collection with the current list of moderators.
*/ */
public Collection<MUCRole> getParticipants(); public abstract Collection<MUCRole> getParticipants();
/** /**
* Returns true if every presence packet will include the JID of every occupant. This * Returns true if every presence packet will include the JID of every occupant. This
...@@ -569,7 +570,7 @@ public interface MUCRoom extends Externalizable { ...@@ -569,7 +570,7 @@ public interface MUCRoom extends Externalizable {
* *
* @return true if every presence packet will include the JID of every occupant. * @return true if every presence packet will include the JID of every occupant.
*/ */
public boolean canAnyoneDiscoverJID(); public abstract boolean canAnyoneDiscoverJID();
/** /**
* Sets if every presence packet will include the JID of every occupant. This * Sets if every presence packet will include the JID of every occupant. This
...@@ -578,14 +579,14 @@ public interface MUCRoom extends Externalizable { ...@@ -578,14 +579,14 @@ public interface MUCRoom extends Externalizable {
* @param canAnyoneDiscoverJID boolean that specifies if every presence packet will include the * @param canAnyoneDiscoverJID boolean that specifies if every presence packet will include the
* JID of every occupant. * JID of every occupant.
*/ */
public void setCanAnyoneDiscoverJID(boolean canAnyoneDiscoverJID); public abstract void setCanAnyoneDiscoverJID(boolean canAnyoneDiscoverJID);
/** /**
* Returns true if participants are allowed to change the room's subject. * Returns true if participants are allowed to change the room's subject.
* *
* @return true if participants are allowed to change the room's subject. * @return true if participants are allowed to change the room's subject.
*/ */
public boolean canOccupantsChangeSubject(); public abstract boolean canOccupantsChangeSubject();
/** /**
* Sets if participants are allowed to change the room's subject. * Sets if participants are allowed to change the room's subject.
...@@ -593,7 +594,7 @@ public interface MUCRoom extends Externalizable { ...@@ -593,7 +594,7 @@ public interface MUCRoom extends Externalizable {
* @param canOccupantsChangeSubject boolean that specifies if participants are allowed to * @param canOccupantsChangeSubject boolean that specifies if participants are allowed to
* change the room's subject. * change the room's subject.
*/ */
public void setCanOccupantsChangeSubject(boolean canOccupantsChangeSubject); public abstract void setCanOccupantsChangeSubject(boolean canOccupantsChangeSubject);
/** /**
* Returns true if occupants can invite other users to the room. If the room does not require an * Returns true if occupants can invite other users to the room. If the room does not require an
...@@ -603,7 +604,7 @@ public interface MUCRoom extends Externalizable { ...@@ -603,7 +604,7 @@ public interface MUCRoom extends Externalizable {
* *
* @return true if occupants can invite other users to the room. * @return true if occupants can invite other users to the room.
*/ */
public boolean canOccupantsInvite(); public abstract boolean canOccupantsInvite();
/** /**
* Sets if occupants can invite other users to the room. If the room does not require an * Sets if occupants can invite other users to the room. If the room does not require an
...@@ -614,7 +615,7 @@ public interface MUCRoom extends Externalizable { ...@@ -614,7 +615,7 @@ public interface MUCRoom extends Externalizable {
* @param canOccupantsInvite boolean that specified in any occupant can invite other users to * @param canOccupantsInvite boolean that specified in any occupant can invite other users to
* the room. * the room.
*/ */
public void setCanOccupantsInvite(boolean canOccupantsInvite); public abstract void setCanOccupantsInvite(boolean canOccupantsInvite);
/** /**
* Returns the natural language name of the room. This name can only be modified by room owners. * Returns the natural language name of the room. This name can only be modified by room owners.
...@@ -622,7 +623,7 @@ public interface MUCRoom extends Externalizable { ...@@ -622,7 +623,7 @@ public interface MUCRoom extends Externalizable {
* *
* @return the natural language name of the room. * @return the natural language name of the room.
*/ */
public String getNaturalLanguageName(); public abstract String getNaturalLanguageName();
/** /**
* Sets the natural language name of the room. This name can only be modified by room owners. * Sets the natural language name of the room. This name can only be modified by room owners.
...@@ -630,7 +631,7 @@ public interface MUCRoom extends Externalizable { ...@@ -630,7 +631,7 @@ public interface MUCRoom extends Externalizable {
* *
* @param naturalLanguageName the natural language name of the room. * @param naturalLanguageName the natural language name of the room.
*/ */
public void setNaturalLanguageName(String naturalLanguageName); public abstract void setNaturalLanguageName(String naturalLanguageName);
/** /**
* Returns a description set by the room's owners about the room. This information will be used * Returns a description set by the room's owners about the room. This information will be used
...@@ -638,7 +639,7 @@ public interface MUCRoom extends Externalizable { ...@@ -638,7 +639,7 @@ public interface MUCRoom extends Externalizable {
* *
* @return a description set by the room's owners about the room. * @return a description set by the room's owners about the room.
*/ */
public String getDescription(); public abstract String getDescription();
/** /**
* Sets a description set by the room's owners about the room. This information will be used * Sets a description set by the room's owners about the room. This information will be used
...@@ -646,7 +647,7 @@ public interface MUCRoom extends Externalizable { ...@@ -646,7 +647,7 @@ public interface MUCRoom extends Externalizable {
* *
* @param description a description set by the room's owners about the room. * @param description a description set by the room's owners about the room.
*/ */
public void setDescription(String description); public abstract void setDescription(String description);
/** /**
* Returns true if the room requires an invitation to enter. That is if the room is * Returns true if the room requires an invitation to enter. That is if the room is
...@@ -654,7 +655,7 @@ public interface MUCRoom extends Externalizable { ...@@ -654,7 +655,7 @@ public interface MUCRoom extends Externalizable {
* *
* @return true if the room requires an invitation to enter. * @return true if the room requires an invitation to enter.
*/ */
public boolean isMembersOnly(); public abstract boolean isMembersOnly();
/** /**
* Sets if the room requires an invitation to enter. That is if the room is members-only. * Sets if the room requires an invitation to enter. That is if the room is members-only.
...@@ -663,7 +664,7 @@ public interface MUCRoom extends Externalizable { ...@@ -663,7 +664,7 @@ public interface MUCRoom extends Externalizable {
* @return the list of updated presences of all the occupants that aren't members of the room if * @return the list of updated presences of all the occupants that aren't members of the room if
* the room is now members-only. * the room is now members-only.
*/ */
public List<Presence> setMembersOnly(boolean membersOnly); public abstract List<Presence> setMembersOnly(boolean membersOnly);
/** /**
* Returns true if the room's conversation is being logged. If logging is activated the room * Returns true if the room's conversation is being logged. If logging is activated the room
...@@ -673,7 +674,7 @@ public interface MUCRoom extends Externalizable { ...@@ -673,7 +674,7 @@ public interface MUCRoom extends Externalizable {
* *
* @return true if the room's conversation is being logged. * @return true if the room's conversation is being logged.
*/ */
public boolean isLogEnabled(); public abstract boolean isLogEnabled();
/** /**
* Sets if the room's conversation is being logged. If logging is activated the room * Sets if the room's conversation is being logged. If logging is activated the room
...@@ -683,7 +684,7 @@ public interface MUCRoom extends Externalizable { ...@@ -683,7 +684,7 @@ public interface MUCRoom extends Externalizable {
* *
* @param logEnabled boolean that specified if the room's conversation must be logged. * @param logEnabled boolean that specified if the room's conversation must be logged.
*/ */
public void setLogEnabled(boolean logEnabled); public abstract void setLogEnabled(boolean logEnabled);
/** /**
* Returns true if registered users can only join the room using their registered nickname. By * Returns true if registered users can only join the room using their registered nickname. By
...@@ -693,7 +694,7 @@ public interface MUCRoom extends Externalizable { ...@@ -693,7 +694,7 @@ public interface MUCRoom extends Externalizable {
* *
* @return true if registered users can only join the room using their registered nickname. * @return true if registered users can only join the room using their registered nickname.
*/ */
public boolean isLoginRestrictedToNickname(); public abstract boolean isLoginRestrictedToNickname();
/** /**
* Sets if registered users can only join the room using their registered nickname. A * Sets if registered users can only join the room using their registered nickname. A
...@@ -702,7 +703,7 @@ public interface MUCRoom extends Externalizable { ...@@ -702,7 +703,7 @@ public interface MUCRoom extends Externalizable {
* *
* @param restricted if registered users can only join the room using their registered nickname. * @param restricted if registered users can only join the room using their registered nickname.
*/ */
public void setLoginRestrictedToNickname(boolean restricted); public abstract void setLoginRestrictedToNickname(boolean restricted);
/** /**
* Returns true if room occupants are allowed to change their nicknames in the room. By * Returns true if room occupants are allowed to change their nicknames in the room. By
...@@ -714,7 +715,7 @@ public interface MUCRoom extends Externalizable { ...@@ -714,7 +715,7 @@ public interface MUCRoom extends Externalizable {
* *
* @return true if room occupants are allowed to change their nicknames in the room. * @return true if room occupants are allowed to change their nicknames in the room.
*/ */
public boolean canChangeNickname(); public abstract boolean canChangeNickname();
/** /**
* Sets if room occupants are allowed to change their nicknames in the room. By default, * Sets if room occupants are allowed to change their nicknames in the room. By default,
...@@ -726,7 +727,7 @@ public interface MUCRoom extends Externalizable { ...@@ -726,7 +727,7 @@ public interface MUCRoom extends Externalizable {
* *
* @param canChange if room occupants are allowed to change their nicknames in the room. * @param canChange if room occupants are allowed to change their nicknames in the room.
*/ */
public void setChangeNickname(boolean canChange); public abstract void setChangeNickname(boolean canChange);
/** /**
* Returns true if users are allowed to register with the room. By default, room registration * Returns true if users are allowed to register with the room. By default, room registration
...@@ -735,7 +736,7 @@ public interface MUCRoom extends Externalizable { ...@@ -735,7 +736,7 @@ public interface MUCRoom extends Externalizable {
* *
* @return true if users are allowed to register with the room. * @return true if users are allowed to register with the room.
*/ */
public boolean isRegistrationEnabled(); public abstract boolean isRegistrationEnabled();
/** /**
* Sets if users are allowed to register with the room. By default, room registration * Sets if users are allowed to register with the room. By default, room registration
...@@ -744,7 +745,7 @@ public interface MUCRoom extends Externalizable { ...@@ -744,7 +745,7 @@ public interface MUCRoom extends Externalizable {
* *
* @param registrationEnabled if users are allowed to register with the room. * @param registrationEnabled if users are allowed to register with the room.
*/ */
public void setRegistrationEnabled(boolean registrationEnabled); public abstract void setRegistrationEnabled(boolean registrationEnabled);
/** /**
* Returns the maximum number of occupants that can be simultaneously in the room. If the number * Returns the maximum number of occupants that can be simultaneously in the room. If the number
...@@ -753,7 +754,7 @@ public interface MUCRoom extends Externalizable { ...@@ -753,7 +754,7 @@ public interface MUCRoom extends Externalizable {
* @return the maximum number of occupants that can be simultaneously in the room. Zero means * @return the maximum number of occupants that can be simultaneously in the room. Zero means
* unlimited number of occupants. * unlimited number of occupants.
*/ */
public int getMaxUsers(); public abstract int getMaxUsers();
/** /**
* Sets the maximum number of occupants that can be simultaneously in the room. If the number * Sets the maximum number of occupants that can be simultaneously in the room. If the number
...@@ -762,14 +763,14 @@ public interface MUCRoom extends Externalizable { ...@@ -762,14 +763,14 @@ public interface MUCRoom extends Externalizable {
* @param maxUsers the maximum number of occupants that can be simultaneously in the room. Zero * @param maxUsers the maximum number of occupants that can be simultaneously in the room. Zero
* means unlimited number of occupants. * means unlimited number of occupants.
*/ */
public void setMaxUsers(int maxUsers); public abstract void setMaxUsers(int maxUsers);
/** /**
* Returns if the room in which only those with "voice" may send messages to all occupants. * Returns if the room in which only those with "voice" may send messages to all occupants.
* *
* @return if the room in which only those with "voice" may send messages to all occupants. * @return if the room in which only those with "voice" may send messages to all occupants.
*/ */
public boolean isModerated(); public abstract boolean isModerated();
/** /**
* Sets if the room in which only those with "voice" may send messages to all occupants. * Sets if the room in which only those with "voice" may send messages to all occupants.
...@@ -777,28 +778,28 @@ public interface MUCRoom extends Externalizable { ...@@ -777,28 +778,28 @@ public interface MUCRoom extends Externalizable {
* @param moderated if the room in which only those with "voice" may send messages to all * @param moderated if the room in which only those with "voice" may send messages to all
* occupants. * occupants.
*/ */
public void setModerated(boolean moderated); public abstract void setModerated(boolean moderated);
/** /**
* Returns true if a user cannot enter without first providing the correct password. * Returns true if a user cannot enter without first providing the correct password.
* *
* @return true if a user cannot enter without first providing the correct password. * @return true if a user cannot enter without first providing the correct password.
*/ */
public boolean isPasswordProtected(); public abstract boolean isPasswordProtected();
/** /**
* Returns the password that the user must provide to enter the room. * Returns the password that the user must provide to enter the room.
* *
* @return the password that the user must provide to enter the room. * @return the password that the user must provide to enter the room.
*/ */
public String getPassword(); public abstract String getPassword();
/** /**
* Sets the password that the user must provide to enter the room. * Sets the password that the user must provide to enter the room.
* *
* @param password the password that the user must provide to enter the room. * @param password the password that the user must provide to enter the room.
*/ */
public void setPassword(String password); public abstract void setPassword(String password);
/** /**
* Returns true if the room is not destroyed if the last occupant exits. Persistent rooms are * Returns true if the room is not destroyed if the last occupant exits. Persistent rooms are
...@@ -807,7 +808,7 @@ public interface MUCRoom extends Externalizable { ...@@ -807,7 +808,7 @@ public interface MUCRoom extends Externalizable {
* *
* @return true if the room is not destroyed if the last occupant exits. * @return true if the room is not destroyed if the last occupant exits.
*/ */
public boolean isPersistent(); public abstract boolean isPersistent();
/** /**
* Sets if the room is not destroyed if the last occupant exits. Persistent rooms are * Sets if the room is not destroyed if the last occupant exits. Persistent rooms are
...@@ -816,7 +817,7 @@ public interface MUCRoom extends Externalizable { ...@@ -816,7 +817,7 @@ public interface MUCRoom extends Externalizable {
* *
* @param persistent if the room is not destroyed if the last occupant exits. * @param persistent if the room is not destroyed if the last occupant exits.
*/ */
public void setPersistent(boolean persistent); public abstract void setPersistent(boolean persistent);
/** /**
* Returns true if the room has already been made persistent. If the room is temporary the * Returns true if the room has already been made persistent. If the room is temporary the
...@@ -824,34 +825,34 @@ public interface MUCRoom extends Externalizable { ...@@ -824,34 +825,34 @@ public interface MUCRoom extends Externalizable {
* *
* @return true if the room has already been made persistent. * @return true if the room has already been made persistent.
*/ */
public boolean wasSavedToDB(); public abstract boolean wasSavedToDB();
/** /**
* Sets if the room has already been made persistent. * Sets if the room has already been made persistent.
* *
* @param saved boolean that indicates if the room was saved to the database. * @param saved boolean that indicates if the room was saved to the database.
*/ */
public void setSavedToDB(boolean saved); public abstract void setSavedToDB(boolean saved);
/** /**
* Saves the room configuration to the DB. After the room has been saved to the DB it will * Saves the room configuration to the DB. After the room has been saved to the DB it will
* become persistent. * become persistent.
*/ */
public void saveToDB(); public abstract void saveToDB();
/** /**
* Returns true if the room is searchable and visible through service discovery. * Returns true if the room is searchable and visible through service discovery.
* *
* @return true if the room is searchable and visible through service discovery. * @return true if the room is searchable and visible through service discovery.
*/ */
public boolean isPublicRoom(); public abstract boolean isPublicRoom();
/** /**
* Sets if the room is searchable and visible through service discovery. * Sets if the room is searchable and visible through service discovery.
* *
* @param publicRoom if the room is searchable and visible through service discovery. * @param publicRoom if the room is searchable and visible through service discovery.
*/ */
public void setPublicRoom(boolean publicRoom); public abstract void setPublicRoom(boolean publicRoom);
/** /**
* Returns the list of roles of which presence will be broadcasted to the rest of the occupants. * Returns the list of roles of which presence will be broadcasted to the rest of the occupants.
...@@ -859,7 +860,7 @@ public interface MUCRoom extends Externalizable { ...@@ -859,7 +860,7 @@ public interface MUCRoom extends Externalizable {
* *
* @return the list of roles of which presence will be broadcasted to the rest of the occupants. * @return the list of roles of which presence will be broadcasted to the rest of the occupants.
*/ */
public List<String> getRolesToBroadcastPresence(); public abstract List<String> getRolesToBroadcastPresence();
/** /**
* Sets the list of roles of which presence will be broadcasted to the rest of the occupants. * Sets the list of roles of which presence will be broadcasted to the rest of the occupants.
...@@ -868,7 +869,7 @@ public interface MUCRoom extends Externalizable { ...@@ -868,7 +869,7 @@ public interface MUCRoom extends Externalizable {
* @param rolesToBroadcastPresence the list of roles of which presence will be broadcasted to * @param rolesToBroadcastPresence the list of roles of which presence will be broadcasted to
* the rest of the occupants. * the rest of the occupants.
*/ */
public void setRolesToBroadcastPresence(List<String> rolesToBroadcastPresence); public abstract void setRolesToBroadcastPresence(List<String> rolesToBroadcastPresence);
/** /**
* Returns true if the presences of the requested role will be broadcasted. * Returns true if the presences of the requested role will be broadcasted.
...@@ -876,7 +877,7 @@ public interface MUCRoom extends Externalizable { ...@@ -876,7 +877,7 @@ public interface MUCRoom extends Externalizable {
* @param roleToBroadcast the role to check if its presences will be broadcasted. * @param roleToBroadcast the role to check if its presences will be broadcasted.
* @return true if the presences of the requested role will be broadcasted. * @return true if the presences of the requested role will be broadcasted.
*/ */
public boolean canBroadcastPresence(String roleToBroadcast); public abstract boolean canBroadcastPresence(String roleToBroadcast);
/** /**
* Locks the room so that users cannot join the room. Only the owner of the room can lock/unlock * Locks the room so that users cannot join the room. Only the owner of the room can lock/unlock
...@@ -885,7 +886,7 @@ public interface MUCRoom extends Externalizable { ...@@ -885,7 +886,7 @@ public interface MUCRoom extends Externalizable {
* @param senderRole the role of the occupant that locked the room. * @param senderRole the role of the occupant that locked the room.
* @throws ForbiddenException If the user is not an owner of the room. * @throws ForbiddenException If the user is not an owner of the room.
*/ */
public void lock(MUCRole senderRole) throws ForbiddenException; public abstract void lock(MUCRole senderRole) throws ForbiddenException;
/** /**
* Unlocks the room so that users can join the room. The room is locked when created and only * Unlocks the room so that users can join the room. The room is locked when created and only
...@@ -895,7 +896,7 @@ public interface MUCRoom extends Externalizable { ...@@ -895,7 +896,7 @@ public interface MUCRoom extends Externalizable {
* @param senderRole the role of the occupant that unlocked the room. * @param senderRole the role of the occupant that unlocked the room.
* @throws ForbiddenException If the user is not an owner of the room. * @throws ForbiddenException If the user is not an owner of the room.
*/ */
public void unlock(MUCRole senderRole) throws ForbiddenException; public abstract void unlock(MUCRole senderRole) throws ForbiddenException;
/** /**
* Sends an invitation to a user. The invitation will be sent as if the room is inviting the * Sends an invitation to a user. The invitation will be sent as if the room is inviting the
...@@ -911,7 +912,7 @@ public interface MUCRoom extends Externalizable { ...@@ -911,7 +912,7 @@ public interface MUCRoom extends Externalizable {
* if none. * if none.
* @throws ForbiddenException If the user is not allowed to send the invitation. * @throws ForbiddenException If the user is not allowed to send the invitation.
*/ */
public void sendInvitation(JID to, String reason, MUCRole role, List<Element> extensions) public abstract void sendInvitation(JID to, String reason, MUCRole role, List<Element> extensions)
throws ForbiddenException; throws ForbiddenException;
/** /**
...@@ -925,12 +926,12 @@ public interface MUCRoom extends Externalizable { ...@@ -925,12 +926,12 @@ public interface MUCRoom extends Externalizable {
* @param reason the reason for the rejection or null if none. * @param reason the reason for the rejection or null if none.
* @param from the JID of the invitee that is rejecting the invitation. * @param from the JID of the invitee that is rejecting the invitation.
*/ */
public void sendInvitationRejection(JID to, String reason, JID from); public abstract void sendInvitationRejection(JID to, String reason, JID from);
/** /**
* Sends a packet to the user. * Sends a packet to the user.
* *
* @param packet The packet to send * @param packet The packet to send
*/ */
public void send(Packet packet); public abstract void send(Packet packet);
} }
\ No newline at end of file
...@@ -47,7 +47,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock; ...@@ -47,7 +47,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
* *
* @author Gaston Dombiak * @author Gaston Dombiak
*/ */
public class LocalMUCRoom implements MUCRoom { public class LocalMUCRoom extends MUCRoom {
/** /**
* The server hosting the room. * The server hosting the room.
...@@ -2197,4 +2197,15 @@ public class LocalMUCRoom implements MUCRoom { ...@@ -2197,4 +2197,15 @@ public class LocalMUCRoom implements MUCRoom {
emptyDate = otherRoom.emptyDate; emptyDate = otherRoom.emptyDate;
savedToDB = otherRoom.savedToDB; savedToDB = otherRoom.savedToDB;
} }
/*
* (non-Javadoc)
* @see org.jivesoftware.util.resultsetmanager.Result#getUID()
*/
@Override
public String getUID()
{
// name is unique for each one particular MUC service.
return name;
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment