Commit 5a7eb7aa authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Improvements and fixes for multi-MUC services. Reviewer: Gabriel

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@10084 b35dd754-fafc-0310-a699-88a17e54d16e
parent d22cd3e2
...@@ -693,8 +693,6 @@ muc.room.edit.form.log=Protokolovat konverzaci m\u00edstnosti ...@@ -693,8 +693,6 @@ muc.room.edit.form.log=Protokolovat konverzaci m\u00edstnosti
# Muc room summary Page # Muc room summary Page
muc.room.summary.title=M\u00edstnosti skupinov\u00e9ho chatu muc.room.summary.title=M\u00edstnosti skupinov\u00e9ho chatu
muc.room.summary.info=Dole je p\u0159ehled m\u00edstnost\u00ed skupinov\u00e9ho chatu v syst\u00e9mu. Odsud m\u016f\u017eete prohl\u00ed\u017eet \
m\u00edstnosti, m\u011bnit jejich vlastnosti, a vytv\u00e1\u0159et nov\u00e9 m\u00edstnosti.
muc.room.summary.destroyed=M\u00edstnost \u00fasp\u011b\u0161n\u011b odstran\u011bna. muc.room.summary.destroyed=M\u00edstnost \u00fasp\u011b\u0161n\u011b odstran\u011bna.
muc.room.summary.total_room=Celkem m\u00edstnost\u00ed muc.room.summary.total_room=Celkem m\u00edstnost\u00ed
muc.room.summary.sorted_id=T\u0159\u00eddit podle ID m\u00edstnosti muc.room.summary.sorted_id=T\u0159\u00eddit podle ID m\u00edstnosti
...@@ -2346,3 +2344,6 @@ muc.service.delete.destructon_title=Destruction Details ...@@ -2346,3 +2344,6 @@ muc.service.delete.destructon_title=Destruction Details
muc.service.delete.service_name=Subdomain: muc.service.delete.service_name=Subdomain:
muc.service.delete.reason=Reason: muc.service.delete.reason=Reason:
muc.service.delete.destroy_service=Destroy Service muc.service.delete.destroy_service=Destroy Service
muc.room.summary.info2=. From here you can view the rooms, edit their properties, and create new rooms.
muc.room.edit.form.service=Service
muc.room.summary.info=Below is an overview of the Group Chat Rooms in the service
...@@ -674,8 +674,6 @@ muc.room.edit.form.log=Raumunterhaltungen mitschreiben ...@@ -674,8 +674,6 @@ muc.room.edit.form.log=Raumunterhaltungen mitschreiben
# Muc room summary Page # Muc room summary Page
muc.room.summary.title=Gruppenchatr\u00e4ume muc.room.summary.title=Gruppenchatr\u00e4ume
muc.room.summary.info=Unten ist eine \u00dcbersicht mit den Gruppenchatr\u00e4umen des Systems. Von hier aus k\u00f6nnen \
R\u00e4ume angezeigt, die Eigenschaften bearbeitet und neue R\u00e4ume angelegt werden.
muc.room.summary.destroyed=Raum erfolgreich gel\u00f6scht. muc.room.summary.destroyed=Raum erfolgreich gel\u00f6scht.
muc.room.summary.total_room=Summe der R\u00e4ume muc.room.summary.total_room=Summe der R\u00e4ume
muc.room.summary.sorted_id=Sortiert nach Raum-ID muc.room.summary.sorted_id=Sortiert nach Raum-ID
...@@ -2332,3 +2330,6 @@ muc.service.delete.destructon_title=Destruction Details ...@@ -2332,3 +2330,6 @@ muc.service.delete.destructon_title=Destruction Details
muc.service.delete.service_name=Subdomain: muc.service.delete.service_name=Subdomain:
muc.service.delete.reason=Reason: muc.service.delete.reason=Reason:
muc.service.delete.destroy_service=Destroy Service muc.service.delete.destroy_service=Destroy Service
muc.room.summary.info2=. From here you can view the rooms, edit their properties, and create new rooms.
muc.room.edit.form.service=Service
muc.room.summary.info=Below is an overview of the Group Chat Rooms in the service
...@@ -396,6 +396,9 @@ ...@@ -396,6 +396,9 @@
## Added key: 'groupchat.service.settings_affect' ## Added key: 'groupchat.service.settings_affect'
## Updated key: 'groupchat.service.properties.saved_successfully' ## Updated key: 'groupchat.service.properties.saved_successfully'
## Removed key: 'groupchat.service.properties.saved_successfully2' ## Removed key: 'groupchat.service.properties.saved_successfully2'
## Updated key: 'muc.room.summary.info'
## Added key: 'muc.room.summary.info2'
## Added key: 'muc.room.edit.form.service'
# Openfire # Openfire
...@@ -1064,6 +1067,7 @@ muc.room.edit.form.edited=Room settings edited successfully. ...@@ -1064,6 +1067,7 @@ muc.room.edit.form.edited=Room settings edited successfully.
muc.room.edit.form.created=Room creation was successful. muc.room.edit.form.created=Room creation was successful.
muc.room.edit.form.info=Use the form below to edit the room settings. muc.room.edit.form.info=Use the form below to edit the room settings.
muc.room.edit.form.room_id=Room ID muc.room.edit.form.room_id=Room ID
muc.room.edit.form.service=Service
muc.room.edit.form.users=Users muc.room.edit.form.users=Users
muc.room.edit.form.on=Created On muc.room.edit.form.on=Created On
muc.room.edit.form.modified=Last Modified muc.room.edit.form.modified=Last Modified
...@@ -1108,8 +1112,8 @@ muc.room.edit.form.log=Log Room Conversations ...@@ -1108,8 +1112,8 @@ muc.room.edit.form.log=Log Room Conversations
# Muc room summary Page # Muc room summary Page
muc.room.summary.title=Group Chat Rooms muc.room.summary.title=Group Chat Rooms
muc.room.summary.info=Below is an overview of the Group Chat Rooms in the system. From here you can \ muc.room.summary.info=Below is an overview of the Group Chat Rooms in the service
view the rooms, edit their properties, and create new rooms. muc.room.summary.info2=. From here you can view the rooms, edit their properties, and create new rooms.
muc.room.summary.destroyed=Room destroyed successfully. muc.room.summary.destroyed=Room destroyed successfully.
muc.room.summary.total_room=Total Rooms muc.room.summary.total_room=Total Rooms
muc.room.summary.sorted_id=Sorted by Room ID muc.room.summary.sorted_id=Sorted by Room ID
......
...@@ -686,8 +686,6 @@ muc.room.edit.form.log=Guardar las conversaciones de la sala ...@@ -686,8 +686,6 @@ muc.room.edit.form.log=Guardar las conversaciones de la sala
# Muc room summary Page # Muc room summary Page
muc.room.summary.title=Salas de Conferencia muc.room.summary.title=Salas de Conferencia
muc.room.summary.info=El siguiente es un resumen de las salas de conferencia en el sistema. Desde aqu\u00ed puede \
ver las salas, editar sus propiedades y crear nuevas salas.
muc.room.summary.destroyed=Sala destruida con \u00e9xito. muc.room.summary.destroyed=Sala destruida con \u00e9xito.
muc.room.summary.total_room=Total de salas muc.room.summary.total_room=Total de salas
muc.room.summary.sorted_id=Ordenadas por ID muc.room.summary.sorted_id=Ordenadas por ID
...@@ -2383,3 +2381,6 @@ muc.service.delete.destructon_title=Destruction Details ...@@ -2383,3 +2381,6 @@ muc.service.delete.destructon_title=Destruction Details
muc.service.delete.service_name=Subdomain: muc.service.delete.service_name=Subdomain:
muc.service.delete.reason=Reason: muc.service.delete.reason=Reason:
muc.service.delete.destroy_service=Destroy Service muc.service.delete.destroy_service=Destroy Service
muc.room.summary.info2=. From here you can view the rooms, edit their properties, and create new rooms.
muc.room.edit.form.service=Service
muc.room.summary.info=Below is an overview of the Group Chat Rooms in the service
...@@ -586,7 +586,6 @@ muc.room.edit.form.registration = Autoriser les utilisateurs \u00E0 s'inscrire d ...@@ -586,7 +586,6 @@ muc.room.edit.form.registration = Autoriser les utilisateurs \u00E0 s'inscrire d
muc.room.edit.form.log = Journaliser les Conversations du Salon muc.room.edit.form.log = Journaliser les Conversations du Salon
# Muc room summary Page # Muc room summary Page
muc.room.summary.title = Salon de discussion muc.room.summary.title = Salon de discussion
muc.room.summary.info = Ci-dessous un vue d'ensemble des Salons de Discussion du syst\u00E8me. Depuis cette page vous pouvez voir les salons, modifier leurs propri\u00E9t\u00E9s et en cr\u00E9er de nouveaux.
muc.room.summary.destroyed = Salon supprim\u00E9 avec succ\u00E8s. muc.room.summary.destroyed = Salon supprim\u00E9 avec succ\u00E8s.
muc.room.summary.total_room = Nombre Total de Salons muc.room.summary.total_room = Nombre Total de Salons
muc.room.summary.sorted_id = Tri\u00E9 par Id de Salon muc.room.summary.sorted_id = Tri\u00E9 par Id de Salon
...@@ -1952,3 +1951,6 @@ muc.service.delete.destructon_title=Destruction Details ...@@ -1952,3 +1951,6 @@ muc.service.delete.destructon_title=Destruction Details
muc.service.delete.service_name=Subdomain: muc.service.delete.service_name=Subdomain:
muc.service.delete.reason=Reason: muc.service.delete.reason=Reason:
muc.service.delete.destroy_service=Destroy Service muc.service.delete.destroy_service=Destroy Service
muc.room.summary.info2=. From here you can view the rooms, edit their properties, and create new rooms.
muc.room.edit.form.service=Service
muc.room.summary.info=Below is an overview of the Group Chat Rooms in the service
...@@ -876,8 +876,6 @@ muc.room.edit.form.log=\u30c1\u30e3\u30c3\u30c8\u30eb\u30fc\u30e0\u3067\u306e\u3 ...@@ -876,8 +876,6 @@ muc.room.edit.form.log=\u30c1\u30e3\u30c3\u30c8\u30eb\u30fc\u30e0\u3067\u306e\u3
# Muc room summary Page # Muc room summary Page
muc.room.summary.title=\u30b0\u30eb\u30fc\u30d7\u30c1\u30e3\u30c3\u30c8\u30eb\u30fc\u30e0 muc.room.summary.title=\u30b0\u30eb\u30fc\u30d7\u30c1\u30e3\u30c3\u30c8\u30eb\u30fc\u30e0
muc.room.summary.info=\u4ee5\u4e0b\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u5185\u306b\u304a\u3051\u308b\u30b0\u30eb\u30fc\u30d7\u30c1\u30e3\u30c3\u30c8\u30eb\u30fc\u30e0\u306e\u6982\u8981\u3067\u3059\u3002\
\u3053\u3053\u304b\u3089\u30c1\u30e3\u30c3\u30c8\u30eb\u30fc\u30e0\u3092\u53c2\u7167\u3057\u305f\u308a\u3001\u5c5e\u6027\u3092\u5909\u66f4\u3057\u305f\u308a\u3001\u65b0\u898f\u306b\u30c1\u30e3\u30c3\u30c8\u30eb\u30fc\u30e0\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002
muc.room.summary.destroyed=\u30c1\u30e3\u30c3\u30c8\u30eb\u30fc\u30e0\u304c\u6b63\u5e38\u306b\u524a\u9664\u3055\u308c\u307e\u3057\u305f\u3002 muc.room.summary.destroyed=\u30c1\u30e3\u30c3\u30c8\u30eb\u30fc\u30e0\u304c\u6b63\u5e38\u306b\u524a\u9664\u3055\u308c\u307e\u3057\u305f\u3002
muc.room.summary.total_room=\u5168\u30c1\u30e3\u30c3\u30c8\u30eb\u30fc\u30e0 muc.room.summary.total_room=\u5168\u30c1\u30e3\u30c3\u30c8\u30eb\u30fc\u30e0
muc.room.summary.sorted_id=\u30eb\u30fc\u30e0ID\u306b\u3088\u308b\u4e26\u3079\u66ff\u3048 muc.room.summary.sorted_id=\u30eb\u30fc\u30e0ID\u306b\u3088\u308b\u4e26\u3079\u66ff\u3048
...@@ -2479,3 +2477,6 @@ muc.service.delete.destructon_title=Destruction Details ...@@ -2479,3 +2477,6 @@ muc.service.delete.destructon_title=Destruction Details
muc.service.delete.service_name=Subdomain: muc.service.delete.service_name=Subdomain:
muc.service.delete.reason=Reason: muc.service.delete.reason=Reason:
muc.service.delete.destroy_service=Destroy Service muc.service.delete.destroy_service=Destroy Service
muc.room.summary.info2=. From here you can view the rooms, edit their properties, and create new rooms.
muc.room.edit.form.service=Service
muc.room.summary.info=Below is an overview of the Group Chat Rooms in the service
...@@ -675,8 +675,6 @@ muc.room.edit.form.log=Gesprekken opslaan ...@@ -675,8 +675,6 @@ muc.room.edit.form.log=Gesprekken opslaan
# Muc room summary Page # Muc room summary Page
muc.room.summary.title=Gespreksruimtes muc.room.summary.title=Gespreksruimtes
muc.room.summary.info=Hieronder staat een overzicht van de gespreksruimtes op het systeem. Van hieruit kan u \
de gespreksruimtes zien, instellingen wijzigen, en nieuwe gespreksruimtes aanmaken.
muc.room.summary.destroyed=De gespreksruimte is succesvol verwijderd. muc.room.summary.destroyed=De gespreksruimte is succesvol verwijderd.
muc.room.summary.total_room=Aantal gespreksruimtes muc.room.summary.total_room=Aantal gespreksruimtes
muc.room.summary.sorted_id=Rangschikken op gespreksruimte ID muc.room.summary.sorted_id=Rangschikken op gespreksruimte ID
...@@ -2343,3 +2341,6 @@ muc.service.delete.destructon_title=Destruction Details ...@@ -2343,3 +2341,6 @@ muc.service.delete.destructon_title=Destruction Details
muc.service.delete.service_name=Subdomain: muc.service.delete.service_name=Subdomain:
muc.service.delete.reason=Reason: muc.service.delete.reason=Reason:
muc.service.delete.destroy_service=Destroy Service muc.service.delete.destroy_service=Destroy Service
muc.room.summary.info2=. From here you can view the rooms, edit their properties, and create new rooms.
muc.room.edit.form.service=Service
muc.room.summary.info=Below is an overview of the Group Chat Rooms in the service
...@@ -679,8 +679,6 @@ muc.room.edit.form.log=Loguj wiadomo\u015bci z tego pokoju ...@@ -679,8 +679,6 @@ muc.room.edit.form.log=Loguj wiadomo\u015bci z tego pokoju
# Muc room summary Page # Muc room summary Page
muc.room.summary.title=Pokoje konferencyjne muc.room.summary.title=Pokoje konferencyjne
muc.room.summary.info=Poni\u017cej znajduje si\u0119 lista pokoi konferencyjnych w systemie. Mo\u017cna tutaj przegl\u0105da\u0107 pokoje, \
zmienia\u0107 ich w\u0142asno\u015bci oraz tworzy\u0107 nowe pokoje.
muc.room.summary.destroyed=Usuni\u0119to pok\u00f3j. muc.room.summary.destroyed=Usuni\u0119to pok\u00f3j.
muc.room.summary.total_room=\u0141\u0105cznie pokoi muc.room.summary.total_room=\u0141\u0105cznie pokoi
muc.room.summary.sorted_id=Posortowane po ID pokoju muc.room.summary.sorted_id=Posortowane po ID pokoju
...@@ -2312,3 +2310,6 @@ muc.service.delete.destructon_title=Destruction Details ...@@ -2312,3 +2310,6 @@ muc.service.delete.destructon_title=Destruction Details
muc.service.delete.service_name=Subdomain: muc.service.delete.service_name=Subdomain:
muc.service.delete.reason=Reason: muc.service.delete.reason=Reason:
muc.service.delete.destroy_service=Destroy Service muc.service.delete.destroy_service=Destroy Service
muc.room.summary.info2=. From here you can view the rooms, edit their properties, and create new rooms.
muc.room.edit.form.service=Service
muc.room.summary.info=Below is an overview of the Group Chat Rooms in the service
...@@ -693,8 +693,6 @@ muc.room.edit.form.log=Registrar Conversa\u00e7\u00f5es da Sala ...@@ -693,8 +693,6 @@ muc.room.edit.form.log=Registrar Conversa\u00e7\u00f5es da Sala
# Muc room summary Page # Muc room summary Page
muc.room.summary.title=Salas de Confer\u00eancia muc.room.summary.title=Salas de Confer\u00eancia
muc.room.summary.info=Abaixo encontra-se uma vis\u00e3o geral das salas de confer\u00eancia do sistema. Daqui voc\u00ea pode \
visualizar as salas, editar suas propriedades e criar novas salas.
muc.room.summary.destroyed=Sala destru\u00edda com sucesso. muc.room.summary.destroyed=Sala destru\u00edda com sucesso.
muc.room.summary.total_room=Total de Salas muc.room.summary.total_room=Total de Salas
muc.room.summary.sorted_id=Ordenado pela Id da Sala muc.room.summary.sorted_id=Ordenado pela Id da Sala
...@@ -2346,3 +2344,6 @@ muc.service.delete.destructon_title=Destruction Details ...@@ -2346,3 +2344,6 @@ muc.service.delete.destructon_title=Destruction Details
muc.service.delete.service_name=Subdomain: muc.service.delete.service_name=Subdomain:
muc.service.delete.reason=Reason: muc.service.delete.reason=Reason:
muc.service.delete.destroy_service=Destroy Service muc.service.delete.destroy_service=Destroy Service
muc.room.summary.info2=. From here you can view the rooms, edit their properties, and create new rooms.
muc.room.edit.form.service=Service
muc.room.summary.info=Below is an overview of the Group Chat Rooms in the service
...@@ -661,7 +661,6 @@ muc.room.edit.form.log=\u767b\u5f55\u623f\u95f4\u5bf9\u8bdd ...@@ -661,7 +661,6 @@ muc.room.edit.form.log=\u767b\u5f55\u623f\u95f4\u5bf9\u8bdd
# Muc room summary Page # Muc room summary Page
muc.room.summary.title=\u5206\u7ec4\u804a\u5929\u623f\u95f4 muc.room.summary.title=\u5206\u7ec4\u804a\u5929\u623f\u95f4
muc.room.summary.info=\u4e0b\u9762\u662f\u7cfb\u7edf\u4e2d\u201c\u5206\u7ec4\u804a\u5929\u623f\u95f4\u201d\u7684\u6982\u51b5\u3002\u4ece\u8fd9\u91cc\u60a8\u53ef\u4ee5\u67e5\u770b\u5404\u623f\u95f4\u3001\u7f16\u8f91\u5b83\u4eec\u7684\u5c5e\u6027\u4ee5\u53ca\u521b\u5efa\u65b0\u623f\u95f4\u3002
muc.room.summary.destroyed=\u5df2\u6210\u529f\u6bc1\u6389\u623f\u95f4\u3002 muc.room.summary.destroyed=\u5df2\u6210\u529f\u6bc1\u6389\u623f\u95f4\u3002
muc.room.summary.total_room=\u623f\u95f4\u603b\u6570 muc.room.summary.total_room=\u623f\u95f4\u603b\u6570
muc.room.summary.sorted_id=\u6309\u623f\u95f4\u6807\u8bc6\u6392\u5e8f muc.room.summary.sorted_id=\u6309\u623f\u95f4\u6807\u8bc6\u6392\u5e8f
...@@ -2123,3 +2122,6 @@ muc.service.delete.destructon_title=Destruction Details ...@@ -2123,3 +2122,6 @@ muc.service.delete.destructon_title=Destruction Details
muc.service.delete.service_name=Subdomain: muc.service.delete.service_name=Subdomain:
muc.service.delete.reason=Reason: muc.service.delete.reason=Reason:
muc.service.delete.destroy_service=Destroy Service muc.service.delete.destroy_service=Destroy Service
muc.room.summary.info2=. From here you can view the rooms, edit their properties, and create new rooms.
muc.room.edit.form.service=Service
muc.room.summary.info=Below is an overview of the Group Chat Rooms in the service
...@@ -15,7 +15,6 @@ import org.jivesoftware.openfire.commands.SessionData; ...@@ -15,7 +15,6 @@ import org.jivesoftware.openfire.commands.SessionData;
import org.jivesoftware.openfire.muc.MUCRoom; import org.jivesoftware.openfire.muc.MUCRoom;
import org.jivesoftware.openfire.muc.MultiUserChatService; import org.jivesoftware.openfire.muc.MultiUserChatService;
import org.jivesoftware.openfire.muc.NotAllowedException; import org.jivesoftware.openfire.muc.NotAllowedException;
import org.jivesoftware.util.NotFoundException;
import org.xmpp.forms.DataForm; import org.xmpp.forms.DataForm;
import org.xmpp.forms.FormField; import org.xmpp.forms.FormField;
import org.xmpp.packet.JID; import org.xmpp.packet.JID;
...@@ -63,19 +62,17 @@ public class CreateMUCRoom extends AdHocCommand { ...@@ -63,19 +62,17 @@ public class CreateMUCRoom extends AdHocCommand {
// Remove the server's domain name from the passed hostname // Remove the server's domain name from the passed hostname
String servicename = servicehostname.replace("."+XMPPServer.getInstance().getServerInfo().getXMPPDomain(), ""); String servicename = servicehostname.replace("."+XMPPServer.getInstance().getServerInfo().getXMPPDomain(), "");
MultiUserChatService mucService; MultiUserChatService mucService;
try { mucService = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(servicename);
mucService = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(servicename); if (mucService == null) {
if (!mucService.isServiceEnabled()) {
note.addAttribute("type", "error");
note.setText("Multi user chat is disabled for specified service.");
return;
}
}
catch (NotFoundException e) {
note.addAttribute("type", "error"); note.addAttribute("type", "error");
note.setText("Invalid service name specified."); note.setText("Invalid service name specified.");
return; return;
} }
if (!mucService.isServiceEnabled()) {
note.addAttribute("type", "error");
note.setText("Multi user chat is disabled for specified service.");
return;
}
// Let's create the jid and check that they are a local user // Let's create the jid and check that they are a local user
String roomname = get(data, "roomname", 0); String roomname = get(data, "roomname", 0);
if (roomname == null) { if (roomname == null) {
......
...@@ -271,6 +271,7 @@ public class HistoryStrategy { ...@@ -271,6 +271,7 @@ public class HistoryStrategy {
* @param prefix the prefix to use (without trailing dot) on property names. * @param prefix the prefix to use (without trailing dot) on property names.
*/ */
public void setContext(String subdomain, String prefix) { public void setContext(String subdomain, String prefix) {
this.contextSubdomain = subdomain;
this.contextPrefix = prefix; this.contextPrefix = prefix;
setTypeFromString(MUCPersistenceManager.getProperty(subdomain, prefix + ".type")); setTypeFromString(MUCPersistenceManager.getProperty(subdomain, prefix + ".type"));
String maxNumberString = MUCPersistenceManager.getProperty(subdomain, prefix + ".maxNumber"); String maxNumberString = MUCPersistenceManager.getProperty(subdomain, prefix + ".maxNumber");
......
...@@ -16,7 +16,6 @@ import org.jivesoftware.openfire.muc.spi.LocalMUCRoom; ...@@ -16,7 +16,6 @@ import org.jivesoftware.openfire.muc.spi.LocalMUCRoom;
import org.jivesoftware.openfire.muc.MultiUserChatService; import org.jivesoftware.openfire.muc.MultiUserChatService;
import org.jivesoftware.util.cache.ClusterTask; import org.jivesoftware.util.cache.ClusterTask;
import org.jivesoftware.util.cache.ExternalizableUtil; import org.jivesoftware.util.cache.ExternalizableUtil;
import org.jivesoftware.util.NotFoundException;
import java.io.IOException; import java.io.IOException;
import java.io.ObjectInput; import java.io.ObjectInput;
...@@ -62,15 +61,13 @@ public abstract class MUCRoomTask implements ClusterTask { ...@@ -62,15 +61,13 @@ public abstract class MUCRoomTask implements ClusterTask {
originator = ExternalizableUtil.getInstance().readBoolean(in); originator = ExternalizableUtil.getInstance().readBoolean(in);
String roomName = ExternalizableUtil.getInstance().readSafeUTF(in); String roomName = ExternalizableUtil.getInstance().readSafeUTF(in);
String subdomain = ExternalizableUtil.getInstance().readSafeUTF(in); String subdomain = ExternalizableUtil.getInstance().readSafeUTF(in);
try { MultiUserChatService mucService = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(subdomain);
MultiUserChatService mucService = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(subdomain); if (mucService == null) {
room = (LocalMUCRoom) mucService.getChatRoom(roomName);
if (room == null) {
throw new IllegalArgumentException("Room not found: " + roomName);
}
}
catch (NotFoundException e) {
throw new IllegalArgumentException("MUC service not found for subdomain: "+subdomain); throw new IllegalArgumentException("MUC service not found for subdomain: "+subdomain);
} }
room = (LocalMUCRoom) mucService.getChatRoom(roomName);
if (room == null) {
throw new IllegalArgumentException("Room not found: " + roomName);
}
} }
} }
...@@ -17,7 +17,6 @@ import org.jivesoftware.openfire.muc.spi.MultiUserChatServiceImpl; ...@@ -17,7 +17,6 @@ import org.jivesoftware.openfire.muc.spi.MultiUserChatServiceImpl;
import org.jivesoftware.openfire.muc.spi.MUCPersistenceManager; import org.jivesoftware.openfire.muc.spi.MUCPersistenceManager;
import org.jivesoftware.util.cache.ClusterTask; import org.jivesoftware.util.cache.ClusterTask;
import org.jivesoftware.util.cache.ExternalizableUtil; import org.jivesoftware.util.cache.ExternalizableUtil;
import org.jivesoftware.util.NotFoundException;
import org.jivesoftware.util.Log; import org.jivesoftware.util.Log;
import java.io.IOException; import java.io.IOException;
...@@ -46,8 +45,8 @@ public class ServiceUpdatedEvent implements ClusterTask { ...@@ -46,8 +45,8 @@ public class ServiceUpdatedEvent implements ClusterTask {
} }
public void run() { public void run() {
try { MultiUserChatService service = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(subdomain);
MultiUserChatService service = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(subdomain); if (service != null) {
if (service instanceof MultiUserChatServiceImpl) { if (service instanceof MultiUserChatServiceImpl) {
MUCPersistenceManager.refreshProperties(subdomain); MUCPersistenceManager.refreshProperties(subdomain);
((MultiUserChatServiceImpl)service).initializeSettings(); ((MultiUserChatServiceImpl)service).initializeSettings();
...@@ -56,7 +55,7 @@ public class ServiceUpdatedEvent implements ClusterTask { ...@@ -56,7 +55,7 @@ public class ServiceUpdatedEvent implements ClusterTask {
// Ok. We don't handle non default implementations for this. Why are we seeing it? // Ok. We don't handle non default implementations for this. Why are we seeing it?
} }
} }
catch (NotFoundException e) { else {
// Hrm. We got an update for something that we don't have. // Hrm. We got an update for something that we don't have.
Log.warn("ServiceUpdatedEvent: Received update for service we are not running: "+subdomain); Log.warn("ServiceUpdatedEvent: Received update for service we are not running: "+subdomain);
} }
......
...@@ -16,7 +16,6 @@ import org.jivesoftware.openfire.muc.HistoryStrategy; ...@@ -16,7 +16,6 @@ import org.jivesoftware.openfire.muc.HistoryStrategy;
import org.jivesoftware.openfire.muc.spi.MultiUserChatServiceImpl; import org.jivesoftware.openfire.muc.spi.MultiUserChatServiceImpl;
import org.jivesoftware.util.cache.ClusterTask; import org.jivesoftware.util.cache.ClusterTask;
import org.jivesoftware.util.cache.ExternalizableUtil; import org.jivesoftware.util.cache.ExternalizableUtil;
import org.jivesoftware.util.NotFoundException;
import java.io.IOException; import java.io.IOException;
import java.io.ObjectInput; import java.io.ObjectInput;
...@@ -48,15 +47,11 @@ public class UpdateHistoryStrategy implements ClusterTask { ...@@ -48,15 +47,11 @@ public class UpdateHistoryStrategy implements ClusterTask {
} }
public void run() { public void run() {
try { MultiUserChatServiceImpl mucServer = (MultiUserChatServiceImpl) XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(serviceName);
MultiUserChatServiceImpl mucServer = (MultiUserChatServiceImpl) XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(serviceName); if (mucServer == null) throw new IllegalArgumentException("MUC service not found for subdomain: "+serviceName);
HistoryStrategy strategy = mucServer.getHistoryStrategy(); HistoryStrategy strategy = mucServer.getHistoryStrategy();
strategy.setType(HistoryStrategy.Type.values()[type]); strategy.setType(HistoryStrategy.Type.values()[type]);
strategy.setMaxNumber(maxNumber); strategy.setMaxNumber(maxNumber);
}
catch (NotFoundException e) {
throw new IllegalArgumentException("MUC service not found for subdomain: "+serviceName);
}
} }
public void writeExternal(ObjectOutput out) throws IOException { public void writeExternal(ObjectOutput out) throws IOException {
......
...@@ -2195,12 +2195,8 @@ public class LocalMUCRoom implements MUCRoom { ...@@ -2195,12 +2195,8 @@ public class LocalMUCRoom implements MUCRoom {
} }
savedToDB = ExternalizableUtil.getInstance().readBoolean(in); savedToDB = ExternalizableUtil.getInstance().readBoolean(in);
String subdomain = ExternalizableUtil.getInstance().readSafeUTF(in); String subdomain = ExternalizableUtil.getInstance().readSafeUTF(in);
try { mucService = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(subdomain);
mucService = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(subdomain); if (mucService == null) throw new IllegalArgumentException("MUC service not found for subdomain: " + subdomain);
}
catch (NotFoundException e) {
throw new IllegalArgumentException("MUC service not found for subdomain: " + subdomain);
}
roomHistory = new MUCRoomHistory(this, new HistoryStrategy(mucService.getHistoryStrategy())); roomHistory = new MUCRoomHistory(this, new HistoryStrategy(mucService.getHistoryStrategy()));
PacketRouter packetRouter = XMPPServer.getInstance().getPacketRouter(); PacketRouter packetRouter = XMPPServer.getInstance().getPacketRouter();
......
...@@ -19,7 +19,6 @@ import org.jivesoftware.openfire.muc.MUCRoom; ...@@ -19,7 +19,6 @@ import org.jivesoftware.openfire.muc.MUCRoom;
import org.jivesoftware.openfire.muc.MultiUserChatService; import org.jivesoftware.openfire.muc.MultiUserChatService;
import org.jivesoftware.util.Log; import org.jivesoftware.util.Log;
import org.jivesoftware.util.StringUtils; import org.jivesoftware.util.StringUtils;
import org.jivesoftware.util.NotFoundException;
import java.sql.Connection; import java.sql.Connection;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
...@@ -364,9 +363,6 @@ public class MUCPersistenceManager { ...@@ -364,9 +363,6 @@ public class MUCPersistenceManager {
pstmt.executeUpdate(); pstmt.executeUpdate();
} }
} }
catch (NotFoundException e) {
Log.error(e);
}
catch (SQLException sqle) { catch (SQLException sqle) {
Log.error(sqle); Log.error(sqle);
} }
...@@ -584,9 +580,6 @@ public class MUCPersistenceManager { ...@@ -584,9 +580,6 @@ public class MUCPersistenceManager {
} }
rs.close(); rs.close();
} }
catch (NotFoundException e) {
Log.error(e);
}
catch (SQLException sqle) { catch (SQLException sqle) {
Log.error(sqle); Log.error(sqle);
} }
......
...@@ -13,7 +13,6 @@ package org.jivesoftware.openfire.muc.spi; ...@@ -13,7 +13,6 @@ package org.jivesoftware.openfire.muc.spi;
import org.jivesoftware.database.DbConnectionManager; import org.jivesoftware.database.DbConnectionManager;
import org.jivesoftware.util.Log; import org.jivesoftware.util.Log;
import org.jivesoftware.util.NotFoundException;
import org.jivesoftware.openfire.XMPPServer; import org.jivesoftware.openfire.XMPPServer;
import java.sql.Connection; import java.sql.Connection;
...@@ -31,7 +30,7 @@ import java.util.*; ...@@ -31,7 +30,7 @@ import java.util.*;
public class MUCServiceProperties implements Map<String, String> { public class MUCServiceProperties implements Map<String, String> {
private static final String LOAD_PROPERTIES = "SELECT name, propValue FROM mucServiceProp WHERE serviceID=?"; private static final String LOAD_PROPERTIES = "SELECT name, propValue FROM mucServiceProp WHERE serviceID=?";
private static final String INSERT_PROPERTY = "INSERT INTO mucServiceProp(name, propValue) VALUES(?,?,?)"; private static final String INSERT_PROPERTY = "INSERT INTO mucServiceProp(serviceID, name, propValue) VALUES(?,?,?)";
private static final String UPDATE_PROPERTY = "UPDATE mucServiceProp SET propValue=? WHERE serviceID=? AND name=?"; private static final String UPDATE_PROPERTY = "UPDATE mucServiceProp SET propValue=? WHERE serviceID=? AND name=?";
private static final String DELETE_PROPERTY = "DELETE FROM mucServiceProp WHERE serviceID=? AND name=?"; private static final String DELETE_PROPERTY = "DELETE FROM mucServiceProp WHERE serviceID=? AND name=?";
...@@ -48,13 +47,13 @@ public class MUCServiceProperties implements Map<String, String> { ...@@ -48,13 +47,13 @@ public class MUCServiceProperties implements Map<String, String> {
properties.clear(); properties.clear();
} }
try { serviceID = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServiceID(subdomain);
serviceID = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServiceID(subdomain); if (serviceID == null) {
}
catch (NotFoundException e) {
Log.debug("MUCServiceProperties: Unable to find service ID for subdomain "+subdomain); Log.debug("MUCServiceProperties: Unable to find service ID for subdomain "+subdomain);
} }
loadProperties(); else {
loadProperties();
}
} }
public int size() { public int size() {
......
...@@ -56,14 +56,14 @@ ...@@ -56,14 +56,14 @@
mucService.setRoomCreationRestricted(false); mucService.setRoomCreationRestricted(false);
// Log the event // Log the event
webManager.logEvent("set MUC room creation to restricted for service "+mucname, null); webManager.logEvent("set MUC room creation to restricted for service "+mucname, null);
response.sendRedirect("muc-create-permission.jsp?success=true"); response.sendRedirect("muc-create-permission.jsp?success=true&mucname="+URLEncoder.encode(mucname, "UTF-8"));
return; return;
} }
else { else {
mucService.setRoomCreationRestricted(true); mucService.setRoomCreationRestricted(true);
// Log the event // Log the event
webManager.logEvent("set MUC room creation to not restricted for service "+mucname, null); webManager.logEvent("set MUC room creation to not restricted for service "+mucname, null);
response.sendRedirect("muc-create-permission.jsp?success=true"); response.sendRedirect("muc-create-permission.jsp?success=true&mucname="+URLEncoder.encode(mucname, "UTF-8"));
return; return;
} }
} }
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
mucService.addUserAllowedToCreate(userJID); mucService.addUserAllowedToCreate(userJID);
// Log the event // Log the event
webManager.logEvent("added MUC room creation permission to "+userJID+" for service "+mucname, null); webManager.logEvent("added MUC room creation permission to "+userJID+" for service "+mucname, null);
response.sendRedirect("muc-create-permission.jsp?addsuccess=true"); response.sendRedirect("muc-create-permission.jsp?addsuccess=true&mucname="+URLEncoder.encode(mucname, "UTF-8"));
return; return;
} }
} }
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
// Log the event // Log the event
webManager.logEvent("removed MUC room creation permission from "+userJID+" for service "+mucname, null); webManager.logEvent("removed MUC room creation permission from "+userJID+" for service "+mucname, null);
// done, return // done, return
response.sendRedirect("muc-create-permission.jsp?deletesuccess=true"); response.sendRedirect("muc-create-permission.jsp?deletesuccess=true&mucname="+URLEncoder.encode(mucname, "UTF-8"));
return; return;
} }
%> %>
...@@ -150,7 +150,8 @@ ...@@ -150,7 +150,8 @@
<!-- BEGIN 'Permission Policy' --> <!-- BEGIN 'Permission Policy' -->
<form action="muc-create-permission.jsp?save" method="post"> <form action="muc-create-permission.jsp?save" method="post">
<div class="jive-contentBoxHeader"> <input type="hidden" name="mucname" value="<%= mucname %>" />
<div class="jive-contentBoxHeader">
<fmt:message key="muc.create.permission.policy" /> <fmt:message key="muc.create.permission.policy" />
</div> </div>
<div class="jive-contentBox"> <div class="jive-contentBox">
...@@ -188,7 +189,8 @@ ...@@ -188,7 +189,8 @@
<% if (mucService.isRoomCreationRestricted()) { %> <% if (mucService.isRoomCreationRestricted()) { %>
<!-- BEGIN 'Allowed Users' --> <!-- BEGIN 'Allowed Users' -->
<form action="muc-create-permission.jsp?add" method="post"> <form action="muc-create-permission.jsp?add" method="post">
<div class="jive-contentBoxHeader"> <input type="hidden" name="mucname" value="<%= mucname %>" />
<div class="jive-contentBoxHeader">
<fmt:message key="muc.create.permission.allowed_users" /> <fmt:message key="muc.create.permission.allowed_users" />
</div> </div>
<div class="jive-contentBox"> <div class="jive-contentBox">
...@@ -226,7 +228,7 @@ ...@@ -226,7 +228,7 @@
<%= user %> <%= user %>
</td> </td>
<td width="1%" align="center"> <td width="1%" align="center">
<a href="muc-create-permission.jsp?userJID=<%= user %>&delete=true" <a href="muc-create-permission.jsp?userJID=<%= user %>&delete=true&mucname=<%= URLEncoder.encode(mucname, "UTF-8") %>"
title="<fmt:message key="muc.create.permission.click_title" />" title="<fmt:message key="muc.create.permission.click_title" />"
onclick="return confirm('<fmt:message key="muc.create.permission.confirm_remove" />');" onclick="return confirm('<fmt:message key="muc.create.permission.confirm_remove" />');"
><img src="images/delete-16x16.gif" width="16" height="16" border="0" alt=""></a> ><img src="images/delete-16x16.gif" width="16" height="16" border="0" alt=""></a>
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
// Log the event // Log the event
webManager.logEvent("set MUC history settings for service "+mucname, "type = "+policy+"\nmax messages = "+numMessages); webManager.logEvent("set MUC history settings for service "+mucname, "type = "+policy+"\nmax messages = "+numMessages);
// All done, redirect // All done, redirect
response.sendRedirect("muc-history-settings.jsp?success=true"); response.sendRedirect("muc-history-settings.jsp?success=true&mucname="+URLEncoder.encode(mucname, "UTF-8"));
return; return;
} }
} }
...@@ -125,7 +125,8 @@ ...@@ -125,7 +125,8 @@
<!-- BEGIN 'History Settings' --> <!-- BEGIN 'History Settings' -->
<form action="muc-history-settings.jsp" method="post"> <form action="muc-history-settings.jsp" method="post">
<div class="jive-contentBoxHeader"> <input type="hidden" name="mucname" value="<%= mucname %>" />
<div class="jive-contentBoxHeader">
<fmt:message key="groupchat.history.settings.legend" /> <fmt:message key="groupchat.history.settings.legend" />
</div> </div>
<div class="jive-contentBox"> <div class="jive-contentBox">
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
if (room == null) { if (room == null) {
// The requested room name does not exist so return to the list of the existing rooms // The requested room name does not exist so return to the list of the existing rooms
response.sendRedirect("muc-room-summary.jsp"); response.sendRedirect("muc-room-summary.jsp?roomJID="+URLEncoder.encode(roomJID.toBareJID(), "UTF-8"));
return; return;
} }
...@@ -118,14 +118,14 @@ ...@@ -118,14 +118,14 @@
<head> <head>
<title><fmt:message key="muc.room.affiliations.title"/></title> <title><fmt:message key="muc.room.affiliations.title"/></title>
<meta name="subPageID" content="muc-room-affiliations"/> <meta name="subPageID" content="muc-room-affiliations"/>
<meta name="extraParams" content="<%= "roomName="+URLEncoder.encode(roomName, "UTF-8") %>"/> <meta name="extraParams" content="<%= "roomJID="+URLEncoder.encode(roomJID.toBareJID(), "UTF-8") %>"/>
<meta name="helpPage" content="edit_group_chat_room_user_permissions.html"/> <meta name="helpPage" content="edit_group_chat_room_user_permissions.html"/>
</head> </head>
<body> <body>
<p> <p>
<fmt:message key="muc.room.affiliations.info" /> <fmt:message key="muc.room.affiliations.info" />
<b><a href="muc-room-edit-form.jsp?roomJID=<%= URLEncoder.encode(room.getJID().toBareJID(), "UTF-8") %>"><%= room.getName() %></a></b>. <b><a href="muc-room-edit-form.jsp?roomJID=<%= URLEncoder.encode(room.getJID().toBareJID(), "UTF-8") %>"><%= room.getJID().toBareJID() %></a></b>.
<fmt:message key="muc.room.affiliations.info_detail" /> <fmt:message key="muc.room.affiliations.info_detail" />
</p> </p>
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
<% } %> <% } %>
<form action="muc-room-affiliations.jsp?add" method="post"> <form action="muc-room-affiliations.jsp?add" method="post">
<input type="hidden" name="roomName" value="<%= roomName %>"> <input type="hidden" name="roomJID" value="<%= roomJID.toBareJID() %>">
<fieldset> <fieldset>
<legend><fmt:message key="muc.room.affiliations.permission" /></legend> <legend><fmt:message key="muc.room.affiliations.permission" /></legend>
......
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
- Use is subject to license terms. - Use is subject to license terms.
--%> --%>
<% // Redirect to muc-room-edit-form and set that a room will be created <%
// Redirect to muc-room-edit-form and set that a room will be created
response.sendRedirect("muc-room-edit-form.jsp?create=true"); response.sendRedirect("muc-room-edit-form.jsp?create=true");
return; return;
%> %>
\ No newline at end of file
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
// Handle a cancel // Handle a cancel
if (cancel) { if (cancel) {
response.sendRedirect("muc-room-summary.jsp"); response.sendRedirect("muc-room-summary.jsp?roomJID="+URLEncoder.encode(roomJID.toBareJID(), "UTF-8"));
return; return;
} }
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
webManager.logEvent("destroyed MUC room "+roomName, "reason = "+reason+"\nalt jid = "+alternateJID); webManager.logEvent("destroyed MUC room "+roomName, "reason = "+reason+"\nalt jid = "+alternateJID);
} }
// Done, so redirect // Done, so redirect
response.sendRedirect("muc-room-summary.jsp?deletesuccess=true"); response.sendRedirect("muc-room-summary.jsp?roomJID="+URLEncoder.encode(roomJID.toBareJID(), "UTF-8")+"&deletesuccess=true");
return; return;
} }
%> %>
...@@ -63,12 +63,12 @@ ...@@ -63,12 +63,12 @@
<p> <p>
<fmt:message key="muc.room.delete.info" /> <fmt:message key="muc.room.delete.info" />
<b><a href="muc-room-edit-form.jsp?roomJID=<%= URLEncoder.encode(room.getJID().toBareJID(), "UTF-8") %>"><%= room.getName() %></a></b> <b><a href="muc-room-edit-form.jsp?roomJID=<%= URLEncoder.encode(room.getJID().toBareJID(), "UTF-8") %>"><%= room.getJID().toBareJID() %></a></b>
<fmt:message key="muc.room.delete.detail" /> <fmt:message key="muc.room.delete.detail" />
</p> </p>
<form action="muc-room-delete.jsp"> <form action="muc-room-delete.jsp">
<input type="hidden" name="roomName" value="<%= roomName %>"> <input type="hidden" name="roomJID" value="<%= roomJID.toBareJID() %>">
<fieldset> <fieldset>
<legend><fmt:message key="muc.room.delete.destructon_title" /></legend> <legend><fmt:message key="muc.room.delete.destructon_title" /></legend>
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<fmt:message key="muc.room.delete.room_id" /> <fmt:message key="muc.room.delete.room_id" />
</td> </td>
<td> <td>
<%= room.getName() %> <%= room.getJID().toBareJID() %>
</td> </td>
</tr> </tr>
<tr> <tr>
......
...@@ -37,7 +37,18 @@ ...@@ -37,7 +37,18 @@
boolean save = ParamUtils.getBooleanParameter(request,"save"); boolean save = ParamUtils.getBooleanParameter(request,"save");
boolean success = ParamUtils.getBooleanParameter(request,"success"); boolean success = ParamUtils.getBooleanParameter(request,"success");
boolean addsuccess = ParamUtils.getBooleanParameter(request,"addsuccess"); boolean addsuccess = ParamUtils.getBooleanParameter(request,"addsuccess");
JID roomJID = new JID(ParamUtils.getParameter(request,"roomJID")); String roomName = ParamUtils.getParameter(request,"roomName");
String mucName = ParamUtils.getParameter(request,"mucName");
String roomJIDStr = ParamUtils.getParameter(request,"roomJID");
JID roomJID = null;
if (roomName != null && mucName != null) {
roomJID = new JID(roomName, mucName, null);
}
else if (roomJIDStr != null) {
roomJID = new JID(roomJIDStr);
roomName = roomJID.getNode();
mucName = roomJID.getDomain();
}
String naturalName = ParamUtils.getParameter(request,"roomconfig_roomname"); String naturalName = ParamUtils.getParameter(request,"roomconfig_roomname");
String description = ParamUtils.getParameter(request,"roomconfig_roomdesc"); String description = ParamUtils.getParameter(request,"roomconfig_roomdesc");
String maxUsers = ParamUtils.getParameter(request, "roomconfig_maxusers"); String maxUsers = ParamUtils.getParameter(request, "roomconfig_maxusers");
...@@ -59,8 +70,6 @@ ...@@ -59,8 +70,6 @@
String registrationEnabled = ParamUtils.getParameter(request, "roomconfig_registration"); String registrationEnabled = ParamUtils.getParameter(request, "roomconfig_registration");
String roomSubject = ParamUtils.getParameter(request, "room_topic"); String roomSubject = ParamUtils.getParameter(request, "room_topic");
String roomName = roomJID.getNode();
if (webManager.getMultiUserChatManager().getMultiUserChatServicesCount() < 1) { if (webManager.getMultiUserChatManager().getMultiUserChatServicesCount() < 1) {
// No services exist, so redirect to where one can configure the services // No services exist, so redirect to where one can configure the services
response.sendRedirect("muc-service-summary.jsp"); response.sendRedirect("muc-service-summary.jsp");
...@@ -69,7 +78,7 @@ ...@@ -69,7 +78,7 @@
// Handle a cancel // Handle a cancel
if (request.getParameter("cancel") != null) { if (request.getParameter("cancel") != null) {
response.sendRedirect("muc-room-summary.jsp"); response.sendRedirect("muc-room-summary.jsp?roomJID="+URLEncoder.encode(roomJID.toBareJID(), "UTF-8"));
return; return;
} }
...@@ -80,7 +89,7 @@ ...@@ -80,7 +89,7 @@
if (room == null) { if (room == null) {
// The requested room name does not exist so return to the list of the existing rooms // The requested room name does not exist so return to the list of the existing rooms
response.sendRedirect("muc-room-summary.jsp"); response.sendRedirect("muc-room-summary.jsp?roomJID="+URLEncoder.encode(roomJID.toBareJID(), "UTF-8"));
return; return;
} }
} }
...@@ -326,7 +335,7 @@ ...@@ -326,7 +335,7 @@
<% } else { %> <% } else { %>
<meta name="subPageID" content="muc-room-edit-form"/> <meta name="subPageID" content="muc-room-edit-form"/>
<% } %> <% } %>
<meta name="extraParams" content="<%= "roomJID="+URLEncoder.encode(roomJID.toBareJID(), "UTF-8")+"&create="+create %>"/> <meta name="extraParams" content="<%= "roomJID="+(roomJID != null ? URLEncoder.encode(roomJID.toBareJID(), "UTF-8") : "")+"&create="+create %>"/>
<meta name="helpPage" content="view_group_chat_room_summary.html"/> <meta name="helpPage" content="view_group_chat_room_summary.html"/>
</head> </head>
<body> <body>
...@@ -438,9 +447,10 @@ ...@@ -438,9 +447,10 @@
<td><fmt:message key="muc.room.edit.form.room_id" />:</td> <td><fmt:message key="muc.room.edit.form.room_id" />:</td>
<td><input type="text" name="roomName" value="<%= roomName %>"> <td><input type="text" name="roomName" value="<%= roomName %>">
<% if (webManager.getMultiUserChatManager().getMultiUserChatServicesCount() > 1) { %> <% if (webManager.getMultiUserChatManager().getMultiUserChatServicesCount() > 1) { %>
@<select name="mucname"> @<select name="mucName">
<% for (MultiUserChatService service : webManager.getMultiUserChatManager().getMultiUserChatServices()) { %> <% for (MultiUserChatService service : webManager.getMultiUserChatManager().getMultiUserChatServices()) { %>
<option value="<%= service.getServiceName() %>"><%= service.getServiceDomain() %></option> <% if (service.isServicePrivate()) continue; %>
<option value="<%= service.getServiceName() %>"<%= service.getServiceDomain().equals(mucName) ? " selected='selected'" : "" %>><%= service.getServiceDomain() %></option>
<% } %> <% } %>
</select> </select>
<% } else { %> <% } else { %>
...@@ -451,13 +461,18 @@ ...@@ -451,13 +461,18 @@
// Private and hidden, skip it. // Private and hidden, skip it.
continue; continue;
} }
out.print(service.getServiceDomain()); out.print("<input type='hidden' name='mucName' value='"+service.getServiceDomain()+"'/>"+service.getServiceDomain());
break; break;
} }
%> %>
<% } %> <% } %>
</td> </td>
</tr> </tr>
<% } else { %>
<tr>
<td><fmt:message key="muc.room.edit.form.service" />:</td>
<td><%= roomJID.getDomain() %></td>
</tr>
<% } %> <% } %>
<tr> <tr>
<td><fmt:message key="muc.room.edit.form.room_name" />:</td> <td><fmt:message key="muc.room.edit.form.room_name" />:</td>
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
MUCRoom room = webManager.getMultiUserChatManager().getMultiUserChatService(roomJID).getChatRoom(roomName); MUCRoom room = webManager.getMultiUserChatManager().getMultiUserChatService(roomJID).getChatRoom(roomName);
if (room == null) { if (room == null) {
// The requested room name does not exist so return to the list of the existing rooms // The requested room name does not exist so return to the list of the existing rooms
response.sendRedirect("muc-room-summary.jsp"); response.sendRedirect("muc-room-summary.jsp?roomJID="+URLEncoder.encode(roomJID.toBareJID(), "UTF-8"));
return; return;
} }
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<head> <head>
<title><fmt:message key="muc.room.occupants.title"/></title> <title><fmt:message key="muc.room.occupants.title"/></title>
<meta name="subPageID" content="muc-room-edit-form"/> <meta name="subPageID" content="muc-room-edit-form"/>
<meta name="extraParams" content="<%= "roomName="+URLEncoder.encode(roomName, "UTF-8")+"&create=false" %>"/> <meta name="extraParams" content="<%= "roomJID="+URLEncoder.encode(roomJID.toBareJID(), "UTF-8")+"&create=false" %>"/>
</head> </head>
<body> <body>
......
...@@ -15,27 +15,26 @@ ...@@ -15,27 +15,26 @@
errorPage="error.jsp" errorPage="error.jsp"
%> %>
<%@ page import="org.jivesoftware.openfire.muc.MultiUserChatService" %> <%@ page import="org.jivesoftware.openfire.muc.MultiUserChatService" %>
<%@ page import="org.xmpp.packet.JID" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%> <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %> <%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager" /> <jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager" />
<% webManager.init(request, response, session, application, out ); %> <% webManager.init(request, response, session, application, out ); %>
<html>
<head>
<title><fmt:message key="muc.room.summary.title"/></title>
<meta name="pageID" content="muc-room-summary"/>
<meta name="helpPage" content="edit_group_chat_room_settings.html"/>
</head>
<body>
<% // Get parameters <% // Get parameters
int start = ParamUtils.getIntParameter(request,"start",0); int start = ParamUtils.getIntParameter(request,"start",0);
int range = ParamUtils.getIntParameter(request,"range",webManager.getRowsPerPage("muc-room-summary", 15)); int range = ParamUtils.getIntParameter(request,"range",webManager.getRowsPerPage("muc-room-summary", 15));
String mucname = ParamUtils.getParameter(request,"mucname"); String mucname = ParamUtils.getParameter(request,"mucname");
String roomJIDStr = ParamUtils.getParameter(request,"roomJID");
JID roomJID = null;
if (roomJIDStr != null) roomJID = new JID(roomJIDStr);
MultiUserChatService mucService = null; MultiUserChatService mucService = null;
if (webManager.getMultiUserChatManager().isServiceRegistered(mucname)) { if (roomJID != null) {
mucService = webManager.getMultiUserChatManager().getMultiUserChatService(roomJID);
}
else if (mucname != null && webManager.getMultiUserChatManager().isServiceRegistered(mucname)) {
mucService = webManager.getMultiUserChatManager().getMultiUserChatService(mucname); mucService = webManager.getMultiUserChatManager().getMultiUserChatService(mucname);
} }
else { else {
...@@ -73,9 +72,18 @@ ...@@ -73,9 +72,18 @@
int curPage = (start/range) + 1; int curPage = (start/range) + 1;
int maxRoomIndex = (start+range <= roomsCount ? start+range : roomsCount); int maxRoomIndex = (start+range <= roomsCount ? start+range : roomsCount);
%> %>
<html>
<head>
<title><fmt:message key="muc.room.summary.title"/></title>
<meta name="pageID" content="muc-room-summary"/>
<meta name="helpPage" content="edit_group_chat_room_settings.html"/>
</head>
<body>
<p> <p>
<fmt:message key="muc.room.summary.info" /> <fmt:message key="muc.room.summary.info" />
<a href="muc-service-edit-form.jsp?mucname=<%= URLEncoder.encode(mucService.getServiceName(), "UTF-8")%>"><%= mucService.getServiceDomain() %></a>
<fmt:message key="muc.room.summary.info2" />
</p> </p>
<% if (request.getParameter("deletesuccess") != null) { %> <% if (request.getParameter("deletesuccess") != null) { %>
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
org.jivesoftware.util.ParamUtils" org.jivesoftware.util.ParamUtils"
%><%@ page import="org.xmpp.packet.JID"%> %><%@ page import="org.xmpp.packet.JID"%>
<%@ page import="java.net.URLEncoder" %> <%@ page import="java.net.URLEncoder" %>
<%@ page import="java.util.Collection" %>
<%@ page import="org.jivesoftware.openfire.muc.MultiUserChatService" %> <%@ page import="org.jivesoftware.openfire.muc.MultiUserChatService" %>
<%@ page import="java.util.List" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %> <%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
<tbody> <tbody>
<% // Print the list of users <% // Print the list of users
Collection<MultiUserChatService> services = webManager.getMultiUserChatManager().getMultiUserChatServices(); List<MultiUserChatService> services = webManager.getMultiUserChatManager().getMultiUserChatServices();
if (services.isEmpty()) { if (services.isEmpty()) {
%> %>
<tr> <tr>
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
<%= service.getDescription() %> &nbsp; <%= service.getDescription() %> &nbsp;
</td> </td>
<td width="5%"> <td width="5%">
<%= service.getNumberChatRooms() %> <a href="muc-room-summary.jsp?mucname==<%= URLEncoder.encode(service.getServiceName(), "UTF-8") %>"><%= service.getNumberChatRooms() %></a>
</td> </td>
<td width="5%"> <td width="5%">
<%= service.getNumberConnectedUsers(false) %> <%= service.getNumberConnectedUsers(false) %>
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
mucService.addSysadmin(userJID); mucService.addSysadmin(userJID);
// Log the event // Log the event
webManager.logEvent("added muc sysadmin "+userJID+" for service "+mucname, null); webManager.logEvent("added muc sysadmin "+userJID+" for service "+mucname, null);
response.sendRedirect("muc-sysadmins.jsp?addsuccess=true"); response.sendRedirect("muc-sysadmins.jsp?addsuccess=true&mucname="+URLEncoder.encode(mucname, "UTF-8"));
return; return;
} }
} }
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
// Log the event // Log the event
webManager.logEvent("removed muc sysadmin "+userJID+" for service "+mucname, null); webManager.logEvent("removed muc sysadmin "+userJID+" for service "+mucname, null);
// done, return // done, return
response.sendRedirect("muc-sysadmins.jsp?deletesuccess=true"); response.sendRedirect("muc-sysadmins.jsp?deletesuccess=true&mucname="+URLEncoder.encode(mucname, "UTF-8"));
return; return;
} }
%> %>
...@@ -121,7 +121,8 @@ ...@@ -121,7 +121,8 @@
<!-- BEGIN 'Administrators' --> <!-- BEGIN 'Administrators' -->
<form action="muc-sysadmins.jsp?add" method="post"> <form action="muc-sysadmins.jsp?add" method="post">
<div class="jive-contentBoxHeader"> <input type="hidden" name="mucname" value="<%= mucname %>" />
<div class="jive-contentBoxHeader">
<fmt:message key="groupchat.admins.legend" /> <fmt:message key="groupchat.admins.legend" />
</div> </div>
<div class="jive-contentBox"> <div class="jive-contentBox">
...@@ -157,7 +158,7 @@ ...@@ -157,7 +158,7 @@
<%= user %> <%= user %>
</td> </td>
<td width="1%" align="center"> <td width="1%" align="center">
<a href="muc-sysadmins.jsp?userJID=<%= user %>&delete=true" <a href="muc-sysadmins.jsp?userJID=<%= user %>&delete=true&mucname=<%= URLEncoder.encode(mucname, "UTF-8") %>"
title="<fmt:message key="groupchat.admins.dialog.title" />" title="<fmt:message key="groupchat.admins.dialog.title" />"
onclick="return confirm('<fmt:message key="groupchat.admins.dialog.text" />');" onclick="return confirm('<fmt:message key="groupchat.admins.dialog.text" />');"
><img src="images/delete-16x16.gif" width="16" height="16" border="0" alt=""></a> ><img src="images/delete-16x16.gif" width="16" height="16" border="0" alt=""></a>
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
mucService.setUserIdleTime(-1); mucService.setUserIdleTime(-1);
// Log the event // Log the event
webManager.logEvent("disabled muc idle kick timeout for service "+mucname, null); webManager.logEvent("disabled muc idle kick timeout for service "+mucname, null);
response.sendRedirect("muc-tasks.jsp?kickSettingSuccess=true"); response.sendRedirect("muc-tasks.jsp?kickSettingSuccess=true&mucname="+URLEncoder.encode(mucname, "UTF-8"));
return; return;
} }
// do validation // do validation
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
mucService.setUserIdleTime(idle); mucService.setUserIdleTime(idle);
// Log the event // Log the event
webManager.logEvent("edited muc idle kick timeout for service "+mucname, "timeout = "+idle); webManager.logEvent("edited muc idle kick timeout for service "+mucname, "timeout = "+idle);
response.sendRedirect("muc-tasks.jsp?kickSettingSuccess=true"); response.sendRedirect("muc-tasks.jsp?kickSettingSuccess=true&mucname="+URLEncoder.encode(mucname, "UTF-8"));
return; return;
} }
} }
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
mucService.setLogConversationBatchSize(batchSize); mucService.setLogConversationBatchSize(batchSize);
// Log the event // Log the event
webManager.logEvent("edited muc conversation log settings for service "+mucname, "timeout = "+frequency+"\nbatchSize = "+batchSize); webManager.logEvent("edited muc conversation log settings for service "+mucname, "timeout = "+frequency+"\nbatchSize = "+batchSize);
response.sendRedirect("muc-tasks.jsp?logSettingSuccess=true"); response.sendRedirect("muc-tasks.jsp?logSettingSuccess=true&mucname="+URLEncoder.encode(mucname, "UTF-8"));
return; return;
} }
} }
...@@ -178,7 +178,8 @@ ...@@ -178,7 +178,8 @@
<!-- BEGIN 'Idle User Settings' --> <!-- BEGIN 'Idle User Settings' -->
<form action="muc-tasks.jsp?kickSettings" method="post"> <form action="muc-tasks.jsp?kickSettings" method="post">
<div class="jive-contentBoxHeader"> <input type="hidden" name="mucname" value="<%= mucname %>" />
<div class="jive-contentBoxHeader">
<fmt:message key="muc.tasks.user_setting" /> <fmt:message key="muc.tasks.user_setting" />
</div> </div>
<div class="jive-contentBox"> <div class="jive-contentBox">
...@@ -218,7 +219,8 @@ ...@@ -218,7 +219,8 @@
<!-- BEGIN 'Conversation Logging' --> <!-- BEGIN 'Conversation Logging' -->
<form action="muc-tasks.jsp?logSettings" method="post"> <form action="muc-tasks.jsp?logSettings" method="post">
<div class="jive-contentBoxHeader"> <input type="hidden" name="mucname" value="<%= mucname %>" />
<div class="jive-contentBoxHeader">
<fmt:message key="muc.tasks.conversation.logging" /> <fmt:message key="muc.tasks.conversation.logging" />
</div> </div>
<div class="jive-contentBox"> <div class="jive-contentBox">
......
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