Commit 035ae2f5 authored by guus's avatar guus

Ignore my last commit. It appears that multiple inheritance is possible, if it...

Ignore my last commit. It appears that multiple inheritance is possible, if it concerns interfaces only. That's by far a better solution.

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