Commit efcc5ed0 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

[JM-1284] Added support for multiple MUC services. Reviewer: Gabriel

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@10071 b35dd754-fafc-0310-a699-88a17e54d16e
parent bba3e672
...@@ -178,7 +178,23 @@ CREATE INDEX jiveSecAuditLog_uname_idx ON jiveSecurityAuditLog (username); ...@@ -178,7 +178,23 @@ CREATE INDEX jiveSecAuditLog_uname_idx ON jiveSecurityAuditLog (username);
-- MUC tables -- MUC tables
CREATE TABLE mucService (
serviceID INTEGER NOT NULL,
subdomain VARCHAR(255) NOT NULL,
description VARCHAR(255),
CONSTRAINT mucService_pk PRIMARY KEY (subdomain)
);
CREATE INDEX mucService_serviceid_idx ON mucService(serviceID);
CREATE TABLE mucServiceProp (
serviceID INTEGER NOT NULL,
name VARCHAR(100) NOT NULL,
propValue VARCHAR(2000) NOT NULL,
CONSTRAINT mucServiceProp_pk PRIMARY KEY (serviceID, name)
);
CREATE TABLE mucRoom ( CREATE TABLE mucRoom (
serviceID INTEGER NOT NULL,
roomID INTEGER NOT NULL, roomID INTEGER NOT NULL,
creationDate CHAR(15) NOT NULL, creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL, modificationDate CHAR(15) NOT NULL,
...@@ -201,9 +217,10 @@ CREATE TABLE mucRoom ( ...@@ -201,9 +217,10 @@ CREATE TABLE mucRoom (
useReservedNick INTEGER NOT NULL, useReservedNick INTEGER NOT NULL,
canChangeNick INTEGER NOT NULL, canChangeNick INTEGER NOT NULL,
canRegister INTEGER NOT NULL, canRegister INTEGER NOT NULL,
CONSTRAINT mucRoom_pk PRIMARY KEY (name) CONSTRAINT mucRoom_pk PRIMARY KEY (serviceID, name)
); );
CREATE INDEX mucRm_roomid_idx ON mucRoom (roomID); CREATE INDEX mucRm_roomid_idx ON mucRoom (roomID);
CREATE INDEX mucRm_serviceid_idx ON mucRoom (serviceID);
CREATE TABLE mucRoomProp ( CREATE TABLE mucRoomProp (
...@@ -365,9 +382,13 @@ CREATE TABLE pubsubDefaultConf ( ...@@ -365,9 +382,13 @@ CREATE TABLE pubsubDefaultConf (
INSERT INTO jiveID (idType, id) VALUES (18, 1); INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1); INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1); INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveID (idType, id) VALUES (26, 1);
INSERT INTO jiveVersion (name, version) VALUES ('openfire', 16); INSERT INTO jiveVersion (name, version) VALUES ('openfire', 17);
-- Entry for admin user -- Entry for admin user
INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate) INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate)
VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0'); VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0');
\ No newline at end of file
-- Entry for default conference service
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
\ No newline at end of file
...@@ -174,7 +174,23 @@ CREATE INDEX jiveSecAuditLog_uname_idx ON jiveSecurityAuditLog (username); ...@@ -174,7 +174,23 @@ CREATE INDEX jiveSecAuditLog_uname_idx ON jiveSecurityAuditLog (username);
// MUC Tables // MUC Tables
CREATE TABLE mucService (
serviceID BIGINT NOT NULL,
subdomain VARCHAR(255) NOT NULL,
description VARCHAR(255),
CONSTRAINT mucService_pk PRIMARY KEY (subdomain)
);
CREATE INDEX mucService_serviceid_idx ON mucService(serviceID);
CREATE TABLE mucServiceProp (
serviceID BIGINT NOT NULL,
name VARCHAR(100) NOT NULL,
propValue VARCHAR(4000) NOT NULL,
CONSTRAINT mucServiceProp_pk PRIMARY KEY (serviceID, name)
);
CREATE TABLE mucRoom ( CREATE TABLE mucRoom (
serviceID BIGINT NOT NULL,
roomID BIGINT NOT NULL, roomID BIGINT NOT NULL,
creationDate CHAR(15) NOT NULL, creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL, modificationDate CHAR(15) NOT NULL,
...@@ -197,10 +213,10 @@ CREATE TABLE mucRoom ( ...@@ -197,10 +213,10 @@ CREATE TABLE mucRoom (
useReservedNick INTEGER NOT NULL, useReservedNick INTEGER NOT NULL,
canChangeNick INTEGER NOT NULL, canChangeNick INTEGER NOT NULL,
canRegister INTEGER NOT NULL, canRegister INTEGER NOT NULL,
CONSTRAINT mucRoom_pk PRIMARY KEY (name) CONSTRAINT mucRoom_pk PRIMARY KEY (serviceID, name)
); );
CREATE INDEX mucRoom_roomid_idx ON mucRoom(roomID); CREATE INDEX mucRoom_roomid_idx ON mucRoom(roomID);
CREATE INDEX mucRoom_serviceid_idx ON mucRoom(serviceID);
CREATE TABLE mucRoomProp ( CREATE TABLE mucRoomProp (
roomID BIGINT NOT NULL, roomID BIGINT NOT NULL,
...@@ -352,9 +368,13 @@ CREATE TABLE pubsubDefaultConf ( ...@@ -352,9 +368,13 @@ CREATE TABLE pubsubDefaultConf (
INSERT INTO jiveID (idType, id) VALUES (18, 1); INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1); INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1); INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveID (idType, id) VALUES (26, 1);
INSERT INTO jiveVersion (name, version) VALUES ('openfire', 16); INSERT INTO jiveVersion (name, version) VALUES ('openfire', 17);
// Entry for admin user // Entry for admin user
INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate) INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate)
VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0'); VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0');
\ No newline at end of file
// Entry for default conference service
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
...@@ -163,7 +163,23 @@ CREATE TABLE jiveSecurityAuditLog ( ...@@ -163,7 +163,23 @@ CREATE TABLE jiveSecurityAuditLog (
# MUC Tables # MUC Tables
CREATE TABLE mucService (
serviceID BIGINT NOT NULL,
subdomain VARCHAR(255) NOT NULL,
description VARCHAR(255),
PRIMARY KEY (subdomain),
INDEX mucService_serviceid_idx (serviceID)
);
CREATE TABLE mucServiceProp (
serviceID BIGINT NOT NULL,
name VARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
PRIMARY KEY (serviceID, name)
);
CREATE TABLE mucRoom ( CREATE TABLE mucRoom (
serviceID BIGINT NOT NULL,
roomID BIGINT NOT NULL, roomID BIGINT NOT NULL,
creationDate CHAR(15) NOT NULL, creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL, modificationDate CHAR(15) NOT NULL,
...@@ -186,8 +202,9 @@ CREATE TABLE mucRoom ( ...@@ -186,8 +202,9 @@ CREATE TABLE mucRoom (
useReservedNick TINYINT NOT NULL, useReservedNick TINYINT NOT NULL,
canChangeNick TINYINT NOT NULL, canChangeNick TINYINT NOT NULL,
canRegister TINYINT NOT NULL, canRegister TINYINT NOT NULL,
PRIMARY KEY (name), PRIMARY KEY (serviceID,name),
INDEX mucRoom_roomid_idx (roomID) INDEX mucRoom_roomid_idx (roomID),
INDEX mucRoom_serviceid_idx (serviceID)
); );
CREATE TABLE mucRoomProp ( CREATE TABLE mucRoomProp (
...@@ -340,9 +357,13 @@ CREATE TABLE pubsubDefaultConf ( ...@@ -340,9 +357,13 @@ CREATE TABLE pubsubDefaultConf (
INSERT INTO jiveID (idType, id) VALUES (18, 1); INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1); INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1); INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveID (idType, id) VALUES (26, 1);
INSERT INTO jiveVersion (name, version) VALUES ('openfire', 16); INSERT INTO jiveVersion (name, version) VALUES ('openfire', 17);
# Entry for admin user # Entry for admin user
INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate) INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate)
VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0'); VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0');
\ No newline at end of file
# Entry for default conference service
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
...@@ -171,7 +171,23 @@ CREATE INDEX jiveSecAuditLog_uname_idx ON jiveSecurityAuditLog (username); ...@@ -171,7 +171,23 @@ CREATE INDEX jiveSecAuditLog_uname_idx ON jiveSecurityAuditLog (username);
-- MUC Tables -- MUC Tables
CREATE TABLE mucService (
serviceID INT NOT NULL,
subdomain VARCHAR2(255) NOT NULL,
description VARCHAR2(255),
CONSTRAINT mucService_pk PRIMARY KEY (subdomain)
);
CREATE INDEX mucService_serviceid_idx ON mucService(serviceID);
CREATE TABLE mucServiceProp (
serviceID INT NOT NULL,
name VARCHAR2(100) NOT NULL,
propValue VARCHAR2(1024) NOT NULL,
CONSTRAINT mucServiceProp_pk PRIMARY KEY (serviceID, name)
);
CREATE TABLE mucRoom( CREATE TABLE mucRoom(
serviceID INT NOT NULL,
roomID INT NOT NULL, roomID INT NOT NULL,
creationDate CHAR(15) NOT NULL, creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL, modificationDate CHAR(15) NOT NULL,
...@@ -194,9 +210,10 @@ CREATE TABLE mucRoom( ...@@ -194,9 +210,10 @@ CREATE TABLE mucRoom(
useReservedNick INTEGER NOT NULL, useReservedNick INTEGER NOT NULL,
canChangeNick INTEGER NOT NULL, canChangeNick INTEGER NOT NULL,
canRegister INTEGER NOT NULL, canRegister INTEGER NOT NULL,
CONSTRAINT mucRoom_pk PRIMARY KEY (name) CONSTRAINT mucRoom_pk PRIMARY KEY (serviceID, name)
); );
CREATE INDEX mucRoom_roomid_idx ON mucRoom (roomID); CREATE INDEX mucRoom_roomid_idx ON mucRoom (roomID);
CREATE INDEX mucRoom_serviceid_idx ON mucRoom (serviceID);
CREATE TABLE mucRoomProp ( CREATE TABLE mucRoomProp (
roomID INT NOT NULL, roomID INT NOT NULL,
...@@ -348,11 +365,15 @@ CREATE TABLE pubsubDefaultConf ( ...@@ -348,11 +365,15 @@ CREATE TABLE pubsubDefaultConf (
INSERT INTO jiveID (idType, id) VALUES (18, 1); INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1); INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1); INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveID (idType, id) VALUES (26, 1);
INSERT INTO jiveVersion (name, version) VALUES ('openfire', 16); INSERT INTO jiveVersion (name, version) VALUES ('openfire', 17);
-- Entry for admin user -- Entry for admin user
INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate) INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate)
VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0'); VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0');
-- Entry for default conference service
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
commit; commit;
\ No newline at end of file
...@@ -179,7 +179,23 @@ CREATE INDEX jiveSecAuditLog_uname_idx ON jiveSecurityAuditLog (username); ...@@ -179,7 +179,23 @@ CREATE INDEX jiveSecAuditLog_uname_idx ON jiveSecurityAuditLog (username);
-- MUC Tables -- MUC Tables
CREATE TABLE mucService (
serviceID INTEGER NOT NULL,
subdomain VARCHAR(255) NOT NULL,
description VARCHAR(255),
CONSTRAINT mucService_pk PRIMARY KEY (subdomain)
);
CREATE INDEX mucService_serviceid_idx ON mucService(serviceID);
CREATE TABLE mucServiceProp (
serviceID INTEGER NOT NULL,
name VARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
CONSTRAINT mucServiceProp_pk PRIMARY KEY (serviceID, name)
);
CREATE TABLE mucRoom ( CREATE TABLE mucRoom (
serviceID INTEGER NOT NULL,
roomID INTEGER NOT NULL, roomID INTEGER NOT NULL,
creationDate CHAR(15) NOT NULL, creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL, modificationDate CHAR(15) NOT NULL,
...@@ -202,10 +218,10 @@ CREATE TABLE mucRoom ( ...@@ -202,10 +218,10 @@ CREATE TABLE mucRoom (
useReservedNick INTEGER NOT NULL, useReservedNick INTEGER NOT NULL,
canChangeNick INTEGER NOT NULL, canChangeNick INTEGER NOT NULL,
canRegister INTEGER NOT NULL, canRegister INTEGER NOT NULL,
CONSTRAINT mucRoom__pk PRIMARY KEY (name) CONSTRAINT mucRoom__pk PRIMARY KEY (serviceID, name)
); );
CREATE INDEX mucRoom_roomID_idx ON mucRoom(roomID); CREATE INDEX mucRoom_roomID_idx ON mucRoom(roomID);
CREATE INDEX mucRoom_serviceID_idx ON mucRoom(serviceID);
CREATE TABLE mucRoomProp ( CREATE TABLE mucRoomProp (
roomID INTEGER NOT NULL, roomID INTEGER NOT NULL,
...@@ -357,9 +373,13 @@ CREATE TABLE pubsubDefaultConf ( ...@@ -357,9 +373,13 @@ CREATE TABLE pubsubDefaultConf (
INSERT INTO jiveID (idType, id) VALUES (18, 1); INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1); INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1); INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveID (idType, id) VALUES (26, 1);
INSERT INTO jiveVersion (name, version) VALUES ('openfire', 16); INSERT INTO jiveVersion (name, version) VALUES ('openfire', 17);
-- Entry for admin user -- Entry for admin user
INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate) INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate)
VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0'); VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0');
-- Entry for default conference service
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
...@@ -177,7 +177,23 @@ CREATE INDEX jiveSecAuditLog_uname_idx ON jiveSecurityAuditLog (username); ...@@ -177,7 +177,23 @@ CREATE INDEX jiveSecAuditLog_uname_idx ON jiveSecurityAuditLog (username);
/* MUC Tables */ /* MUC Tables */
CREATE TABLE mucService (
serviceID INT NOT NULL,
subdomain NVARCHAR(255) NOT NULL,
description NVARCHAR(255),
CONSTRAINT mucService_pk PRIMARY KEY (subdomain)
);
CREATE INDEX mucService_serviceid_idx ON mucService(serviceID);
CREATE TABLE mucServiceProp (
serviceID INT NOT NULL,
name NVARCHAR(100) NOT NULL,
propValue NVARCHAR(2000) NOT NULL,
CONSTRAINT mucServiceProp_pk PRIMARY KEY (serviceID, name)
);
CREATE TABLE mucRoom ( CREATE TABLE mucRoom (
serviceID INT NOT NULL,
roomID INT NOT NULL, roomID INT NOT NULL,
creationDate CHAR(15) NOT NULL, creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL, modificationDate CHAR(15) NOT NULL,
...@@ -200,10 +216,10 @@ CREATE TABLE mucRoom ( ...@@ -200,10 +216,10 @@ CREATE TABLE mucRoom (
useReservedNick INT NOT NULL, useReservedNick INT NOT NULL,
canChangeNick INT NOT NULL, canChangeNick INT NOT NULL,
canRegister INT NOT NULL, canRegister INT NOT NULL,
CONSTRAINT mucRoom__pk PRIMARY KEY (name) CONSTRAINT mucRoom__pk PRIMARY KEY (serviceID, name)
); );
CREATE INDEX mucRoom_roomID_idx on mucRoom(roomID); CREATE INDEX mucRoom_roomID_idx on mucRoom(roomID);
CREATE INDEX mucRoom_serviceID_idx on mucRoom(serviceID);
CREATE TABLE mucRoomProp ( CREATE TABLE mucRoomProp (
roomID INT NOT NULL, roomID INT NOT NULL,
...@@ -355,9 +371,13 @@ CREATE TABLE pubsubDefaultConf ( ...@@ -355,9 +371,13 @@ CREATE TABLE pubsubDefaultConf (
INSERT INTO jiveID (idType, id) VALUES (18, 1); INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1); INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1); INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveID (idType, id) VALUES (26, 1);
INSERT INTO jiveVersion (name, version) VALUES ('openfire', 16); INSERT INTO jiveVersion (name, version) VALUES ('openfire', 17);
/* Entry for admin user */ /* Entry for admin user */
INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate) INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate)
VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0'); VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0');
\ No newline at end of file
/* Entry for default conference service */
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
\ No newline at end of file
...@@ -176,7 +176,23 @@ CREATE INDEX jiveSecAuditLog_uname_idx ON jiveSecurityAuditLog (username); ...@@ -176,7 +176,23 @@ CREATE INDEX jiveSecAuditLog_uname_idx ON jiveSecurityAuditLog (username);
/* MUC Tables */ /* MUC Tables */
CREATE TABLE mucService (
serviceID INT NOT NULL,
subdomain NVARCHAR(255) NOT NULL,
description NVARCHAR(255),
CONSTRAINT mucService_pk PRIMARY KEY (subdomain)
);
CREATE INDEX mucService_serviceid_idx ON mucService(serviceID);
CREATE TABLE mucServiceProp (
serviceID INT NOT NULL,
name NVARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
CONSTRAINT mucServiceProp_pk PRIMARY KEY (serviceID, name)
);
CREATE TABLE mucRoom ( CREATE TABLE mucRoom (
serviceID INT NOT NULL,
roomID INT NOT NULL, roomID INT NOT NULL,
creationDate CHAR(15) NOT NULL, creationDate CHAR(15) NOT NULL,
modificationDate CHAR(15) NOT NULL, modificationDate CHAR(15) NOT NULL,
...@@ -199,10 +215,10 @@ CREATE TABLE mucRoom ( ...@@ -199,10 +215,10 @@ CREATE TABLE mucRoom (
useReservedNick INT NOT NULL, useReservedNick INT NOT NULL,
canChangeNick INT NOT NULL, canChangeNick INT NOT NULL,
canRegister INT NOT NULL, canRegister INT NOT NULL,
CONSTRAINT mucRoom__pk PRIMARY KEY (name) CONSTRAINT mucRoom__pk PRIMARY KEY (serviceID, name)
); );
CREATE INDEX mucRoom_roomID_idx on mucRoom(roomID); CREATE INDEX mucRoom_roomID_idx on mucRoom(roomID);
CREATE INDEX mucRoom_serviceID_idx on mucRoom(sericeID);
CREATE TABLE mucRoomProp ( CREATE TABLE mucRoomProp (
roomID INT NOT NULL, roomID INT NOT NULL,
...@@ -354,9 +370,13 @@ CREATE TABLE pubsubDefaultConf ( ...@@ -354,9 +370,13 @@ CREATE TABLE pubsubDefaultConf (
INSERT INTO jiveID (idType, id) VALUES (18, 1); INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1); INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1); INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveID (idType, id) VALUES (26, 1);
INSERT INTO jiveVersion (name, version) VALUES ('openfire', 16); INSERT INTO jiveVersion (name, version) VALUES ('openfire', 17);
/* Entry for admin user */ /* Entry for admin user */
INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate) INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate)
VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0'); VALUES ('admin', 'admin', 'Administrator', 'admin@example.com', '0', '0');
\ No newline at end of file
/* Entry for default conference service */
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
\ No newline at end of file
-- change mucRoom's primary key to be referenced around serviceID
ALTER TABLE mucRoom DROP CONSTRAINT mucRoom_pk;
ALTER TABLE mucRoom ADD CONSTRAINT mucRoom_pk PRIMARY KEY (serviceID, name);
-- create table mucService
CREATE TABLE mucService (
serviceID INTEGER NOT NULL,
subdomain VARCHAR(255) NOT NULL,
description VARCHAR(255),
CONSTRAINT mucService_pk PRIMARY KEY (subdomain)
);
CREATE INDEX mucService_serviceid_idx ON mucService(serviceID);
-- create table mucServiceProp
CREATE TABLE mucServiceProp (
serviceID INTEGER NOT NULL,
name VARCHAR(100) NOT NULL,
propValue VARCHAR(2000) NOT NULL,
CONSTRAINT mucServiceProp_pk PRIMARY KEY (serviceID, name)
);
-- add new indexed column to mucRoom
ALTER TABLE mucRoom ADD COLUMN serviceID INTEGER NOT NULL;
CREATE INDEX mucRm_serviceid_idx ON mucRoom (serviceID);
-- add default entry for conference service and associated jiveID value
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
INSERT INTO jiveID (idType, id) VALUES (26, 1);
-- update all entries in mucRoom to be set to the default conference service
UPDATE mucRoom set serviceID = 1;
-- update conference name/desc if there's a custom one set
UPDATE mucService SET mucService.subdomain = ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "xmpp.muc.service" )
WHERE EXISTS ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "xmpp.muc.service" );
DELETE FROM jiveProperty WHERE name = "xmpp.muc.service";
UPDATE mucService SET mucService.description = ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "muc.service-name" )
WHERE EXISTS ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "muc.service-name" );
DELETE FROM jiveProperty WHERE name = "muc.service-name";
-- transfer all system properties to muc specific properties
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canOccupantsChangeSubject",propValue FROM jiveProperty WHERE name = "muc.room.canOccupantsChangeSubject";
DELETE FROM jiveProperty WHERE name = "muc.room.canOccupantsChangeSubject";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.maxUsers",propValue FROM jiveProperty WHERE name = "muc.room.maxUsers";
DELETE FROM jiveProperty WHERE name = "muc.room.maxUsers";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.publicRoom",propValue FROM jiveProperty WHERE name = "muc.room.publicRoom";
DELETE FROM jiveProperty WHERE name = "muc.room.publicRoom";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.persistent",propValue FROM jiveProperty WHERE name = "muc.room.persistent";
DELETE FROM jiveProperty WHERE name = "muc.room.persistent";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.moderated",propValue FROM jiveProperty WHERE name = "muc.room.moderated";
DELETE FROM jiveProperty WHERE name = "muc.room.moderated";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.membersOnly",propValue FROM jiveProperty WHERE name = "muc.room.membersOnly";
DELETE FROM jiveProperty WHERE name = "muc.room.membersOnly";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canOccupantsInvite",propValue FROM jiveProperty WHERE name = "muc.room.canOccupantsInvite";
DELETE FROM jiveProperty WHERE name = "muc.room.canOccupantsInvite";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canAnyoneDiscoverJID",propValue FROM jiveProperty WHERE name = "muc.room.canAnyoneDiscoverJID";
DELETE FROM jiveProperty WHERE name = "muc.room.canAnyoneDiscoverJID";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.logEnabled",propValue FROM jiveProperty WHERE name = "muc.room.logEnabled";
DELETE FROM jiveProperty WHERE name = "muc.room.logEnabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.loginRestrictedToNickname",propValue FROM jiveProperty WHERE name = "muc.room.loginRestrictedToNickname";
DELETE FROM jiveProperty WHERE name = "muc.room.loginRestrictedToNickname";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canChangeNickname",propValue FROM jiveProperty WHERE name = "muc.room.canChangeNickname";
DELETE FROM jiveProperty WHERE name = "muc.room.canChangeNickname";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.registrationEnabled",propValue FROM jiveProperty WHERE name = "muc.room.registrationEnabled";
DELETE FROM jiveProperty WHERE name = "muc.room.registrationEnabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.user.timeout",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.timeout";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.timeout";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.user.idle",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.idle";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.idle";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.log.timeout",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.timeout";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.timeout";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.log.batchsize",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.batchsize";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.batchsize";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"sysadmin.jid",propValue FROM jiveProperty WHERE name = "xmpp.muc.sysadmin.jid";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.sysadmin.jid";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"discover.locked",propValue FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"create.anyone",propValue FROM jiveProperty WHERE name = "xmpp.muc.create.anyone";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.create.anyone";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"create.jid",propValue FROM jiveProperty WHERE name = "xmpp.muc.create.jid";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.create.jid";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"enabled",propValue FROM jiveProperty WHERE name = "xmpp.muc.enabled";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.enabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"unload.empty_days",propValue FROM jiveProperty WHERE name = "xmpp.muc.unload.empty_days";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.unload.empty_days";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"discover.locked",propValue FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"history.maxNumber",propValue FROM jiveProperty WHERE name = "xmpp.muc.history.maxNumber";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.history.maxNumber";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"history.type",propValue FROM jiveProperty WHERE name = "xmpp.muc.history.type";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.history.type";
UPDATE jiveVersion set version=17 where name = 'openfire';
// change mucRoom's primary key to be referenced around serviceID
ALTER TABLE mucRoom DROP CONSTRAINT mucRoom_pk;
ALTER TABLE mucRoom ADD CONSTRAINT mucRoom_pk PRIMARY KEY (serviceID, name);
// create table mucService
CREATE TABLE mucService (
serviceID BIGINT NOT NULL,
subdomain VARCHAR(255) NOT NULL,
description VARCHAR(255),
CONSTRAINT mucService_pk PRIMARY KEY (subdomain)
);
CREATE INDEX mucService_serviceid_idx ON mucService(serviceID);
// create table mucServiceProp
CREATE TABLE mucServiceProp (
serviceID BIGINT NOT NULL,
name VARCHAR(100) NOT NULL,
propValue VARCHAR(4000) NOT NULL,
CONSTRAINT mucServiceProp_pk PRIMARY KEY (serviceID, name)
);
// add new indexed column to mucRoom
ALTER TABLE mucRoom ADD COLUMN serviceID BIGINT NOT NULL BEFORE roomID;
CREATE INDEX mucRoom_serviceid_idx ON mucRoom(serviceID);
// add default entry for conference service and associated jiveID value
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
INSERT INTO jiveID (idType, id) VALUES (26, 1);
// update all entries in mucRoom to be set to the default conference service
UPDATE mucRoom set serviceID = 1;
// update conference name/desc if there's a custom one set
UPDATE mucService SET mucService.subdomain = ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "xmpp.muc.service" )
WHERE EXISTS ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "xmpp.muc.service" );
DELETE FROM jiveProperty WHERE name = "xmpp.muc.service";
UPDATE mucService SET mucService.description = ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "muc.service-name" )
WHERE EXISTS ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "muc.service-name" );
DELETE FROM jiveProperty WHERE name = "muc.service-name";
// transfer all system properties to muc specific properties
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canOccupantsChangeSubject",propValue FROM jiveProperty WHERE name = "muc.room.canOccupantsChangeSubject";
DELETE FROM jiveProperty WHERE name = "muc.room.canOccupantsChangeSubject";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.maxUsers",propValue FROM jiveProperty WHERE name = "muc.room.maxUsers";
DELETE FROM jiveProperty WHERE name = "muc.room.maxUsers";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.publicRoom",propValue FROM jiveProperty WHERE name = "muc.room.publicRoom";
DELETE FROM jiveProperty WHERE name = "muc.room.publicRoom";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.persistent",propValue FROM jiveProperty WHERE name = "muc.room.persistent";
DELETE FROM jiveProperty WHERE name = "muc.room.persistent";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.moderated",propValue FROM jiveProperty WHERE name = "muc.room.moderated";
DELETE FROM jiveProperty WHERE name = "muc.room.moderated";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.membersOnly",propValue FROM jiveProperty WHERE name = "muc.room.membersOnly";
DELETE FROM jiveProperty WHERE name = "muc.room.membersOnly";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canOccupantsInvite",propValue FROM jiveProperty WHERE name = "muc.room.canOccupantsInvite";
DELETE FROM jiveProperty WHERE name = "muc.room.canOccupantsInvite";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canAnyoneDiscoverJID",propValue FROM jiveProperty WHERE name = "muc.room.canAnyoneDiscoverJID";
DELETE FROM jiveProperty WHERE name = "muc.room.canAnyoneDiscoverJID";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.logEnabled",propValue FROM jiveProperty WHERE name = "muc.room.logEnabled";
DELETE FROM jiveProperty WHERE name = "muc.room.logEnabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.loginRestrictedToNickname",propValue FROM jiveProperty WHERE name = "muc.room.loginRestrictedToNickname";
DELETE FROM jiveProperty WHERE name = "muc.room.loginRestrictedToNickname";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canChangeNickname",propValue FROM jiveProperty WHERE name = "muc.room.canChangeNickname";
DELETE FROM jiveProperty WHERE name = "muc.room.canChangeNickname";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.registrationEnabled",propValue FROM jiveProperty WHERE name = "muc.room.registrationEnabled";
DELETE FROM jiveProperty WHERE name = "muc.room.registrationEnabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.user.timeout",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.timeout";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.timeout";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.user.idle",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.idle";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.idle";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.log.timeout",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.timeout";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.timeout";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.log.batchsize",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.batchsize";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.batchsize";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"sysadmin.jid",propValue FROM jiveProperty WHERE name = "xmpp.muc.sysadmin.jid";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.sysadmin.jid";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"discover.locked",propValue FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"create.anyone",propValue FROM jiveProperty WHERE name = "xmpp.muc.create.anyone";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.create.anyone";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"create.jid",propValue FROM jiveProperty WHERE name = "xmpp.muc.create.jid";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.create.jid";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"enabled",propValue FROM jiveProperty WHERE name = "xmpp.muc.enabled";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.enabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"unload.empty_days",propValue FROM jiveProperty WHERE name = "xmpp.muc.unload.empty_days";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.unload.empty_days";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"discover.locked",propValue FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"history.maxNumber",propValue FROM jiveProperty WHERE name = "xmpp.muc.history.maxNumber";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.history.maxNumber";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"history.type",propValue FROM jiveProperty WHERE name = "xmpp.muc.history.type";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.history.type";
UPDATE jiveVersion set version=17 where name = 'openfire';
# change mucRoom's primary key to be referenced around serviceID
ALTER TABLE mucRoom DROP PRIMARY KEY;
ALTER TABLE mucRoom ADD PRIMARY KEY (serviceID,name);
# create table mucService
CREATE TABLE mucService (
serviceID BIGINT NOT NULL,
subdomain VARCHAR(255) NOT NULL,
description VARCHAR(255),
PRIMARY KEY (subdomain),
INDEX mucService_serviceid_idx (serviceID)
);
# create table mucServiceProp
CREATE TABLE mucServiceProp (
serviceID BIGINT NOT NULL,
name VARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
PRIMARY KEY (serviceID, name)
);
# add new indexed column to mucRoom
ALTER TABLE mucRoom ADD COLUMN serviceID BIGINT NOT NULL FIRST;
ALTER TABLE mucRoom ADD INDEX mucRoom_serviceid_idx (serviceID);
# add default entry for conference service and associated jiveID value
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
INSERT INTO jiveID (idType, id) VALUES (26, 1);
# update all entries in mucRoom to be set to the default conference service
UPDATE mucRoom set serviceID = 1;
# update conference name/desc if there's a custom one set
UPDATE mucService SET mucService.subdomain = ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "xmpp.muc.service" )
WHERE EXISTS ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "xmpp.muc.service" );
DELETE FROM jiveProperty WHERE name = "xmpp.muc.service";
UPDATE mucService SET mucService.description = ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "muc.service-name" )
WHERE EXISTS ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "muc.service-name" );
DELETE FROM jiveProperty WHERE name = "muc.service-name";
# transfer all system properties to muc specific properties
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canOccupantsChangeSubject",propValue FROM jiveProperty WHERE name = "muc.room.canOccupantsChangeSubject";
DELETE FROM jiveProperty WHERE name = "muc.room.canOccupantsChangeSubject";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.maxUsers",propValue FROM jiveProperty WHERE name = "muc.room.maxUsers";
DELETE FROM jiveProperty WHERE name = "muc.room.maxUsers";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.publicRoom",propValue FROM jiveProperty WHERE name = "muc.room.publicRoom";
DELETE FROM jiveProperty WHERE name = "muc.room.publicRoom";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.persistent",propValue FROM jiveProperty WHERE name = "muc.room.persistent";
DELETE FROM jiveProperty WHERE name = "muc.room.persistent";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.moderated",propValue FROM jiveProperty WHERE name = "muc.room.moderated";
DELETE FROM jiveProperty WHERE name = "muc.room.moderated";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.membersOnly",propValue FROM jiveProperty WHERE name = "muc.room.membersOnly";
DELETE FROM jiveProperty WHERE name = "muc.room.membersOnly";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canOccupantsInvite",propValue FROM jiveProperty WHERE name = "muc.room.canOccupantsInvite";
DELETE FROM jiveProperty WHERE name = "muc.room.canOccupantsInvite";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canAnyoneDiscoverJID",propValue FROM jiveProperty WHERE name = "muc.room.canAnyoneDiscoverJID";
DELETE FROM jiveProperty WHERE name = "muc.room.canAnyoneDiscoverJID";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.logEnabled",propValue FROM jiveProperty WHERE name = "muc.room.logEnabled";
DELETE FROM jiveProperty WHERE name = "muc.room.logEnabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.loginRestrictedToNickname",propValue FROM jiveProperty WHERE name = "muc.room.loginRestrictedToNickname";
DELETE FROM jiveProperty WHERE name = "muc.room.loginRestrictedToNickname";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canChangeNickname",propValue FROM jiveProperty WHERE name = "muc.room.canChangeNickname";
DELETE FROM jiveProperty WHERE name = "muc.room.canChangeNickname";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.registrationEnabled",propValue FROM jiveProperty WHERE name = "muc.room.registrationEnabled";
DELETE FROM jiveProperty WHERE name = "muc.room.registrationEnabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.user.timeout",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.timeout";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.timeout";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.user.idle",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.idle";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.idle";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.log.timeout",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.timeout";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.timeout";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.log.batchsize",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.batchsize";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.batchsize";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"sysadmin.jid",propValue FROM jiveProperty WHERE name = "xmpp.muc.sysadmin.jid";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.sysadmin.jid";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"discover.locked",propValue FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"create.anyone",propValue FROM jiveProperty WHERE name = "xmpp.muc.create.anyone";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.create.anyone";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"create.jid",propValue FROM jiveProperty WHERE name = "xmpp.muc.create.jid";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.create.jid";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"enabled",propValue FROM jiveProperty WHERE name = "xmpp.muc.enabled";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.enabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"unload.empty_days",propValue FROM jiveProperty WHERE name = "xmpp.muc.unload.empty_days";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.unload.empty_days";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"discover.locked",propValue FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"history.maxNumber",propValue FROM jiveProperty WHERE name = "xmpp.muc.history.maxNumber";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.history.maxNumber";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"history.type",propValue FROM jiveProperty WHERE name = "xmpp.muc.history.type";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.history.type";
UPDATE jiveVersion set version=17 where name = 'openfire';
-- change mucRoom's primary key to be referenced around serviceID
ALTER TABLE mucRoom DROP CONSTRAINT mucRoom_pk;
ALTER TABLE mucRoom ADD CONSTRAINT mucRoom_pk PRIMARY KEY (serviceID, name);
-- create table mucService
CREATE TABLE mucService (
serviceID INT NOT NULL,
subdomain VARCHAR2(255) NOT NULL,
description VARCHAR2(255),
CONSTRAINT mucService_pk PRIMARY KEY (subdomain)
);
CREATE INDEX mucService_serviceid_idx ON mucService(serviceID);
-- create table mucServiceProp
CREATE TABLE mucServiceProp (
serviceID INT NOT NULL,
name VARCHAR2(100) NOT NULL,
propValue VARCHAR2(1024) NOT NULL,
CONSTRAINT mucServiceProp_pk PRIMARY KEY (serviceID, name)
);
-- add new indexed column to mucRoom
ALTER TABLE mucRoom ADD COLUMN serviceID INT NOT NULL;
CREATE INDEX mucRm_serviceid_idx ON mucRoom (serviceID);
-- add default entry for conference service and associated jiveID value
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
INSERT INTO jiveID (idType, id) VALUES (26, 1);
-- update all entries in mucRoom to be set to the default conference service
UPDATE mucRoom set serviceID = 1;
-- update conference name/desc if there's a custom one set
UPDATE mucService SET mucService.subdomain = ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "xmpp.muc.service" )
WHERE EXISTS ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "xmpp.muc.service" );
DELETE FROM jiveProperty WHERE name = "xmpp.muc.service";
UPDATE mucService SET mucService.description = ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "muc.service-name" )
WHERE EXISTS ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "muc.service-name" );
DELETE FROM jiveProperty WHERE name = "muc.service-name";
-- transfer all system properties to muc specific properties
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canOccupantsChangeSubject",propValue FROM jiveProperty WHERE name = "muc.room.canOccupantsChangeSubject";
DELETE FROM jiveProperty WHERE name = "muc.room.canOccupantsChangeSubject";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.maxUsers",propValue FROM jiveProperty WHERE name = "muc.room.maxUsers";
DELETE FROM jiveProperty WHERE name = "muc.room.maxUsers";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.publicRoom",propValue FROM jiveProperty WHERE name = "muc.room.publicRoom";
DELETE FROM jiveProperty WHERE name = "muc.room.publicRoom";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.persistent",propValue FROM jiveProperty WHERE name = "muc.room.persistent";
DELETE FROM jiveProperty WHERE name = "muc.room.persistent";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.moderated",propValue FROM jiveProperty WHERE name = "muc.room.moderated";
DELETE FROM jiveProperty WHERE name = "muc.room.moderated";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.membersOnly",propValue FROM jiveProperty WHERE name = "muc.room.membersOnly";
DELETE FROM jiveProperty WHERE name = "muc.room.membersOnly";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canOccupantsInvite",propValue FROM jiveProperty WHERE name = "muc.room.canOccupantsInvite";
DELETE FROM jiveProperty WHERE name = "muc.room.canOccupantsInvite";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canAnyoneDiscoverJID",propValue FROM jiveProperty WHERE name = "muc.room.canAnyoneDiscoverJID";
DELETE FROM jiveProperty WHERE name = "muc.room.canAnyoneDiscoverJID";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.logEnabled",propValue FROM jiveProperty WHERE name = "muc.room.logEnabled";
DELETE FROM jiveProperty WHERE name = "muc.room.logEnabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.loginRestrictedToNickname",propValue FROM jiveProperty WHERE name = "muc.room.loginRestrictedToNickname";
DELETE FROM jiveProperty WHERE name = "muc.room.loginRestrictedToNickname";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canChangeNickname",propValue FROM jiveProperty WHERE name = "muc.room.canChangeNickname";
DELETE FROM jiveProperty WHERE name = "muc.room.canChangeNickname";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.registrationEnabled",propValue FROM jiveProperty WHERE name = "muc.room.registrationEnabled";
DELETE FROM jiveProperty WHERE name = "muc.room.registrationEnabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.user.timeout",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.timeout";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.timeout";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.user.idle",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.idle";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.idle";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.log.timeout",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.timeout";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.timeout";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.log.batchsize",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.batchsize";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.batchsize";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"sysadmin.jid",propValue FROM jiveProperty WHERE name = "xmpp.muc.sysadmin.jid";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.sysadmin.jid";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"discover.locked",propValue FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"create.anyone",propValue FROM jiveProperty WHERE name = "xmpp.muc.create.anyone";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.create.anyone";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"create.jid",propValue FROM jiveProperty WHERE name = "xmpp.muc.create.jid";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.create.jid";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"enabled",propValue FROM jiveProperty WHERE name = "xmpp.muc.enabled";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.enabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"unload.empty_days",propValue FROM jiveProperty WHERE name = "xmpp.muc.unload.empty_days";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.unload.empty_days";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"discover.locked",propValue FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"history.maxNumber",propValue FROM jiveProperty WHERE name = "xmpp.muc.history.maxNumber";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.history.maxNumber";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"history.type",propValue FROM jiveProperty WHERE name = "xmpp.muc.history.type";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.history.type";
UPDATE jiveVersion set version=17 where name = 'openfire';
commit;
\ No newline at end of file
-- change mucRoom's primary key to be referenced around serviceID
ALTER TABLE mucRoom DROP CONSTRAINT mucRoom_pk;
ALTER TABLE mucRoom ADD CONSTRAINT mucRoom_pk PRIMARY KEY (serviceID, name);
-- create table mucService
CREATE TABLE mucService (
serviceID INTEGER NOT NULL,
subdomain VARCHAR(255) NOT NULL,
description VARCHAR(255),
CONSTRAINT mucService_pk PRIMARY KEY (subdomain)
);
CREATE INDEX mucService_serviceid_idx ON mucService(serviceID);
-- create table mucServiceProp
CREATE TABLE mucServiceProp (
serviceID INTEGER NOT NULL,
name VARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
CONSTRAINT mucServiceProp_pk PRIMARY KEY (serviceID, name)
);
-- add new indexed column to mucRoom
ALTER TABLE mucRoom ADD COLUMN serviceID INTEGER NOT NULL;
CREATE INDEX mucRm_serviceid_idx ON mucRoom (serviceID);
-- add default entry for conference service and associated jiveID value
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
INSERT INTO jiveID (idType, id) VALUES (26, 1);
-- update all entries in mucRoom to be set to the default conference service
UPDATE mucRoom set serviceID = 1;
-- update conference name/desc if there's a custom one set
UPDATE mucService SET mucService.subdomain = ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "xmpp.muc.service" )
WHERE EXISTS ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "xmpp.muc.service" );
DELETE FROM jiveProperty WHERE name = "xmpp.muc.service";
UPDATE mucService SET mucService.description = ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "muc.service-name" )
WHERE EXISTS ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "muc.service-name" );
DELETE FROM jiveProperty WHERE name = "muc.service-name";
-- transfer all system properties to muc specific properties
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canOccupantsChangeSubject",propValue FROM jiveProperty WHERE name = "muc.room.canOccupantsChangeSubject";
DELETE FROM jiveProperty WHERE name = "muc.room.canOccupantsChangeSubject";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.maxUsers",propValue FROM jiveProperty WHERE name = "muc.room.maxUsers";
DELETE FROM jiveProperty WHERE name = "muc.room.maxUsers";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.publicRoom",propValue FROM jiveProperty WHERE name = "muc.room.publicRoom";
DELETE FROM jiveProperty WHERE name = "muc.room.publicRoom";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.persistent",propValue FROM jiveProperty WHERE name = "muc.room.persistent";
DELETE FROM jiveProperty WHERE name = "muc.room.persistent";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.moderated",propValue FROM jiveProperty WHERE name = "muc.room.moderated";
DELETE FROM jiveProperty WHERE name = "muc.room.moderated";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.membersOnly",propValue FROM jiveProperty WHERE name = "muc.room.membersOnly";
DELETE FROM jiveProperty WHERE name = "muc.room.membersOnly";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canOccupantsInvite",propValue FROM jiveProperty WHERE name = "muc.room.canOccupantsInvite";
DELETE FROM jiveProperty WHERE name = "muc.room.canOccupantsInvite";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canAnyoneDiscoverJID",propValue FROM jiveProperty WHERE name = "muc.room.canAnyoneDiscoverJID";
DELETE FROM jiveProperty WHERE name = "muc.room.canAnyoneDiscoverJID";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.logEnabled",propValue FROM jiveProperty WHERE name = "muc.room.logEnabled";
DELETE FROM jiveProperty WHERE name = "muc.room.logEnabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.loginRestrictedToNickname",propValue FROM jiveProperty WHERE name = "muc.room.loginRestrictedToNickname";
DELETE FROM jiveProperty WHERE name = "muc.room.loginRestrictedToNickname";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canChangeNickname",propValue FROM jiveProperty WHERE name = "muc.room.canChangeNickname";
DELETE FROM jiveProperty WHERE name = "muc.room.canChangeNickname";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.registrationEnabled",propValue FROM jiveProperty WHERE name = "muc.room.registrationEnabled";
DELETE FROM jiveProperty WHERE name = "muc.room.registrationEnabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.user.timeout",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.timeout";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.timeout";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.user.idle",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.idle";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.idle";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.log.timeout",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.timeout";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.timeout";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.log.batchsize",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.batchsize";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.batchsize";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"sysadmin.jid",propValue FROM jiveProperty WHERE name = "xmpp.muc.sysadmin.jid";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.sysadmin.jid";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"discover.locked",propValue FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"create.anyone",propValue FROM jiveProperty WHERE name = "xmpp.muc.create.anyone";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.create.anyone";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"create.jid",propValue FROM jiveProperty WHERE name = "xmpp.muc.create.jid";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.create.jid";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"enabled",propValue FROM jiveProperty WHERE name = "xmpp.muc.enabled";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.enabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"unload.empty_days",propValue FROM jiveProperty WHERE name = "xmpp.muc.unload.empty_days";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.unload.empty_days";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"discover.locked",propValue FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"history.maxNumber",propValue FROM jiveProperty WHERE name = "xmpp.muc.history.maxNumber";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.history.maxNumber";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"history.type",propValue FROM jiveProperty WHERE name = "xmpp.muc.history.type";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.history.type";
UPDATE jiveVersion set version=17 where name = 'openfire';
/* change mucRoom's primary key to be referenced around serviceID */
ALTER TABLE mucRoom DROP CONSTRAINT mucRoom_pk;
ALTER TABLE mucRoom ADD CONSTRAINT mucRoom_pk PRIMARY KEY (serviceID, name);
/* create table mucService */
CREATE TABLE mucService (
serviceID INT NOT NULL,
subdomain NVARCHAR(255) NOT NULL,
description NVARCHAR(255),
CONSTRAINT mucService_pk PRIMARY KEY (subdomain)
);
CREATE INDEX mucService_serviceid_idx ON mucService(serviceID);
/* create table mucServiceProp */
CREATE TABLE mucServiceProp (
serviceID INT NOT NULL,
name NVARCHAR(100) NOT NULL,
propValue NVARCHAR(2000) NOT NULL,
CONSTRAINT mucServiceProp_pk PRIMARY KEY (serviceID, name)
);
/* add new indexed column to mucRoom */
ALTER TABLE mucRoom ADD COLUMN serviceID INT NOT NULL;
CREATE INDEX mucRoom_serviceid_idx ON mucRoom(serviceID);
/* add default entry for conference service and associated jiveID value */
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
INSERT INTO jiveID (idType, id) VALUES (26, 1);
/* update all entries in mucRoom to be set to the default conference service */
UPDATE mucRoom set serviceID = 1;
/* update conference name/desc if there's a custom one set */
UPDATE mucService SET mucService.subdomain = ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "xmpp.muc.service" )
WHERE EXISTS ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "xmpp.muc.service" );
DELETE FROM jiveProperty WHERE name = "xmpp.muc.service";
UPDATE mucService SET mucService.description = ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "muc.service-name" )
WHERE EXISTS ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "muc.service-name" );
DELETE FROM jiveProperty WHERE name = "muc.service-name";
/* transfer all system properties to muc specific properties */
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canOccupantsChangeSubject",propValue FROM jiveProperty WHERE name = "muc.room.canOccupantsChangeSubject";
DELETE FROM jiveProperty WHERE name = "muc.room.canOccupantsChangeSubject";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.maxUsers",propValue FROM jiveProperty WHERE name = "muc.room.maxUsers";
DELETE FROM jiveProperty WHERE name = "muc.room.maxUsers";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.publicRoom",propValue FROM jiveProperty WHERE name = "muc.room.publicRoom";
DELETE FROM jiveProperty WHERE name = "muc.room.publicRoom";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.persistent",propValue FROM jiveProperty WHERE name = "muc.room.persistent";
DELETE FROM jiveProperty WHERE name = "muc.room.persistent";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.moderated",propValue FROM jiveProperty WHERE name = "muc.room.moderated";
DELETE FROM jiveProperty WHERE name = "muc.room.moderated";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.membersOnly",propValue FROM jiveProperty WHERE name = "muc.room.membersOnly";
DELETE FROM jiveProperty WHERE name = "muc.room.membersOnly";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canOccupantsInvite",propValue FROM jiveProperty WHERE name = "muc.room.canOccupantsInvite";
DELETE FROM jiveProperty WHERE name = "muc.room.canOccupantsInvite";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canAnyoneDiscoverJID",propValue FROM jiveProperty WHERE name = "muc.room.canAnyoneDiscoverJID";
DELETE FROM jiveProperty WHERE name = "muc.room.canAnyoneDiscoverJID";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.logEnabled",propValue FROM jiveProperty WHERE name = "muc.room.logEnabled";
DELETE FROM jiveProperty WHERE name = "muc.room.logEnabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.loginRestrictedToNickname",propValue FROM jiveProperty WHERE name = "muc.room.loginRestrictedToNickname";
DELETE FROM jiveProperty WHERE name = "muc.room.loginRestrictedToNickname";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canChangeNickname",propValue FROM jiveProperty WHERE name = "muc.room.canChangeNickname";
DELETE FROM jiveProperty WHERE name = "muc.room.canChangeNickname";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.registrationEnabled",propValue FROM jiveProperty WHERE name = "muc.room.registrationEnabled";
DELETE FROM jiveProperty WHERE name = "muc.room.registrationEnabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.user.timeout",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.timeout";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.timeout";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.user.idle",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.idle";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.idle";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.log.timeout",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.timeout";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.timeout";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.log.batchsize",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.batchsize";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.batchsize";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"sysadmin.jid",propValue FROM jiveProperty WHERE name = "xmpp.muc.sysadmin.jid";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.sysadmin.jid";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"discover.locked",propValue FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"create.anyone",propValue FROM jiveProperty WHERE name = "xmpp.muc.create.anyone";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.create.anyone";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"create.jid",propValue FROM jiveProperty WHERE name = "xmpp.muc.create.jid";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.create.jid";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"enabled",propValue FROM jiveProperty WHERE name = "xmpp.muc.enabled";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.enabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"unload.empty_days",propValue FROM jiveProperty WHERE name = "xmpp.muc.unload.empty_days";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.unload.empty_days";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"discover.locked",propValue FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"history.maxNumber",propValue FROM jiveProperty WHERE name = "xmpp.muc.history.maxNumber";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.history.maxNumber";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"history.type",propValue FROM jiveProperty WHERE name = "xmpp.muc.history.type";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.history.type";
UPDATE jiveVersion set version=17 where name = 'openfire';
/* change mucRoom's primary key to be referenced around serviceID */
ALTER TABLE mucRoom DROP CONSTRAINT mucRoom_pk;
ALTER TABLE mucRoom ADD CONSTRAINT mucRoom_pk PRIMARY KEY (serviceID, name);
/* create table mucService */
CREATE TABLE mucService (
serviceID INT NOT NULL,
subdomain NVARCHAR(255) NOT NULL,
description NVARCHAR(255),
CONSTRAINT mucService_pk PRIMARY KEY (subdomain)
);
CREATE INDEX mucService_serviceid_idx ON mucService(serviceID);
/* create table mucServiceProp */
CREATE TABLE mucServiceProp (
serviceID INT NOT NULL,
name NVARCHAR(100) NOT NULL,
propValue TEXT NOT NULL,
CONSTRAINT mucServiceProp_pk PRIMARY KEY (serviceID, name)
);
/* add new indexed column to mucRoom */
ALTER TABLE mucRoom ADD COLUMN serviceID INT NOT NULL;
CREATE INDEX mucRoom_serviceid_idx ON mucRoom(serviceID);
/* add default entry for conference service and associated jiveID value */
INSERT INTO mucService (serviceID, subdomain) VALUES (1, "conference");
INSERT INTO jiveID (idType, id) VALUES (26, 1);
/* update all entries in mucRoom to be set to the default conference service */
UPDATE mucRoom set serviceID = 1;
/* update conference name/desc if there's a custom one set */
UPDATE mucService SET mucService.subdomain = ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "xmpp.muc.service" )
WHERE EXISTS ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "xmpp.muc.service" );
DELETE FROM jiveProperty WHERE name = "xmpp.muc.service";
UPDATE mucService SET mucService.description = ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "muc.service-name" )
WHERE EXISTS ( SELECT jiveProperty.propValue FROM jiveProperty WHERE jiveProperty.name = "muc.service-name" );
DELETE FROM jiveProperty WHERE name = "muc.service-name";
/* transfer all system properties to muc specific properties */
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canOccupantsChangeSubject",propValue FROM jiveProperty WHERE name = "muc.room.canOccupantsChangeSubject";
DELETE FROM jiveProperty WHERE name = "muc.room.canOccupantsChangeSubject";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.maxUsers",propValue FROM jiveProperty WHERE name = "muc.room.maxUsers";
DELETE FROM jiveProperty WHERE name = "muc.room.maxUsers";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.publicRoom",propValue FROM jiveProperty WHERE name = "muc.room.publicRoom";
DELETE FROM jiveProperty WHERE name = "muc.room.publicRoom";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.persistent",propValue FROM jiveProperty WHERE name = "muc.room.persistent";
DELETE FROM jiveProperty WHERE name = "muc.room.persistent";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.moderated",propValue FROM jiveProperty WHERE name = "muc.room.moderated";
DELETE FROM jiveProperty WHERE name = "muc.room.moderated";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.membersOnly",propValue FROM jiveProperty WHERE name = "muc.room.membersOnly";
DELETE FROM jiveProperty WHERE name = "muc.room.membersOnly";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canOccupantsInvite",propValue FROM jiveProperty WHERE name = "muc.room.canOccupantsInvite";
DELETE FROM jiveProperty WHERE name = "muc.room.canOccupantsInvite";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canAnyoneDiscoverJID",propValue FROM jiveProperty WHERE name = "muc.room.canAnyoneDiscoverJID";
DELETE FROM jiveProperty WHERE name = "muc.room.canAnyoneDiscoverJID";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.logEnabled",propValue FROM jiveProperty WHERE name = "muc.room.logEnabled";
DELETE FROM jiveProperty WHERE name = "muc.room.logEnabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.loginRestrictedToNickname",propValue FROM jiveProperty WHERE name = "muc.room.loginRestrictedToNickname";
DELETE FROM jiveProperty WHERE name = "muc.room.loginRestrictedToNickname";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.canChangeNickname",propValue FROM jiveProperty WHERE name = "muc.room.canChangeNickname";
DELETE FROM jiveProperty WHERE name = "muc.room.canChangeNickname";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"room.registrationEnabled",propValue FROM jiveProperty WHERE name = "muc.room.registrationEnabled";
DELETE FROM jiveProperty WHERE name = "muc.room.registrationEnabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.user.timeout",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.timeout";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.timeout";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.user.idle",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.idle";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.user.idle";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.log.timeout",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.timeout";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.timeout";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"tasks.log.batchsize",propValue FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.batchsize";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.tasks.log.batchsize";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"sysadmin.jid",propValue FROM jiveProperty WHERE name = "xmpp.muc.sysadmin.jid";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.sysadmin.jid";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"discover.locked",propValue FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"create.anyone",propValue FROM jiveProperty WHERE name = "xmpp.muc.create.anyone";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.create.anyone";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"create.jid",propValue FROM jiveProperty WHERE name = "xmpp.muc.create.jid";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.create.jid";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"enabled",propValue FROM jiveProperty WHERE name = "xmpp.muc.enabled";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.enabled";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"unload.empty_days",propValue FROM jiveProperty WHERE name = "xmpp.muc.unload.empty_days";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.unload.empty_days";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"discover.locked",propValue FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.discover.locked";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"history.maxNumber",propValue FROM jiveProperty WHERE name = "xmpp.muc.history.maxNumber";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.history.maxNumber";
INSERT INTO mucServiceProp(serviceID,name,propValue) SELECT 1,"history.type",propValue FROM jiveProperty WHERE name = "xmpp.muc.history.type";
DELETE FROM jiveProperty WHERE name = "xmpp.muc.history.type";
UPDATE jiveVersion set version=17 where name = 'openfire';
...@@ -2309,3 +2309,40 @@ sidebar.security-audit-viewer=Security Audit Viewer ...@@ -2309,3 +2309,40 @@ sidebar.security-audit-viewer=Security Audit Viewer
sidebar.security-audit-viewer.descr=Click to view the security audit logs sidebar.security-audit-viewer.descr=Click to view the security audit logs
setup.ldap.server.alias_dereference=Deference Aliases setup.ldap.server.alias_dereference=Deference Aliases
setup.ldap.server.alias_dereference_help=Automatically deference LDAP aliases when found setup.ldap.server.alias_dereference_help=Automatically deference LDAP aliases when found
sidebar.muc-service-summary=Service Summary
sidebar.muc-service-summary.descr=Click to see a list of group chat services
sidebar.muc-service-create=Create New Service
sidebar.muc-service-create.descr=Click to add a new group chat service
sidebar.sidebar-muc-service-options=Service Options
sidebar.muc-service-delete=Delete Service
sidebar.muc-service-delete.descr=Click to delete the service
global.edit=Edit
groupchat.service.properties.label_service_description=Group chat service description (optional):
groupchat.service.settings_affect=Changes you make here will affect the group chat service:
muc.room.summary.service=Service
muc.service.summary.title=Group Chat Service
muc.service.summary.info=Below is an overview of the Group Chat Services in the system. From here you can \
edit their configurations, and create new services, and delete services you don't need anymore.
muc.service.summary.deleted=Service destroyed successfully.
muc.service.summary.total_room=Total Service
muc.service.summary.sorted_id=Sorted by Subdomain
muc.service.summary.subdomain=Subdomain
muc.service.summary.description=Description
muc.service.summary.numrooms=# Rooms
muc.service.summary.numusers=# Users
muc.service.summary.edit=Edit
muc.service.summary.destroy=Destroy
muc.service.summary.no_services=No group chat services configured.
muc.service.summary.total_services=Total Services
muc.service.summary.sorted=Sorted by Subdomain
muc.service.summary.services_per_page=Services per page
muc.service.summary.no_services_warning=There are no group chat services configured for this server. \
You will need to create a new service if you wish to provide MUC/group chat services.
muc.service.delete.title=Delete MUC Service
muc.service.delete.info=Are you sure you want to destroy the MUC service
muc.service.delete.detail=from the system? You may specify a reason for the service destruction. \
This information will be sent to occupants of rooms on the service.
muc.service.delete.destructon_title=Destruction Details
muc.service.delete.service_name=Subdomain:
muc.service.delete.reason=Reason:
muc.service.delete.destroy_service=Destroy Service
...@@ -2295,3 +2295,40 @@ sidebar.security-audit-viewer=Security Audit Viewer ...@@ -2295,3 +2295,40 @@ sidebar.security-audit-viewer=Security Audit Viewer
sidebar.security-audit-viewer.descr=Click to view the security audit logs sidebar.security-audit-viewer.descr=Click to view the security audit logs
setup.ldap.server.alias_dereference=Deference Aliases setup.ldap.server.alias_dereference=Deference Aliases
setup.ldap.server.alias_dereference_help=Automatically deference LDAP aliases when found setup.ldap.server.alias_dereference_help=Automatically deference LDAP aliases when found
sidebar.muc-service-summary=Service Summary
sidebar.muc-service-summary.descr=Click to see a list of group chat services
sidebar.muc-service-create=Create New Service
sidebar.muc-service-create.descr=Click to add a new group chat service
sidebar.sidebar-muc-service-options=Service Options
sidebar.muc-service-delete=Delete Service
sidebar.muc-service-delete.descr=Click to delete the service
global.edit=Edit
groupchat.service.properties.label_service_description=Group chat service description (optional):
groupchat.service.settings_affect=Changes you make here will affect the group chat service:
muc.room.summary.service=Service
muc.service.summary.title=Group Chat Service
muc.service.summary.info=Below is an overview of the Group Chat Services in the system. From here you can \
edit their configurations, and create new services, and delete services you don't need anymore.
muc.service.summary.deleted=Service destroyed successfully.
muc.service.summary.total_room=Total Service
muc.service.summary.sorted_id=Sorted by Subdomain
muc.service.summary.subdomain=Subdomain
muc.service.summary.description=Description
muc.service.summary.numrooms=# Rooms
muc.service.summary.numusers=# Users
muc.service.summary.edit=Edit
muc.service.summary.destroy=Destroy
muc.service.summary.no_services=No group chat services configured.
muc.service.summary.total_services=Total Services
muc.service.summary.sorted=Sorted by Subdomain
muc.service.summary.services_per_page=Services per page
muc.service.summary.no_services_warning=There are no group chat services configured for this server. \
You will need to create a new service if you wish to provide MUC/group chat services.
muc.service.delete.title=Delete MUC Service
muc.service.delete.info=Are you sure you want to destroy the MUC service
muc.service.delete.detail=from the system? You may specify a reason for the service destruction. \
This information will be sent to occupants of rooms on the service.
muc.service.delete.destructon_title=Destruction Details
muc.service.delete.service_name=Subdomain:
muc.service.delete.reason=Reason:
muc.service.delete.destroy_service=Destroy Service
...@@ -358,6 +358,44 @@ ...@@ -358,6 +358,44 @@
## 3.6.0 ## 3.6.0
## Added key: 'setup.ldap.server.alias_dereference' ## Added key: 'setup.ldap.server.alias_dereference'
## Added key: 'setup.ldap.server.alias_dereference_help' ## Added key: 'setup.ldap.server.alias_dereference_help'
## Added key: 'muc.service.summary.title'
## Added key: 'muc.service.summary.info'
## Added key: 'muc.service.summary.deleted'
## Added key: 'muc.service.summary.total_room'
## Added key: 'muc.service.summary.sorted_id'
## Added key: 'muc.service.summary.subdomain'
## Added key: 'muc.service.summary.description'
## Added key: 'muc.service.summary.numrooms'
## Added key: 'muc.service.summary.numusers'
## Added key: 'muc.service.summary.edit'
## Added key: 'muc.service.summary.destroy'
## Added key: 'muc.service.summary.no_services'
## Added key: 'muc.service.summary.total_services'
## Added key: 'muc.service.summary.sorted'
## Added key: 'muc.service.summary.services_per_page'
## Added key: 'muc.service.delete.title'
## Added key: 'muc.service.delete.info'
## Added key: 'muc.service.delete.detail'
## Added key: 'muc.service.delete.destructon_title'
## Added key: 'muc.service.delete.service_name'
## Added key: 'muc.service.delete.reason'
## Added key: 'muc.service.delete.destroy_service'
## Added key: 'groupchat.service.properties.label_service_description'
## Updated key: 'setup.ldap.user.vcard.test.description'
## Added key: 'sidebar.muc-service-summary'
## Added key: 'sidebar.muc-service-summary.descr'
## Added key: 'sidebar.muc-room-create'
## Added key: 'sidebar.muc-room-create.descr'
## Added key: 'global.edit'
## Updated key: 'groupchat.service.properties.introduction'
## Added key: 'muc.room.summary.service'
## Added key: 'muc.service.summary.no_services_warning'
## Added key: 'sidebar.muc-service-delete'
## Added key: 'sidebar.muc-service-delete.descr'
## Added key: 'sidebar.sidebar-muc-service-options'
## Added key: 'groupchat.service.settings_affect'
## Updated key: 'groupchat.service.properties.saved_successfully'
## Removed key: 'groupchat.service.properties.saved_successfully2'
# Openfire # Openfire
...@@ -471,16 +509,23 @@ tab.tab-session.descr=Click to manage connected sessions ...@@ -471,16 +509,23 @@ tab.tab-session.descr=Click to manage connected sessions
tab.tab-groupchat=Group Chat tab.tab-groupchat=Group Chat
tab.tab-groupchat.descr=Click to manage group chat settings tab.tab-groupchat.descr=Click to manage group chat settings
sidebar.sidebar-groupchat-settings=Group Chat Settings sidebar.sidebar-groupchat-settings=Group Chat Settings
sidebar.muc-server-props=Service Properties sidebar.muc-service-summary=Service Summary
sidebar.muc-server-props.descr= sidebar.muc-service-summary.descr=Click to see a list of group chat services
sidebar.muc-history=History Settings sidebar.sidebar-muc-service-options=Service Options
sidebar.muc-history.descr= sidebar.muc-server-props=Service Properties
sidebar.muc-sysadmin=Administrators sidebar.muc-server-props.descr=
sidebar.muc-sysadmin.descr= sidebar.muc-history=History Settings
sidebar.muc-perms=Room Creation Permissions sidebar.muc-history.descr=
sidebar.muc-perms.descr= sidebar.muc-sysadmin=Administrators
sidebar.muc-tasks=Other Settings sidebar.muc-sysadmin.descr=
sidebar.muc-tasks.descr= sidebar.muc-perms=Room Creation Permissions
sidebar.muc-perms.descr=
sidebar.muc-tasks=Other Settings
sidebar.muc-tasks.descr=
sidebar.muc-service-delete=Delete Service
sidebar.muc-service-delete.descr=Click to delete the service
sidebar.muc-service-create=Create New Service
sidebar.muc-service-create.descr=Click to add a new group chat service
sidebar.sidebar-groupchat-administration=Room Administration sidebar.sidebar-groupchat-administration=Room Administration
sidebar.muc-room-summary=Room Summary sidebar.muc-room-summary=Room Summary
sidebar.muc-room-summary.descr=Click to see a list of rooms in the service sidebar.muc-room-summary.descr=Click to see a list of rooms in the service
...@@ -661,6 +706,7 @@ global.save_properties=Save Properties ...@@ -661,6 +706,7 @@ global.save_properties=Save Properties
global.edit_properties=Edit Properties global.edit_properties=Edit Properties
global.stop=Stop global.stop=Stop
global.restore_defaults=Restore Defaults global.restore_defaults=Restore Defaults
global.edit=Edit
global.add=Add global.add=Add
global.logout=Logout global.logout=Logout
global.main=Main global.main=Main
...@@ -690,14 +736,14 @@ global.click_test=Click to test... ...@@ -690,14 +736,14 @@ global.click_test=Click to test...
# Group Chat Service Properties Page # Group Chat Service Properties Page
groupchat.service.properties.title=Group Chat Service Properties groupchat.service.properties.title=Group Chat Service Properties
groupchat.service.properties.introduction=Use the form below to edit group chat service settings. \ groupchat.service.properties.introduction=Use the form below to edit group chat service settings.
Note, any changes will require a server restart. groupchat.service.properties.saved_successfully=Service properties edited successfully.
groupchat.service.properties.saved_successfully=Service properties edited successfully. You must
groupchat.service.properties.saved_successfully2=the server in order for the changes to take effect (see
groupchat.service.properties.legend=Service Name groupchat.service.properties.legend=Service Name
groupchat.service.properties.label_service_name=Group chat service name: groupchat.service.properties.label_service_name=Group chat service name:
groupchat.service.properties.error_service_name=Please enter a valid name. groupchat.service.properties.error_service_name=Please enter a valid name.
groupchat.service.properties.label_service_description=Group chat service description (optional):
groupchat.service.properties.save=Save Properties groupchat.service.properties.save=Save Properties
groupchat.service.settings_affect=Changes you make here will affect the group chat service:
# Group Chat History Settings Page # Group Chat History Settings Page
...@@ -1076,6 +1122,39 @@ muc.room.summary.destroy=Destroy ...@@ -1076,6 +1122,39 @@ muc.room.summary.destroy=Destroy
muc.room.summary.no_room_in_group=No rooms in the Group Chat service. muc.room.summary.no_room_in_group=No rooms in the Group Chat service.
muc.room.summary.alt_persistent=Room is persistent muc.room.summary.alt_persistent=Room is persistent
muc.room.summary.alt_temporary=Room is temporary muc.room.summary.alt_temporary=Room is temporary
muc.room.summary.service=Service
# MUC service summary Page
muc.service.summary.title=Group Chat Service
muc.service.summary.info=Below is an overview of the Group Chat Services in the system. From here you can \
edit their configurations, and create new services, and delete services you don't need anymore.
muc.service.summary.deleted=Service destroyed successfully.
muc.service.summary.total_room=Total Service
muc.service.summary.sorted_id=Sorted by Subdomain
muc.service.summary.subdomain=Subdomain
muc.service.summary.description=Description
muc.service.summary.numrooms=# Rooms
muc.service.summary.numusers=# Users
muc.service.summary.edit=Edit
muc.service.summary.destroy=Destroy
muc.service.summary.no_services=No group chat services configured.
muc.service.summary.total_services=Total Services
muc.service.summary.sorted=Sorted by Subdomain
muc.service.summary.services_per_page=Services per page
muc.service.summary.no_services_warning=There are no group chat services configured for this server. \
You will need to create a new service if you wish to provide MUC/group chat services.
# MUC delete service page
muc.service.delete.title=Delete MUC Service
muc.service.delete.info=Are you sure you want to destroy the MUC service
muc.service.delete.detail=from the system? You may specify a reason for the service destruction. \
This information will be sent to occupants of rooms on the service.
muc.service.delete.destructon_title=Destruction Details
muc.service.delete.service_name=Subdomain:
muc.service.delete.reason=Reason:
muc.service.delete.destroy_service=Destroy Service
# Muc tasks Page # Muc tasks Page
...@@ -1782,7 +1861,7 @@ setup.ldap.test.error-loading-sample=An error occured while loading sample from ...@@ -1782,7 +1861,7 @@ setup.ldap.test.error-loading-sample=An error occured while loading sample from
setup.ldap.test.internal-server-error=Test page is not able to find required information in HTTP session. setup.ldap.test.internal-server-error=Test page is not able to find required information in HTTP session.
setup.ldap.user.vcard.test.description=A random profile is selected for you to review. Bold fields with no value mean \ setup.ldap.user.vcard.test.description=A random profile is selected for you to review. Bold fields with no value mean \
that an error may have been found. To view another profile click 'Next ramdom profile'. When you are finished close \ that an error may have been found. To view another profile click 'Next random profile'. When you are finished close \
this window. this window.
setup.ldap.user.vcard.test.random=Next random profile setup.ldap.user.vcard.test.random=Next random profile
setup.ldap.user.test.users-not-found=No users were found using the specified configuration. Try changing the base DN, \ setup.ldap.user.test.users-not-found=No users were found using the specified configuration. Try changing the base DN, \
......
...@@ -2346,3 +2346,40 @@ sidebar.security-audit-viewer=Security Audit Viewer ...@@ -2346,3 +2346,40 @@ sidebar.security-audit-viewer=Security Audit Viewer
sidebar.security-audit-viewer.descr=Click to view the security audit logs sidebar.security-audit-viewer.descr=Click to view the security audit logs
setup.ldap.server.alias_dereference=Deference Aliases setup.ldap.server.alias_dereference=Deference Aliases
setup.ldap.server.alias_dereference_help=Automatically deference LDAP aliases when found setup.ldap.server.alias_dereference_help=Automatically deference LDAP aliases when found
sidebar.muc-service-summary=Service Summary
sidebar.muc-service-summary.descr=Click to see a list of group chat services
sidebar.muc-service-create=Create New Service
sidebar.muc-service-create.descr=Click to add a new group chat service
sidebar.sidebar-muc-service-options=Service Options
sidebar.muc-service-delete=Delete Service
sidebar.muc-service-delete.descr=Click to delete the service
global.edit=Edit
groupchat.service.properties.label_service_description=Group chat service description (optional):
groupchat.service.settings_affect=Changes you make here will affect the group chat service:
muc.room.summary.service=Service
muc.service.summary.title=Group Chat Service
muc.service.summary.info=Below is an overview of the Group Chat Services in the system. From here you can \
edit their configurations, and create new services, and delete services you don't need anymore.
muc.service.summary.deleted=Service destroyed successfully.
muc.service.summary.total_room=Total Service
muc.service.summary.sorted_id=Sorted by Subdomain
muc.service.summary.subdomain=Subdomain
muc.service.summary.description=Description
muc.service.summary.numrooms=# Rooms
muc.service.summary.numusers=# Users
muc.service.summary.edit=Edit
muc.service.summary.destroy=Destroy
muc.service.summary.no_services=No group chat services configured.
muc.service.summary.total_services=Total Services
muc.service.summary.sorted=Sorted by Subdomain
muc.service.summary.services_per_page=Services per page
muc.service.summary.no_services_warning=There are no group chat services configured for this server. \
You will need to create a new service if you wish to provide MUC/group chat services.
muc.service.delete.title=Delete MUC Service
muc.service.delete.info=Are you sure you want to destroy the MUC service
muc.service.delete.detail=from the system? You may specify a reason for the service destruction. \
This information will be sent to occupants of rooms on the service.
muc.service.delete.destructon_title=Destruction Details
muc.service.delete.service_name=Subdomain:
muc.service.delete.reason=Reason:
muc.service.delete.destroy_service=Destroy Service
...@@ -1915,3 +1915,40 @@ sidebar.security-audit-viewer=Security Audit Viewer ...@@ -1915,3 +1915,40 @@ sidebar.security-audit-viewer=Security Audit Viewer
sidebar.security-audit-viewer.descr=Click to view the security audit logs sidebar.security-audit-viewer.descr=Click to view the security audit logs
setup.ldap.server.alias_dereference=Deference Aliases setup.ldap.server.alias_dereference=Deference Aliases
setup.ldap.server.alias_dereference_help=Automatically deference LDAP aliases when found setup.ldap.server.alias_dereference_help=Automatically deference LDAP aliases when found
sidebar.muc-service-summary=Service Summary
sidebar.muc-service-summary.descr=Click to see a list of group chat services
sidebar.muc-service-create=Create New Service
sidebar.muc-service-create.descr=Click to add a new group chat service
sidebar.sidebar-muc-service-options=Service Options
sidebar.muc-service-delete=Delete Service
sidebar.muc-service-delete.descr=Click to delete the service
global.edit=Edit
groupchat.service.properties.label_service_description=Group chat service description (optional):
groupchat.service.settings_affect=Changes you make here will affect the group chat service:
muc.room.summary.service=Service
muc.service.summary.title=Group Chat Service
muc.service.summary.info=Below is an overview of the Group Chat Services in the system. From here you can \
edit their configurations, and create new services, and delete services you don't need anymore.
muc.service.summary.deleted=Service destroyed successfully.
muc.service.summary.total_room=Total Service
muc.service.summary.sorted_id=Sorted by Subdomain
muc.service.summary.subdomain=Subdomain
muc.service.summary.description=Description
muc.service.summary.numrooms=# Rooms
muc.service.summary.numusers=# Users
muc.service.summary.edit=Edit
muc.service.summary.destroy=Destroy
muc.service.summary.no_services=No group chat services configured.
muc.service.summary.total_services=Total Services
muc.service.summary.sorted=Sorted by Subdomain
muc.service.summary.services_per_page=Services per page
muc.service.summary.no_services_warning=There are no group chat services configured for this server. \
You will need to create a new service if you wish to provide MUC/group chat services.
muc.service.delete.title=Delete MUC Service
muc.service.delete.info=Are you sure you want to destroy the MUC service
muc.service.delete.detail=from the system? You may specify a reason for the service destruction. \
This information will be sent to occupants of rooms on the service.
muc.service.delete.destructon_title=Destruction Details
muc.service.delete.service_name=Subdomain:
muc.service.delete.reason=Reason:
muc.service.delete.destroy_service=Destroy Service
...@@ -2442,3 +2442,40 @@ sidebar.security-audit-viewer=Security Audit Viewer ...@@ -2442,3 +2442,40 @@ sidebar.security-audit-viewer=Security Audit Viewer
sidebar.security-audit-viewer.descr=Click to view the security audit logs sidebar.security-audit-viewer.descr=Click to view the security audit logs
setup.ldap.server.alias_dereference=Deference Aliases setup.ldap.server.alias_dereference=Deference Aliases
setup.ldap.server.alias_dereference_help=Automatically deference LDAP aliases when found setup.ldap.server.alias_dereference_help=Automatically deference LDAP aliases when found
sidebar.muc-service-summary=Service Summary
sidebar.muc-service-summary.descr=Click to see a list of group chat services
sidebar.muc-service-create=Create New Service
sidebar.muc-service-create.descr=Click to add a new group chat service
sidebar.sidebar-muc-service-options=Service Options
sidebar.muc-service-delete=Delete Service
sidebar.muc-service-delete.descr=Click to delete the service
global.edit=Edit
groupchat.service.properties.label_service_description=Group chat service description (optional):
groupchat.service.settings_affect=Changes you make here will affect the group chat service:
muc.room.summary.service=Service
muc.service.summary.title=Group Chat Service
muc.service.summary.info=Below is an overview of the Group Chat Services in the system. From here you can \
edit their configurations, and create new services, and delete services you don't need anymore.
muc.service.summary.deleted=Service destroyed successfully.
muc.service.summary.total_room=Total Service
muc.service.summary.sorted_id=Sorted by Subdomain
muc.service.summary.subdomain=Subdomain
muc.service.summary.description=Description
muc.service.summary.numrooms=# Rooms
muc.service.summary.numusers=# Users
muc.service.summary.edit=Edit
muc.service.summary.destroy=Destroy
muc.service.summary.no_services=No group chat services configured.
muc.service.summary.total_services=Total Services
muc.service.summary.sorted=Sorted by Subdomain
muc.service.summary.services_per_page=Services per page
muc.service.summary.no_services_warning=There are no group chat services configured for this server. \
You will need to create a new service if you wish to provide MUC/group chat services.
muc.service.delete.title=Delete MUC Service
muc.service.delete.info=Are you sure you want to destroy the MUC service
muc.service.delete.detail=from the system? You may specify a reason for the service destruction. \
This information will be sent to occupants of rooms on the service.
muc.service.delete.destructon_title=Destruction Details
muc.service.delete.service_name=Subdomain:
muc.service.delete.reason=Reason:
muc.service.delete.destroy_service=Destroy Service
...@@ -2306,3 +2306,40 @@ sidebar.security-audit-viewer=Security Audit Viewer ...@@ -2306,3 +2306,40 @@ sidebar.security-audit-viewer=Security Audit Viewer
sidebar.security-audit-viewer.descr=Click to view the security audit logs sidebar.security-audit-viewer.descr=Click to view the security audit logs
setup.ldap.server.alias_dereference=Deference Aliases setup.ldap.server.alias_dereference=Deference Aliases
setup.ldap.server.alias_dereference_help=Automatically deference LDAP aliases when found setup.ldap.server.alias_dereference_help=Automatically deference LDAP aliases when found
sidebar.muc-service-summary=Service Summary
sidebar.muc-service-summary.descr=Click to see a list of group chat services
sidebar.muc-service-create=Create New Service
sidebar.muc-service-create.descr=Click to add a new group chat service
sidebar.sidebar-muc-service-options=Service Options
sidebar.muc-service-delete=Delete Service
sidebar.muc-service-delete.descr=Click to delete the service
global.edit=Edit
groupchat.service.properties.label_service_description=Group chat service description (optional):
groupchat.service.settings_affect=Changes you make here will affect the group chat service:
muc.room.summary.service=Service
muc.service.summary.title=Group Chat Service
muc.service.summary.info=Below is an overview of the Group Chat Services in the system. From here you can \
edit their configurations, and create new services, and delete services you don't need anymore.
muc.service.summary.deleted=Service destroyed successfully.
muc.service.summary.total_room=Total Service
muc.service.summary.sorted_id=Sorted by Subdomain
muc.service.summary.subdomain=Subdomain
muc.service.summary.description=Description
muc.service.summary.numrooms=# Rooms
muc.service.summary.numusers=# Users
muc.service.summary.edit=Edit
muc.service.summary.destroy=Destroy
muc.service.summary.no_services=No group chat services configured.
muc.service.summary.total_services=Total Services
muc.service.summary.sorted=Sorted by Subdomain
muc.service.summary.services_per_page=Services per page
muc.service.summary.no_services_warning=There are no group chat services configured for this server. \
You will need to create a new service if you wish to provide MUC/group chat services.
muc.service.delete.title=Delete MUC Service
muc.service.delete.info=Are you sure you want to destroy the MUC service
muc.service.delete.detail=from the system? You may specify a reason for the service destruction. \
This information will be sent to occupants of rooms on the service.
muc.service.delete.destructon_title=Destruction Details
muc.service.delete.service_name=Subdomain:
muc.service.delete.reason=Reason:
muc.service.delete.destroy_service=Destroy Service
...@@ -2275,3 +2275,40 @@ sidebar.security-audit-viewer=Security Audit Viewer ...@@ -2275,3 +2275,40 @@ sidebar.security-audit-viewer=Security Audit Viewer
sidebar.security-audit-viewer.descr=Click to view the security audit logs sidebar.security-audit-viewer.descr=Click to view the security audit logs
setup.ldap.server.alias_dereference=Deference Aliases setup.ldap.server.alias_dereference=Deference Aliases
setup.ldap.server.alias_dereference_help=Automatically deference LDAP aliases when found setup.ldap.server.alias_dereference_help=Automatically deference LDAP aliases when found
sidebar.muc-service-summary=Service Summary
sidebar.muc-service-summary.descr=Click to see a list of group chat services
sidebar.muc-service-create=Create New Service
sidebar.muc-service-create.descr=Click to add a new group chat service
sidebar.sidebar-muc-service-options=Service Options
sidebar.muc-service-delete=Delete Service
sidebar.muc-service-delete.descr=Click to delete the service
global.edit=Edit
groupchat.service.properties.label_service_description=Group chat service description (optional):
groupchat.service.settings_affect=Changes you make here will affect the group chat service:
muc.room.summary.service=Service
muc.service.summary.title=Group Chat Service
muc.service.summary.info=Below is an overview of the Group Chat Services in the system. From here you can \
edit their configurations, and create new services, and delete services you don't need anymore.
muc.service.summary.deleted=Service destroyed successfully.
muc.service.summary.total_room=Total Service
muc.service.summary.sorted_id=Sorted by Subdomain
muc.service.summary.subdomain=Subdomain
muc.service.summary.description=Description
muc.service.summary.numrooms=# Rooms
muc.service.summary.numusers=# Users
muc.service.summary.edit=Edit
muc.service.summary.destroy=Destroy
muc.service.summary.no_services=No group chat services configured.
muc.service.summary.total_services=Total Services
muc.service.summary.sorted=Sorted by Subdomain
muc.service.summary.services_per_page=Services per page
muc.service.summary.no_services_warning=There are no group chat services configured for this server. \
You will need to create a new service if you wish to provide MUC/group chat services.
muc.service.delete.title=Delete MUC Service
muc.service.delete.info=Are you sure you want to destroy the MUC service
muc.service.delete.detail=from the system? You may specify a reason for the service destruction. \
This information will be sent to occupants of rooms on the service.
muc.service.delete.destructon_title=Destruction Details
muc.service.delete.service_name=Subdomain:
muc.service.delete.reason=Reason:
muc.service.delete.destroy_service=Destroy Service
...@@ -2309,3 +2309,40 @@ sidebar.security-audit-viewer=Security Audit Viewer ...@@ -2309,3 +2309,40 @@ sidebar.security-audit-viewer=Security Audit Viewer
sidebar.security-audit-viewer.descr=Click to view the security audit logs sidebar.security-audit-viewer.descr=Click to view the security audit logs
setup.ldap.server.alias_dereference=Deference Aliases setup.ldap.server.alias_dereference=Deference Aliases
setup.ldap.server.alias_dereference_help=Automatically deference LDAP aliases when found setup.ldap.server.alias_dereference_help=Automatically deference LDAP aliases when found
sidebar.muc-service-summary=Service Summary
sidebar.muc-service-summary.descr=Click to see a list of group chat services
sidebar.muc-service-create=Create New Service
sidebar.muc-service-create.descr=Click to add a new group chat service
sidebar.sidebar-muc-service-options=Service Options
sidebar.muc-service-delete=Delete Service
sidebar.muc-service-delete.descr=Click to delete the service
global.edit=Edit
groupchat.service.properties.label_service_description=Group chat service description (optional):
groupchat.service.settings_affect=Changes you make here will affect the group chat service:
muc.room.summary.service=Service
muc.service.summary.title=Group Chat Service
muc.service.summary.info=Below is an overview of the Group Chat Services in the system. From here you can \
edit their configurations, and create new services, and delete services you don't need anymore.
muc.service.summary.deleted=Service destroyed successfully.
muc.service.summary.total_room=Total Service
muc.service.summary.sorted_id=Sorted by Subdomain
muc.service.summary.subdomain=Subdomain
muc.service.summary.description=Description
muc.service.summary.numrooms=# Rooms
muc.service.summary.numusers=# Users
muc.service.summary.edit=Edit
muc.service.summary.destroy=Destroy
muc.service.summary.no_services=No group chat services configured.
muc.service.summary.total_services=Total Services
muc.service.summary.sorted=Sorted by Subdomain
muc.service.summary.services_per_page=Services per page
muc.service.summary.no_services_warning=There are no group chat services configured for this server. \
You will need to create a new service if you wish to provide MUC/group chat services.
muc.service.delete.title=Delete MUC Service
muc.service.delete.info=Are you sure you want to destroy the MUC service
muc.service.delete.detail=from the system? You may specify a reason for the service destruction. \
This information will be sent to occupants of rooms on the service.
muc.service.delete.destructon_title=Destruction Details
muc.service.delete.service_name=Subdomain:
muc.service.delete.reason=Reason:
muc.service.delete.destroy_service=Destroy Service
...@@ -2086,3 +2086,40 @@ sidebar.security-audit-viewer=Security Audit Viewer ...@@ -2086,3 +2086,40 @@ sidebar.security-audit-viewer=Security Audit Viewer
sidebar.security-audit-viewer.descr=Click to view the security audit logs sidebar.security-audit-viewer.descr=Click to view the security audit logs
setup.ldap.server.alias_dereference=Deference Aliases setup.ldap.server.alias_dereference=Deference Aliases
setup.ldap.server.alias_dereference_help=Automatically deference LDAP aliases when found setup.ldap.server.alias_dereference_help=Automatically deference LDAP aliases when found
sidebar.muc-service-summary=Service Summary
sidebar.muc-service-summary.descr=Click to see a list of group chat services
sidebar.muc-service-create=Create New Service
sidebar.muc-service-create.descr=Click to add a new group chat service
sidebar.sidebar-muc-service-options=Service Options
sidebar.muc-service-delete=Delete Service
sidebar.muc-service-delete.descr=Click to delete the service
global.edit=Edit
groupchat.service.properties.label_service_description=Group chat service description (optional):
groupchat.service.settings_affect=Changes you make here will affect the group chat service:
muc.room.summary.service=Service
muc.service.summary.title=Group Chat Service
muc.service.summary.info=Below is an overview of the Group Chat Services in the system. From here you can \
edit their configurations, and create new services, and delete services you don't need anymore.
muc.service.summary.deleted=Service destroyed successfully.
muc.service.summary.total_room=Total Service
muc.service.summary.sorted_id=Sorted by Subdomain
muc.service.summary.subdomain=Subdomain
muc.service.summary.description=Description
muc.service.summary.numrooms=# Rooms
muc.service.summary.numusers=# Users
muc.service.summary.edit=Edit
muc.service.summary.destroy=Destroy
muc.service.summary.no_services=No group chat services configured.
muc.service.summary.total_services=Total Services
muc.service.summary.sorted=Sorted by Subdomain
muc.service.summary.services_per_page=Services per page
muc.service.summary.no_services_warning=There are no group chat services configured for this server. \
You will need to create a new service if you wish to provide MUC/group chat services.
muc.service.delete.title=Delete MUC Service
muc.service.delete.info=Are you sure you want to destroy the MUC service
muc.service.delete.detail=from the system? You may specify a reason for the service destruction. \
This information will be sent to occupants of rooms on the service.
muc.service.delete.destructon_title=Destruction Details
muc.service.delete.service_name=Subdomain:
muc.service.delete.reason=Reason:
muc.service.delete.destroy_service=Destroy Service
...@@ -44,7 +44,7 @@ public class SchemaManager { ...@@ -44,7 +44,7 @@ public class SchemaManager {
/** /**
* Current Openfire database schema version. * Current Openfire database schema version.
*/ */
private static final int DATABASE_VERSION = 16; private static final int DATABASE_VERSION = 17;
/** /**
* Creates a new Schema manager. * Creates a new Schema manager.
......
...@@ -30,8 +30,7 @@ import org.jivesoftware.openfire.filetransfer.proxy.FileTransferProxy; ...@@ -30,8 +30,7 @@ import org.jivesoftware.openfire.filetransfer.proxy.FileTransferProxy;
import org.jivesoftware.openfire.handler.*; import org.jivesoftware.openfire.handler.*;
import org.jivesoftware.openfire.lockout.LockOutManager; import org.jivesoftware.openfire.lockout.LockOutManager;
import org.jivesoftware.openfire.mediaproxy.MediaProxyService; import org.jivesoftware.openfire.mediaproxy.MediaProxyService;
import org.jivesoftware.openfire.muc.MultiUserChatServer; import org.jivesoftware.openfire.muc.MultiUserChatManager;
import org.jivesoftware.openfire.muc.spi.MultiUserChatServerImpl;
import org.jivesoftware.openfire.net.MulticastDNSService; import org.jivesoftware.openfire.net.MulticastDNSService;
import org.jivesoftware.openfire.net.SSLConfig; import org.jivesoftware.openfire.net.SSLConfig;
import org.jivesoftware.openfire.net.ServerTrafficCounter; import org.jivesoftware.openfire.net.ServerTrafficCounter;
...@@ -527,7 +526,6 @@ public class XMPPServer { ...@@ -527,7 +526,6 @@ public class XMPPServer {
loadModule(IQOfflineMessagesHandler.class.getName()); loadModule(IQOfflineMessagesHandler.class.getName());
loadModule(IQPEPHandler.class.getName()); loadModule(IQPEPHandler.class.getName());
loadModule(IQPEPOwnerHandler.class.getName()); loadModule(IQPEPOwnerHandler.class.getName());
loadModule(MultiUserChatServerImpl.class.getName());
loadModule(MulticastDNSService.class.getName()); loadModule(MulticastDNSService.class.getName());
loadModule(IQSharedGroupHandler.class.getName()); loadModule(IQSharedGroupHandler.class.getName());
loadModule(AdHocCommandHandler.class.getName()); loadModule(AdHocCommandHandler.class.getName());
...@@ -542,6 +540,7 @@ public class XMPPServer { ...@@ -542,6 +540,7 @@ public class XMPPServer {
loadModule(UpdateManager.class.getName()); loadModule(UpdateManager.class.getName());
loadModule(FlashCrossDomainHandler.class.getName()); loadModule(FlashCrossDomainHandler.class.getName());
loadModule(InternalComponentManager.class.getName()); loadModule(InternalComponentManager.class.getName());
loadModule(MultiUserChatManager.class.getName());
loadModule(ClearspaceManager.class.getName()); loadModule(ClearspaceManager.class.getName());
// Load this module always last since we don't want to start listening for clients // Load this module always last since we don't want to start listening for clients
// before the rest of the modules have been started // before the rest of the modules have been started
...@@ -1350,14 +1349,14 @@ public class XMPPServer { ...@@ -1350,14 +1349,14 @@ public class XMPPServer {
} }
/** /**
* Returns the <code>MultiUserChatServer</code> registered with this server. The * Returns the <code>MultiUserChatManager</code> registered with this server. The
* <code>MultiUserChatServer</code> was registered with the server as a module while starting up * <code>MultiUserChatManager</code> was registered with the server as a module while starting up
* the server. * the server.
* *
* @return the <code>MultiUserChatServer</code> registered with this server. * @return the <code>MultiUserChatManager</code> registered with this server.
*/ */
public MultiUserChatServer getMultiUserChatServer() { public MultiUserChatManager getMultiUserChatManager() {
return (MultiUserChatServer) modules.get(MultiUserChatServerImpl.class); return (MultiUserChatManager) modules.get(MultiUserChatManager.class);
} }
/** /**
......
...@@ -11,9 +11,10 @@ package org.jivesoftware.openfire.commands.admin.muc; ...@@ -11,9 +11,10 @@ package org.jivesoftware.openfire.commands.admin.muc;
import org.jivesoftware.openfire.commands.AdHocCommand; import org.jivesoftware.openfire.commands.AdHocCommand;
import org.jivesoftware.openfire.commands.SessionData; import org.jivesoftware.openfire.commands.SessionData;
import org.jivesoftware.openfire.XMPPServer; import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.muc.MultiUserChatServer; import org.jivesoftware.openfire.muc.MultiUserChatService;
import org.jivesoftware.openfire.muc.NotAllowedException; import org.jivesoftware.openfire.muc.NotAllowedException;
import org.jivesoftware.openfire.muc.MUCRoom; import org.jivesoftware.openfire.muc.MUCRoom;
import org.jivesoftware.util.NotFoundException;
import org.dom4j.Element; import org.dom4j.Element;
import org.xmpp.packet.JID; import org.xmpp.packet.JID;
import org.xmpp.forms.DataForm; import org.xmpp.forms.DataForm;
...@@ -44,12 +45,6 @@ public class CreateMUCRoom extends AdHocCommand { ...@@ -44,12 +45,6 @@ public class CreateMUCRoom extends AdHocCommand {
public void execute(SessionData sessionData, Element command) { public void execute(SessionData sessionData, Element command) {
Element note = command.addElement("note"); Element note = command.addElement("note");
MultiUserChatServer server = XMPPServer.getInstance().getMultiUserChatServer();
if (!server.isServiceEnabled()) {
note.addAttribute("type", "error");
note.setText("Multi user chat is disabled on server.");
return;
}
Collection<JID> admins = XMPPServer.getInstance().getAdmins(); Collection<JID> admins = XMPPServer.getInstance().getAdmins();
if (admins.size() <= 0) { if (admins.size() <= 0) {
note.addAttribute("type", "error"); note.addAttribute("type", "error");
...@@ -58,6 +53,29 @@ public class CreateMUCRoom extends AdHocCommand { ...@@ -58,6 +53,29 @@ public class CreateMUCRoom extends AdHocCommand {
} }
Map<String, List<String>> data = sessionData.getData(); Map<String, List<String>> data = sessionData.getData();
// Let's find the requested MUC service to create the room in
String servicehostname = get(data, "servicename", 0);
if (servicehostname == null) {
note.addAttribute("type", "error");
note.setText("Service name must be specified.");
return;
}
// Remove the server's domain name from the passed hostname
String servicename = servicehostname.replace("."+XMPPServer.getInstance().getServerInfo().getXMPPDomain(), "");
MultiUserChatService mucService;
try {
mucService = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(servicename);
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.setText("Invalid service name specified.");
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) {
...@@ -68,7 +86,7 @@ public class CreateMUCRoom extends AdHocCommand { ...@@ -68,7 +86,7 @@ public class CreateMUCRoom extends AdHocCommand {
JID admin = admins.iterator().next(); JID admin = admins.iterator().next();
MUCRoom room; MUCRoom room;
try { try {
room = server.getChatRoom(roomname, admin); room = mucService.getChatRoom(roomname, admin);
} }
catch (NotAllowedException e) { catch (NotAllowedException e) {
note.addAttribute("type", "error"); note.addAttribute("type", "error");
...@@ -104,6 +122,12 @@ public class CreateMUCRoom extends AdHocCommand { ...@@ -104,6 +122,12 @@ public class CreateMUCRoom extends AdHocCommand {
field.setVariable("roomname"); field.setVariable("roomname");
field.setRequired(true); field.setRequired(true);
field = form.addField();
field.setType(FormField.Type.text_single);
field.setLabel("The service (hostname) to create the room on");
field.setVariable("servicename");
field.setRequired(true);
field = form.addField(); field = form.addField();
field.setType(FormField.Type.text_private); field.setType(FormField.Type.text_private);
field.setLabel("The password for this account"); field.setLabel("The password for this account");
......
...@@ -147,7 +147,7 @@ public class HistoryRequest { ...@@ -147,7 +147,7 @@ public class HistoryRequest {
int accumulatedChars = 0; int accumulatedChars = 0;
int accumulatedStanzas = 0; int accumulatedStanzas = 0;
Element delayInformation; Element delayInformation;
LinkedList historyToSend = new LinkedList(); LinkedList<Message> historyToSend = new LinkedList<Message>();
ListIterator iterator = roomHistory.getReverseMessageHistory(); ListIterator iterator = roomHistory.getReverseMessageHistory();
while (iterator.hasPrevious()) { while (iterator.hasPrevious()) {
message = (Message)iterator.previous(); message = (Message)iterator.previous();
...@@ -173,7 +173,7 @@ public class HistoryRequest { ...@@ -173,7 +173,7 @@ public class HistoryRequest {
delayInformation = message.getChildElement("x", "jabber:x:delay"); delayInformation = message.getChildElement("x", "jabber:x:delay");
try { try {
// Get the date when the historic message was sent // Get the date when the historic message was sent
Date delayedDate = null; Date delayedDate;
synchronized (delayedFormatter) { synchronized (delayedFormatter) {
delayedDate = delayedFormatter delayedDate = delayedFormatter
.parse(delayInformation.attributeValue("stamp")); .parse(delayInformation.attributeValue("stamp"));
...@@ -200,9 +200,8 @@ public class HistoryRequest { ...@@ -200,9 +200,8 @@ public class HistoryRequest {
historyToSend.addFirst(message); historyToSend.addFirst(message);
} }
// Send the smallest amount of traffic to the user // Send the smallest amount of traffic to the user
Iterator history = historyToSend.iterator(); for (Object aHistoryToSend : historyToSend) {
while (history.hasNext()) { joinRole.send((Message) aHistoryToSend);
joinRole.send((Message) history.next());
} }
} }
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
package org.jivesoftware.openfire.muc; package org.jivesoftware.openfire.muc;
import org.jivesoftware.openfire.muc.cluster.UpdateHistoryStrategy; import org.jivesoftware.openfire.muc.cluster.UpdateHistoryStrategy;
import org.jivesoftware.util.JiveGlobals; import org.jivesoftware.openfire.muc.spi.MUCPersistenceManager;
import org.jivesoftware.util.Log; import org.jivesoftware.util.Log;
import org.jivesoftware.util.cache.CacheFactory; import org.jivesoftware.util.cache.CacheFactory;
import org.xmpp.packet.Message; import org.xmpp.packet.Message;
...@@ -63,6 +63,10 @@ public class HistoryStrategy { ...@@ -63,6 +63,10 @@ public class HistoryStrategy {
* (do not include trailing dot). * (do not include trailing dot).
*/ */
private String contextPrefix = null; private String contextPrefix = null;
/**
* The subdomain of the service the properties are set on.
*/
private String contextSubdomain = null;
/** /**
* Create a history strategy with the given parent strategy (for defaults) or null if no * Create a history strategy with the given parent strategy (for defaults) or null if no
...@@ -102,11 +106,11 @@ public class HistoryStrategy { ...@@ -102,11 +106,11 @@ public class HistoryStrategy {
} }
this.maxNumber = max; this.maxNumber = max;
if (contextPrefix != null){ if (contextPrefix != null){
JiveGlobals.setProperty(contextPrefix + ".maxNumber", Integer.toString(maxNumber)); MUCPersistenceManager.setProperty(contextSubdomain, contextPrefix + ".maxNumber", Integer.toString(maxNumber));
} }
if (parent == null) { if (parent == null) {
// Update the history strategy of the MUC service // Update the history strategy of the MUC service
CacheFactory.doClusterTask(new UpdateHistoryStrategy(this)); CacheFactory.doClusterTask(new UpdateHistoryStrategy(contextSubdomain, this));
} }
} }
...@@ -124,11 +128,11 @@ public class HistoryStrategy { ...@@ -124,11 +128,11 @@ public class HistoryStrategy {
type = newType; type = newType;
} }
if (contextPrefix != null){ if (contextPrefix != null){
JiveGlobals.setProperty(contextPrefix + ".type", type.toString()); MUCPersistenceManager.setProperty(contextSubdomain, contextPrefix + ".type", type.toString());
} }
if (parent == null) { if (parent == null) {
// Update the history strategy of the MUC service // Update the history strategy of the MUC service
CacheFactory.doClusterTask(new UpdateHistoryStrategy(this)); CacheFactory.doClusterTask(new UpdateHistoryStrategy(contextSubdomain, this));
} }
} }
...@@ -235,7 +239,7 @@ public class HistoryStrategy { ...@@ -235,7 +239,7 @@ public class HistoryStrategy {
*/ */
public enum Type { public enum Type {
defaulType, none, all, number defaulType, none, all, number
}; }
/** /**
* Obtain the strategy type from string name. See the Type enumeration name * Obtain the strategy type from string name. See the Type enumeration name
...@@ -263,12 +267,13 @@ public class HistoryStrategy { ...@@ -263,12 +267,13 @@ public class HistoryStrategy {
* Sets the prefix to use for retrieving and saving settings (and also * Sets the prefix to use for retrieving and saving settings (and also
* triggers an immediate loading of properties). * triggers an immediate loading of properties).
* *
* @param subdomain the subdomain of the muc service to pull properties for.
* @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 prefix) { public void setContext(String subdomain, String prefix) {
this.contextPrefix = prefix; this.contextPrefix = prefix;
setTypeFromString(JiveGlobals.getProperty(prefix + ".type")); setTypeFromString(MUCPersistenceManager.getProperty(subdomain, prefix + ".type"));
String maxNumberString = JiveGlobals.getProperty(prefix + ".maxNumber"); String maxNumberString = MUCPersistenceManager.getProperty(subdomain, prefix + ".maxNumber");
if (maxNumberString != null && maxNumberString.trim().length() > 0){ if (maxNumberString != null && maxNumberString.trim().length() > 0){
try { try {
this.maxNumber = Integer.parseInt(maxNumberString); this.maxNumber = Integer.parseInt(maxNumberString);
......
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.openfire.muc;
import org.xmpp.packet.JID;
import org.xmpp.packet.Message;
import java.util.Collection;
import java.util.concurrent.ConcurrentLinkedQueue;
/**
* Dispatches MUC events. The following events are supported:
* <ul>
* <li><b>occupantJoined</b> --> Someone joined a room.</li>
* <li><b>occupantLeft</b> --> Someone left a room.</li>
* <li><b>nicknameChanged</b> --> A nickname was changed in a room.</li>
* <li><b>messageReceived</b> --> A message was received in a room.</li>
* <li><b>roomCreated</b> --> A room was created.</li>
* <li><b>roomDestryod</b> --> A room was destroyed.</li>
* </ul>
* Use {@link #addListener(MUCEventListener)} and {@link #removeListener(MUCEventListener)}
* to add or remove {@link MUCEventListener}.
*
* @author Daniel Henninger
*/
public class MUCEventDispatcher {
private static Collection<MUCEventListener> listeners =
new ConcurrentLinkedQueue<MUCEventListener>();
public static void addListener(MUCEventListener listener) {
listeners.add(listener);
}
public static void removeListener(MUCEventListener listener) {
listeners.remove(listener);
}
public static void occupantJoined(JID roomJID, JID user, String nickname) {
for (MUCEventListener listener : listeners) {
listener.occupantJoined(roomJID, user, nickname);
}
}
public static void occupantLeft(JID roomJID, JID user) {
for (MUCEventListener listener : listeners) {
listener.occupantLeft(roomJID, user);
}
}
public static void nicknameChanged(JID roomJID, JID user, String oldNickname, String newNickname) {
for (MUCEventListener listener : listeners) {
listener.nicknameChanged(roomJID, user, oldNickname, newNickname);
}
}
public static void messageReceived(JID roomJID, JID user, String nickname, Message message) {
for (MUCEventListener listener : listeners) {
listener.messageReceived(roomJID, user, nickname, message);
}
}
public static void roomCreated(JID roomJID) {
for (MUCEventListener listener : listeners) {
listener.roomCreated(roomJID);
}
}
public static void roomDestroyed(JID roomJID) {
for (MUCEventListener listener : listeners) {
listener.roomDestroyed(roomJID);
}
}
}
...@@ -15,7 +15,7 @@ import org.xmpp.packet.JID; ...@@ -15,7 +15,7 @@ import org.xmpp.packet.JID;
import org.xmpp.packet.Message; import org.xmpp.packet.Message;
/** /**
* Interface to listen for MUC events. Use the {@link MultiUserChatServer#addListener(MUCEventListener)} * Interface to listen for MUC events. Use the {@link MUCEventDispatcher#addListener(MUCEventListener)}
* method to register for events. * method to register for events.
* *
* @author Gaston Dombiak * @author Gaston Dombiak
......
...@@ -50,6 +50,13 @@ public interface MUCRoom extends Externalizable, Result { ...@@ -50,6 +50,13 @@ public interface MUCRoom extends Externalizable, Result {
*/ */
String getName(); String getName();
/**
* Get the full JID of this room.
*
* @return the JID for this room.
*/
JID getJID();
/** /**
* Obtain a unique numerical id for this room. Useful for storing rooms in databases. If the * Obtain a unique numerical id for this room. Useful for storing rooms in databases. If the
* room is persistent or is logging the conversation then the returned ID won't be -1. * room is persistent or is logging the conversation then the returned ID won't be -1.
...@@ -68,6 +75,20 @@ public interface MUCRoom extends Externalizable, Result { ...@@ -68,6 +75,20 @@ public interface MUCRoom extends Externalizable, Result {
*/ */
void setID(long roomID); void setID(long roomID);
/**
* Get the multi user chat service the room is attached to.
*
* @return the MultiUserChatService instance that the room is attached to.
*/
MultiUserChatService getMUCService();
/**
* Sets the multi user chat service the room is attached to.
*
* @param service The MultiUserChatService that the room is attached to.
*/
void setMUCService(MultiUserChatService service);
/** /**
* Returns the date when the room was created. * Returns the date when the room was created.
* *
...@@ -238,6 +259,7 @@ public interface MUCRoom extends Externalizable, Result { ...@@ -238,6 +259,7 @@ public interface MUCRoom extends Externalizable, Result {
/** /**
* Create a new presence in this room for the given role. * Create a new presence in this room for the given role.
* *
* @param type Type of presence to create.
* @return The new presence * @return The new presence
* @throws UnauthorizedException If the user doesn't have permission to leave the room * @throws UnauthorizedException If the user doesn't have permission to leave the room
*/ */
......
...@@ -14,6 +14,9 @@ package org.jivesoftware.openfire.muc; ...@@ -14,6 +14,9 @@ package org.jivesoftware.openfire.muc;
import org.xmpp.component.Component; import org.xmpp.component.Component;
import org.xmpp.packet.JID; import org.xmpp.packet.JID;
import org.xmpp.packet.Message; import org.xmpp.packet.Message;
import org.jivesoftware.openfire.muc.spi.LocalMUCRoom;
import org.jivesoftware.database.JiveID;
import org.jivesoftware.util.JiveConstants;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
...@@ -25,7 +28,8 @@ import java.util.List; ...@@ -25,7 +28,8 @@ import java.util.List;
* *
* @author Gaston Dombiak * @author Gaston Dombiak
*/ */
public interface MultiUserChatServer extends Component { @JiveID(JiveConstants.MUC_SERVICE)
public interface MultiUserChatService extends Component {
/** /**
* Returns the fully-qualifed domain name of this chat service. * Returns the fully-qualifed domain name of this chat service.
...@@ -43,14 +47,6 @@ public interface MultiUserChatServer extends Component { ...@@ -43,14 +47,6 @@ public interface MultiUserChatServer extends Component {
*/ */
String getServiceName(); String getServiceName();
/**
* Set the name of this chat service. The new name won't go into effect until the server is
* restarted.
*
* @param name The chat service name (host name).
*/
void setServiceName(String name);
/** /**
* Returns the collection of JIDs that are system administrators of the MUC service. A sysadmin has * Returns the collection of JIDs that are system administrators of the MUC service. A sysadmin has
* the same permissions as a room owner. * the same permissions as a room owner.
...@@ -227,6 +223,22 @@ public interface MultiUserChatServer extends Component { ...@@ -227,6 +223,22 @@ public interface MultiUserChatServer extends Component {
*/ */
boolean hasChatRoom(String roomName); boolean hasChatRoom(String roomName);
/**
* Notification message indicating that the specified chat room was
* removed from some other cluster member.
*
* @param room the removed room in another cluster node.
*/
public void chatRoomRemoved(LocalMUCRoom room);
/**
* Notification message indicating that a chat room has been created
* in another cluster member.
*
* @param room the created room in another cluster node.
*/
public void chatRoomAdded(LocalMUCRoom room);
/** /**
* Removes the room associated with the given name. * Removes the room associated with the given name.
* *
...@@ -252,6 +264,45 @@ public interface MultiUserChatServer extends Component { ...@@ -252,6 +264,45 @@ public interface MultiUserChatServer extends Component {
*/ */
public long getTotalChatTime(); public long getTotalChatTime();
/**
* Retuns the number of existing rooms in the server (i.e. persistent or not,
* in memory or not).
*
* @return the number of existing rooms in the server.
*/
public int getNumberChatRooms();
/**
* Retuns the total number of occupants in all rooms in the server.
*
* @param onlyLocal true if only users connected to this JVM will be considered. Otherwise count cluster wise.
* @return the number of existing rooms in the server.
*/
public int getNumberConnectedUsers(boolean onlyLocal);
/**
* Retuns the total number of users that have joined in all rooms in the server.
*
* @return the number of existing rooms in the server.
*/
public int getNumberRoomOccupants();
/**
* Returns the total number of incoming messages since last reset.
*
* @param resetAfter True if you want the counter to be reset after results returned.
* @return the number of incoming messages through the service.
*/
public long getIncomingMessageCount(boolean resetAfter);
/**
* Returns the total number of outgoing messages since last reset.
*
* @param resetAfter True if you want the counter to be reset after results returned.
* @return the number of outgoing messages through the service.
*/
public long getOutgoingMessageCount(boolean resetAfter);
/** /**
* Logs that a given message was sent to a room as part of a conversation. Every message sent * Logs that a given message was sent to a room as part of a conversation. Every message sent
* to the room that is allowed to be broadcasted and that was sent either from the room itself * to the room that is allowed to be broadcasted and that was sent either from the room itself
...@@ -261,7 +312,7 @@ public interface MultiUserChatServer extends Component { ...@@ -261,7 +312,7 @@ public interface MultiUserChatServer extends Component {
* the logged messages in memory until the logging process saves them to the database. It's * the logged messages in memory until the logging process saves them to the database. It's
* possible to configure the logging process to run every X milliseconds and also the number * possible to configure the logging process to run every X milliseconds and also the number
* of messages to log on each execution. * of messages to log on each execution.
* @see org.jivesoftware.openfire.muc.spi.MultiUserChatServerImpl#initialize(org.jivesoftware.openfire.XMPPServer) * @see org.jivesoftware.openfire.muc.spi.MultiUserChatServiceImpl#initialize(org.jivesoftware.openfire.XMPPServer)
* *
* @param room the room that received the message. * @param room the room that received the message.
* @param message the message to log as part of the conversation in the room. * @param message the message to log as part of the conversation in the room.
...@@ -295,16 +346,14 @@ public interface MultiUserChatServer extends Component { ...@@ -295,16 +346,14 @@ public interface MultiUserChatServer extends Component {
boolean isServiceEnabled(); boolean isServiceEnabled();
/** /**
* Registers a listener to receive events. * Returns true if the MUC service is a private, externally managed, service. This is typically
* set to true when the implementation is not the default one, and is not to be managed by
* the standard Openfire interface. If this is set to true, the service will not show up in
* the service list in the admin console.
* *
* @param listener the listener. * TODO: Anything else? Should it show up in Disco browsing?
*/
void addListener(MUCEventListener listener);
/**
* Unregisters a listener to receive events.
* *
* @param listener the listener. * @return true if the MUC service is private and externally managed.
*/ */
void removeListener(MUCEventListener listener); boolean isServicePrivate();
} }
\ No newline at end of file
...@@ -28,14 +28,14 @@ import java.io.ObjectOutput; ...@@ -28,14 +28,14 @@ import java.io.ObjectOutput;
* *
* @author Gaston Dombiak * @author Gaston Dombiak
*/ */
public class BroascastMessageRequest extends MUCRoomTask { public class BroadcastMessageRequest extends MUCRoomTask {
private int occupants; private int occupants;
private Message message; private Message message;
public BroascastMessageRequest() { public BroadcastMessageRequest() {
} }
public BroascastMessageRequest(LocalMUCRoom room, Message message, int occupants) { public BroadcastMessageRequest(LocalMUCRoom room, Message message, int occupants) {
super(room); super(room);
this.message = message; this.message = message;
this.occupants = occupants; this.occupants = occupants;
......
...@@ -29,13 +29,13 @@ import java.io.ObjectOutput; ...@@ -29,13 +29,13 @@ import java.io.ObjectOutput;
* *
* @author Gaston Dombiak * @author Gaston Dombiak
*/ */
public class BroascastPresenceRequest extends MUCRoomTask { public class BroadcastPresenceRequest extends MUCRoomTask {
private Presence presence; private Presence presence;
public BroascastPresenceRequest() { public BroadcastPresenceRequest() {
} }
public BroascastPresenceRequest(LocalMUCRoom room, Presence message) { public BroadcastPresenceRequest(LocalMUCRoom room, Presence message) {
super(room); super(room);
this.presence = message; this.presence = message;
} }
......
...@@ -14,7 +14,7 @@ package org.jivesoftware.openfire.muc.cluster; ...@@ -14,7 +14,7 @@ package org.jivesoftware.openfire.muc.cluster;
import org.jivesoftware.openfire.XMPPServer; import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.muc.MUCRole; import org.jivesoftware.openfire.muc.MUCRole;
import org.jivesoftware.openfire.muc.MUCRoom; import org.jivesoftware.openfire.muc.MUCRoom;
import org.jivesoftware.openfire.muc.MultiUserChatServer; import org.jivesoftware.openfire.muc.MultiUserChatService;
import org.jivesoftware.openfire.muc.spi.LocalMUCRoom; import org.jivesoftware.openfire.muc.spi.LocalMUCRoom;
import org.jivesoftware.util.cache.ClusterTask; import org.jivesoftware.util.cache.ClusterTask;
...@@ -43,18 +43,20 @@ public class GetNewMemberRoomsRequest implements ClusterTask { ...@@ -43,18 +43,20 @@ public class GetNewMemberRoomsRequest implements ClusterTask {
public void run() { public void run() {
rooms = new ArrayList<RoomInfo>(); rooms = new ArrayList<RoomInfo>();
// Get rooms that have local occupants and include them in the reply // Get all services that have local occupants and include them in the reply
MultiUserChatServer mucServer = XMPPServer.getInstance().getMultiUserChatServer(); for (MultiUserChatService mucService : XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServices()) {
for (MUCRoom room : mucServer.getChatRooms()) { // Get rooms that have local occupants and include them in the reply
LocalMUCRoom localRoom = (LocalMUCRoom) room; for (MUCRoom room : mucService.getChatRooms()) {
Collection<MUCRole> localOccupants = new ArrayList<MUCRole>(); LocalMUCRoom localRoom = (LocalMUCRoom) room;
for (MUCRole occupant : room.getOccupants()) { Collection<MUCRole> localOccupants = new ArrayList<MUCRole>();
if (occupant.isLocal()) { for (MUCRole occupant : room.getOccupants()) {
localOccupants.add(occupant); if (occupant.isLocal()) {
localOccupants.add(occupant);
}
}
if (!localOccupants.isEmpty()) {
rooms.add(new RoomInfo(localRoom, localOccupants));
} }
}
if (!localOccupants.isEmpty()) {
rooms.add(new RoomInfo(localRoom, localOccupants));
} }
} }
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
package org.jivesoftware.openfire.muc.cluster; package org.jivesoftware.openfire.muc.cluster;
import org.jivesoftware.openfire.XMPPServer; import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.muc.spi.MultiUserChatServerImpl; import org.jivesoftware.openfire.muc.MultiUserChatService;
import org.jivesoftware.util.cache.ClusterTask; import org.jivesoftware.util.cache.ClusterTask;
import java.io.IOException; import java.io.IOException;
...@@ -33,8 +33,10 @@ public class GetNumberConnectedUsers implements ClusterTask{ ...@@ -33,8 +33,10 @@ public class GetNumberConnectedUsers implements ClusterTask{
} }
public void run() { public void run() {
MultiUserChatServerImpl mucServer = (MultiUserChatServerImpl) XMPPServer.getInstance().getMultiUserChatServer(); count = 0;
count = mucServer.getNumberConnectedUsers(true); for (MultiUserChatService mucService : XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServices()) {
count += mucService.getNumberConnectedUsers(true);
}
} }
public void writeExternal(ObjectOutput out) throws IOException { public void writeExternal(ObjectOutput out) throws IOException {
......
...@@ -13,8 +13,10 @@ package org.jivesoftware.openfire.muc.cluster; ...@@ -13,8 +13,10 @@ package org.jivesoftware.openfire.muc.cluster;
import org.jivesoftware.openfire.XMPPServer; import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.muc.spi.LocalMUCRoom; import org.jivesoftware.openfire.muc.spi.LocalMUCRoom;
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;
...@@ -53,14 +55,22 @@ public abstract class MUCRoomTask implements ClusterTask { ...@@ -53,14 +55,22 @@ public abstract class MUCRoomTask implements ClusterTask {
public void writeExternal(ObjectOutput out) throws IOException { public void writeExternal(ObjectOutput out) throws IOException {
ExternalizableUtil.getInstance().writeBoolean(out, originator); ExternalizableUtil.getInstance().writeBoolean(out, originator);
ExternalizableUtil.getInstance().writeSafeUTF(out, room.getName()); ExternalizableUtil.getInstance().writeSafeUTF(out, room.getName());
ExternalizableUtil.getInstance().writeSafeUTF(out, room.getMUCService().getServiceName());
} }
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
originator = ExternalizableUtil.getInstance().readBoolean(in); originator = ExternalizableUtil.getInstance().readBoolean(in);
String roomName = ExternalizableUtil.getInstance().readSafeUTF(in); String roomName = ExternalizableUtil.getInstance().readSafeUTF(in);
room = (LocalMUCRoom) XMPPServer.getInstance().getMultiUserChatServer().getChatRoom(roomName); String subdomain = ExternalizableUtil.getInstance().readSafeUTF(in);
if (room == null) { try {
throw new IllegalArgumentException("Room not found: " + roomName); MultiUserChatService mucService = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(subdomain);
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);
} }
} }
} }
...@@ -11,9 +11,8 @@ ...@@ -11,9 +11,8 @@
package org.jivesoftware.openfire.muc.cluster; package org.jivesoftware.openfire.muc.cluster;
import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.muc.spi.LocalMUCRoom; import org.jivesoftware.openfire.muc.spi.LocalMUCRoom;
import org.jivesoftware.openfire.muc.spi.MultiUserChatServerImpl; import org.jivesoftware.openfire.muc.MultiUserChatService;
import org.jivesoftware.util.cache.ClusterTask; import org.jivesoftware.util.cache.ClusterTask;
import java.io.IOException; import java.io.IOException;
...@@ -42,8 +41,8 @@ public class RoomAvailableEvent implements ClusterTask { ...@@ -42,8 +41,8 @@ public class RoomAvailableEvent implements ClusterTask {
} }
public void run() { public void run() {
MultiUserChatServerImpl mucServer = (MultiUserChatServerImpl) XMPPServer.getInstance().getMultiUserChatServer(); MultiUserChatService mucService = room.getMUCService();
mucServer.chatRoomAdded(room); mucService.chatRoomAdded(room);
} }
public void writeExternal(ObjectOutput out) throws IOException { public void writeExternal(ObjectOutput out) throws IOException {
......
...@@ -11,10 +11,9 @@ ...@@ -11,10 +11,9 @@
package org.jivesoftware.openfire.muc.cluster; package org.jivesoftware.openfire.muc.cluster;
import org.jivesoftware.openfire.XMPPServer; import org.jivesoftware.openfire.muc.spi.LocalMUCRoom;
import org.jivesoftware.openfire.muc.spi.MultiUserChatServerImpl; 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 java.io.IOException; import java.io.IOException;
import java.io.ObjectInput; import java.io.ObjectInput;
...@@ -28,13 +27,13 @@ import java.io.ObjectOutput; ...@@ -28,13 +27,13 @@ import java.io.ObjectOutput;
* @author Gaston Dombiak * @author Gaston Dombiak
*/ */
public class RoomRemovedEvent implements ClusterTask { public class RoomRemovedEvent implements ClusterTask {
private String roomName; private LocalMUCRoom room;
public RoomRemovedEvent() { public RoomRemovedEvent() {
} }
public RoomRemovedEvent(String roomName) { public RoomRemovedEvent(LocalMUCRoom room) {
this.roomName = roomName; this.room = room;
} }
public Object getResult() { public Object getResult() {
...@@ -42,15 +41,16 @@ public class RoomRemovedEvent implements ClusterTask { ...@@ -42,15 +41,16 @@ public class RoomRemovedEvent implements ClusterTask {
} }
public void run() { public void run() {
MultiUserChatServerImpl mucServer = (MultiUserChatServerImpl) XMPPServer.getInstance().getMultiUserChatServer(); MultiUserChatService mucService = room.getMUCService();
mucServer.chatRoomRemoved(roomName); mucService.chatRoomRemoved(room);
} }
public void writeExternal(ObjectOutput out) throws IOException { public void writeExternal(ObjectOutput out) throws IOException {
ExternalizableUtil.getInstance().writeSafeUTF(out, roomName); room.writeExternal(out);
} }
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
roomName = ExternalizableUtil.getInstance().readSafeUTF(in); room = new LocalMUCRoom();
room.readExternal(in);
} }
} }
/** /**
* $RCSfile$ * $RCSfile$
* $Revision: $ * $Revision: $
* $Date: $ * $Date: $
* *
* Copyright (C) 2007 Jive Software. All rights reserved. * Copyright (C) 2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
*/ */
package org.jivesoftware.openfire.muc.cluster; package org.jivesoftware.openfire.muc.cluster;
import org.jivesoftware.openfire.XMPPServer; import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.muc.MUCRoom; import org.jivesoftware.openfire.muc.MultiUserChatService;
import org.jivesoftware.openfire.muc.MultiUserChatServer; import org.jivesoftware.util.cache.ClusterTask;
import org.jivesoftware.openfire.muc.spi.LocalMUCRoom;
import org.jivesoftware.util.cache.ClusterTask; import java.io.IOException;
import java.io.ObjectInput;
import java.io.IOException; import java.io.ObjectOutput;
import java.io.ObjectInput; import java.util.ArrayList;
import java.io.ObjectOutput; import java.util.List;
import java.util.ArrayList;
import java.util.List; /**
* Task to be requested by a node that joins a cluster and be executed in the senior cluster member to get
/** * the services with rooms with occupants. The list of services with rooms with occupants is returned to
* Task to be requested by a node that joins a cluster and be executed in the senior cluster member to get * the new cluster node so that the new cluster node can be updated and have the same information shared
* the rooms with occupants. The list of rooms with occupants is returned to the new cluster node so that * by the cluster.<p>
* the new cluster node can be updated and have the same information shared by the cluster.<p> *
* * Moreover, each existing cluster node will also need to learn the services and rooms with occupants that
* Moreover, each existing cluster node will also need to learn the rooms with occupants that exist in * exist in the new cluster node and replicate them. This work is accomplished using
* the new cluster node and replicate them. This work is accomplished using {@link GetNewMemberRoomsRequest}. * {@link GetNewMemberRoomsRequest} on each service.
* *
* @author Gaston Dombiak * @author Daniel Henninger
*/ */
public class SeniorMemberRoomsRequest implements ClusterTask { public class SeniorMemberServicesRequest implements ClusterTask {
private List<RoomInfo> rooms; private List<ServiceInfo> services;
public SeniorMemberRoomsRequest() { public SeniorMemberServicesRequest() {
} }
public Object getResult() { public Object getResult() {
return rooms; return services;
} }
public void run() { public void run() {
rooms = new ArrayList<RoomInfo>(); services = new ArrayList<ServiceInfo>();
// Get rooms that have occupants and include them in the reply // Get all services and include them in the reply
MultiUserChatServer mucServer = XMPPServer.getInstance().getMultiUserChatServer(); for (MultiUserChatService mucService : XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServices()) {
for (MUCRoom room : mucServer.getChatRooms()) { services.add(new ServiceInfo(mucService));
LocalMUCRoom localRoom = (LocalMUCRoom) room; }
if (!room.getOccupants().isEmpty()) { }
rooms.add(new RoomInfo(localRoom, localRoom.getOccupants()));
} public void writeExternal(ObjectOutput out) throws IOException {
} // Do nothing
} }
public void writeExternal(ObjectOutput out) throws IOException { public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
// Do nothing // Do nothing
} }
}
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
// Do nothing
}
}
/**
* $RCSfile$
* $Revision: $
* $Date: $
*
* Copyright (C) 2008 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.openfire.muc.cluster;
import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.muc.MultiUserChatService;
import org.jivesoftware.openfire.muc.spi.MultiUserChatServiceImpl;
import org.jivesoftware.util.cache.ClusterTask;
import org.jivesoftware.util.cache.ExternalizableUtil;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
/**
* Task that will add a service to the cluster node. When a service is added
* in a cluster node the rest of the cluster nodes will need to add a copy.
* They do -not- need to create database entries for the new service as the originator
* will have already done that. This event assumes that it's the default representation
* of a MUC service, and therefore should not pass information about internal component
* generated MUC services.
*
* @author Daniel Henninger
*/
public class ServiceAddedEvent implements ClusterTask {
private String subdomain;
private String description;
public ServiceAddedEvent() {
}
public ServiceAddedEvent(String subdomain, String description) {
this.subdomain = subdomain;
this.description = description;
}
public Object getResult() {
return null;
}
public void run() {
// If it's registered already, no need to create it. Most likely this is because the service
// is provided by an internal component that registered at startup. This scenario, however,
// should really never occur.
if (!XMPPServer.getInstance().getMultiUserChatManager().isServiceRegistered(subdomain)) {
MultiUserChatService service = new MultiUserChatServiceImpl(subdomain, description);
XMPPServer.getInstance().getMultiUserChatManager().registerMultiUserChatService(service);
}
}
public void writeExternal(ObjectOutput out) throws IOException {
ExternalizableUtil.getInstance().writeSafeUTF(out, subdomain);
ExternalizableUtil.getInstance().writeSafeUTF(out, description);
}
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
subdomain = ExternalizableUtil.getInstance().readSafeUTF(in);
description = ExternalizableUtil.getInstance().readSafeUTF(in);
}
}
/**
* $RCSfile$
* $Revision: $
* $Date: $
*
* Copyright (C) 2008 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.openfire.muc.cluster;
import org.jivesoftware.util.cache.ExternalizableUtil;
import org.jivesoftware.openfire.muc.MultiUserChatService;
import org.jivesoftware.openfire.muc.MUCRoom;
import org.jivesoftware.openfire.muc.spi.LocalMUCRoom;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.ArrayList;
import java.util.List;
/**
* Representation of a service configuration. This information is requested by a cluster node when
* joining the cluster (requested to the senior member) and also from each cluster node to the new node
* joining the cluster. Each cluster node (existing and new one) has to merge its local services with the
* new ones. It does not include database stored configuration options, as they are handled via database
* reads.
*
* @author Daniel Henninger
*/
public class ServiceInfo implements Externalizable {
private String subdomain;
private String description;
private List<RoomInfo> rooms = new ArrayList<RoomInfo>();
/**
* Do not use this constructor. Needed for Externalizable interface.
*/
public ServiceInfo() {
}
public ServiceInfo(MultiUserChatService service) {
this.subdomain = service.getServiceName();
this.description = service.getDescription();
rooms = new ArrayList<RoomInfo>();
// Get rooms that have occupants and include them in the reply
for (MUCRoom room : service.getChatRooms()) {
LocalMUCRoom localRoom = (LocalMUCRoom) room;
if (!room.getOccupants().isEmpty()) {
rooms.add(new RoomInfo(localRoom, localRoom.getOccupants()));
}
}
}
public String getSubdomain() {
return subdomain;
}
public String getDescription() {
return description;
}
public List<RoomInfo> getRooms() {
return rooms;
}
public void writeExternal(ObjectOutput out) throws IOException {
ExternalizableUtil.getInstance().writeSafeUTF(out, subdomain);
ExternalizableUtil.getInstance().writeSafeUTF(out, description);
ExternalizableUtil.getInstance().writeExternalizableCollection(out, rooms);
}
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
subdomain = ExternalizableUtil.getInstance().readSafeUTF(in);
description = ExternalizableUtil.getInstance().readSafeUTF(in);
ExternalizableUtil.getInstance().readExternalizableCollection(in, rooms, getClass().getClassLoader());
}
}
/**
* $RCSfile$
* $Revision: $
* $Date: $
*
* Copyright (C) 2008 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.openfire.muc.cluster;
import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.util.cache.ClusterTask;
import org.jivesoftware.util.cache.ExternalizableUtil;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
/**
* Task that will remove a service from the cluster node. When a service is destroyed
* in a cluster node the rest of the cluster nodes will need to destroy their copy.
*
* @author Daniel Henninger
*/
public class ServiceRemovedEvent implements ClusterTask {
private String subdomain;
public ServiceRemovedEvent() {
}
public ServiceRemovedEvent(String subdomain) {
this.subdomain = subdomain;
}
public Object getResult() {
return null;
}
public void run() {
XMPPServer.getInstance().getMultiUserChatManager().unregisterMultiUserChatService(subdomain);
}
public void writeExternal(ObjectOutput out) throws IOException {
ExternalizableUtil.getInstance().writeSafeUTF(out, subdomain);
}
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
subdomain = ExternalizableUtil.getInstance().readSafeUTF(in);
}
}
/**
* $RCSfile$
* $Revision: $
* $Date: $
*
* Copyright (C) 2008 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.openfire.muc.cluster;
import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.muc.MultiUserChatService;
import org.jivesoftware.openfire.muc.spi.MultiUserChatServiceImpl;
import org.jivesoftware.openfire.muc.spi.MUCPersistenceManager;
import org.jivesoftware.util.cache.ClusterTask;
import org.jivesoftware.util.cache.ExternalizableUtil;
import org.jivesoftware.util.NotFoundException;
import org.jivesoftware.util.Log;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
/**
* Task that will update a service configuring in the cluster node. When a service is update
* in a cluster node the rest of the cluster nodes will need to reread their configuration
* from the database.
*
* @author Daniel Henninger
*/
public class ServiceUpdatedEvent implements ClusterTask {
private String subdomain;
public ServiceUpdatedEvent() {
}
public ServiceUpdatedEvent(String subdomain) {
this.subdomain = subdomain;
}
public Object getResult() {
return null;
}
public void run() {
try {
MultiUserChatService service = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(subdomain);
if (service instanceof MultiUserChatServiceImpl) {
MUCPersistenceManager.refreshProperties(subdomain);
((MultiUserChatServiceImpl)service).initializeSettings();
}
else {
// Ok. We don't handle non default implementations for this. Why are we seeing it?
}
}
catch (NotFoundException e) {
// Hrm. We got an update for something that we don't have.
Log.warn("ServiceUpdatedEvent: Received update for service we are not running: "+subdomain);
}
}
public void writeExternal(ObjectOutput out) throws IOException {
ExternalizableUtil.getInstance().writeSafeUTF(out, subdomain);
}
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
subdomain = ExternalizableUtil.getInstance().readSafeUTF(in);
}
}
...@@ -13,29 +13,32 @@ package org.jivesoftware.openfire.muc.cluster; ...@@ -13,29 +13,32 @@ package org.jivesoftware.openfire.muc.cluster;
import org.jivesoftware.openfire.XMPPServer; import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.muc.HistoryStrategy; import org.jivesoftware.openfire.muc.HistoryStrategy;
import org.jivesoftware.openfire.muc.spi.MultiUserChatServerImpl; 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;
import java.io.ObjectOutput; import java.io.ObjectOutput;
/** /**
* Cluster task that will update the history strategy used by the MultiUserChatServer * Cluster task that will update the history strategy used by a MultiUserChatService
* service. It is currently not possible to edit the history strategy of a given room * service. It is currently not possible to edit the history strategy of a given room
* but only of the service. Therefore, this task will only update the service's strategy. * but only of the service. Therefore, this task will only update the service's strategy.
* *
* @author Gaston Dombiak * @author Gaston Dombiak
*/ */
public class UpdateHistoryStrategy implements ClusterTask { public class UpdateHistoryStrategy implements ClusterTask {
private String serviceName;
private int type; private int type;
private int maxNumber; private int maxNumber;
public UpdateHistoryStrategy() { public UpdateHistoryStrategy() {
} }
public UpdateHistoryStrategy(HistoryStrategy historyStrategy) { public UpdateHistoryStrategy(String serviceName, HistoryStrategy historyStrategy) {
this.serviceName = serviceName;
type = historyStrategy.getType().ordinal(); type = historyStrategy.getType().ordinal();
maxNumber = historyStrategy.getMaxNumber(); maxNumber = historyStrategy.getMaxNumber();
} }
...@@ -45,18 +48,25 @@ public class UpdateHistoryStrategy implements ClusterTask { ...@@ -45,18 +48,25 @@ public class UpdateHistoryStrategy implements ClusterTask {
} }
public void run() { public void run() {
MultiUserChatServerImpl mucServer = (MultiUserChatServerImpl) XMPPServer.getInstance().getMultiUserChatServer(); try {
HistoryStrategy strategy = mucServer.getHistoryStrategy(); MultiUserChatServiceImpl mucServer = (MultiUserChatServiceImpl) XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(serviceName);
strategy.setType(HistoryStrategy.Type.values()[type]); HistoryStrategy strategy = mucServer.getHistoryStrategy();
strategy.setMaxNumber(maxNumber); strategy.setType(HistoryStrategy.Type.values()[type]);
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 {
ExternalizableUtil.getInstance().writeSafeUTF(out, serviceName);
ExternalizableUtil.getInstance().writeInt(out, type); ExternalizableUtil.getInstance().writeInt(out, type);
ExternalizableUtil.getInstance().writeInt(out, maxNumber); ExternalizableUtil.getInstance().writeInt(out, maxNumber);
} }
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
serviceName = ExternalizableUtil.getInstance().readSafeUTF(in);
type = ExternalizableUtil.getInstance().readInt(in); type = ExternalizableUtil.getInstance().readInt(in);
maxNumber = ExternalizableUtil.getInstance().readInt(in); maxNumber = ExternalizableUtil.getInstance().readInt(in);
} }
......
...@@ -24,7 +24,6 @@ import org.xmpp.packet.PacketError; ...@@ -24,7 +24,6 @@ import org.xmpp.packet.PacketError;
import org.xmpp.packet.Presence; import org.xmpp.packet.Presence;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator;
import java.util.List; import java.util.List;
/** /**
...@@ -116,8 +115,8 @@ public class IQAdminHandler { ...@@ -116,8 +115,8 @@ public class IQAdminHandler {
// Check if the client is requesting or changing the list of moderators/members/etc. // Check if the client is requesting or changing the list of moderators/members/etc.
if (!hasJID && !hasNick) { if (!hasJID && !hasNick) {
// The client is requesting the list of moderators/members/participants/outcasts // The client is requesting the list of moderators/members/participants/outcasts
for (Iterator items = itemsList.iterator(); items.hasNext();) { for (Object anItem : itemsList) {
item = (Element)items.next(); item = (Element) anItem;
affiliation = item.attributeValue("affiliation"); affiliation = item.attributeValue("affiliation");
roleAttribute = item.attributeValue("role"); roleAttribute = item.attributeValue("role");
// Create the result that will hold an item for each // Create the result that will hold an item for each
...@@ -137,8 +136,7 @@ public class IQAdminHandler { ...@@ -137,8 +136,7 @@ public class IQAdminHandler {
metaData.addAttribute("jid", jid); metaData.addAttribute("jid", jid);
} }
} } else if ("member".equals(affiliation)) {
else if ("member".equals(affiliation)) {
// The client is requesting the list of members // The client is requesting the list of members
// In a members-only room members can get the list of members // In a members-only room members can get the list of members
if (!room.isMembersOnly() if (!room.isMembersOnly()
...@@ -160,8 +158,7 @@ public class IQAdminHandler { ...@@ -160,8 +158,7 @@ public class IQAdminHandler {
// Do nothing // Do nothing
} }
} }
} } else if ("moderator".equals(roleAttribute)) {
else if ("moderator".equals(roleAttribute)) {
// The client is requesting the list of moderators // The client is requesting the list of moderators
if (MUCRole.Affiliation.admin != senderRole.getAffiliation() if (MUCRole.Affiliation.admin != senderRole.getAffiliation()
&& MUCRole.Affiliation.owner != senderRole.getAffiliation()) { && MUCRole.Affiliation.owner != senderRole.getAffiliation()) {
...@@ -174,8 +171,7 @@ public class IQAdminHandler { ...@@ -174,8 +171,7 @@ public class IQAdminHandler {
metaData.addAttribute("nick", role.getNickname()); metaData.addAttribute("nick", role.getNickname());
metaData.addAttribute("affiliation", role.getAffiliation().toString()); metaData.addAttribute("affiliation", role.getAffiliation().toString());
} }
} } else if ("participant".equals(roleAttribute)) {
else if ("participant".equals(roleAttribute)) {
// The client is requesting the list of participants // The client is requesting the list of participants
if (MUCRole.Role.moderator != senderRole.getRole()) { if (MUCRole.Role.moderator != senderRole.getRole()) {
throw new ForbiddenException(); throw new ForbiddenException();
...@@ -187,8 +183,7 @@ public class IQAdminHandler { ...@@ -187,8 +183,7 @@ public class IQAdminHandler {
metaData.addAttribute("nick", role.getNickname()); metaData.addAttribute("nick", role.getNickname());
metaData.addAttribute("affiliation", role.getAffiliation().toString()); metaData.addAttribute("affiliation", role.getAffiliation().toString());
} }
} } else {
else {
reply.setError(PacketError.Condition.bad_request); reply.setError(PacketError.Condition.bad_request);
} }
} }
...@@ -205,9 +200,9 @@ public class IQAdminHandler { ...@@ -205,9 +200,9 @@ public class IQAdminHandler {
List<Presence> presences = new ArrayList<Presence>(itemsList.size()); List<Presence> presences = new ArrayList<Presence>(itemsList.size());
// Collect the new affiliations or roles for the specified jids // Collect the new affiliations or roles for the specified jids
for (Iterator items = itemsList.iterator(); items.hasNext();) { for (Object anItem : itemsList) {
try { try {
item = (Element)items.next(); item = (Element) anItem;
target = (hasAffiliation ? item.attributeValue("affiliation") : item target = (hasAffiliation ? item.attributeValue("affiliation") : item
.attributeValue("role")); .attributeValue("role"));
// jid could be of the form "full JID" or "bare JID" depending if we are // jid could be of the form "full JID" or "bare JID" depending if we are
...@@ -215,8 +210,7 @@ public class IQAdminHandler { ...@@ -215,8 +210,7 @@ public class IQAdminHandler {
if (hasJID) { if (hasJID) {
jid = new JID(item.attributeValue("jid")); jid = new JID(item.attributeValue("jid"));
nick = null; nick = null;
} } else {
else {
// Get the JID based on the requested nick // Get the JID based on the requested nick
nick = item.attributeValue("nick"); nick = item.attributeValue("nick");
jid = room.getOccupant(nick).getUserAddress(); jid = room.getOccupant(nick).getUserAddress();
...@@ -227,18 +221,15 @@ public class IQAdminHandler { ...@@ -227,18 +221,15 @@ public class IQAdminHandler {
if ("moderator".equals(target)) { if ("moderator".equals(target)) {
// Add the user as a moderator of the room based on the full JID // Add the user as a moderator of the room based on the full JID
presences.add(room.addModerator(jid, senderRole)); presences.add(room.addModerator(jid, senderRole));
} } else if ("participant".equals(target)) {
else if ("participant".equals(target)) {
// Add the user as a participant of the room based on the full JID // Add the user as a participant of the room based on the full JID
presences.add(room.addParticipant(jid, presences.add(room.addParticipant(jid,
item.elementTextTrim("reason"), item.elementTextTrim("reason"),
senderRole)); senderRole));
} } else if ("visitor".equals(target)) {
else if ("visitor".equals(target)) {
// Add the user as a visitor of the room based on the full JID // Add the user as a visitor of the room based on the full JID
presences.add(room.addVisitor(jid, senderRole)); presences.add(room.addVisitor(jid, senderRole));
} } else if ("member".equals(target)) {
else if ("member".equals(target)) {
// Add the user as a member of the room based on the bare JID // Add the user as a member of the room based on the bare JID
boolean hadAffiliation = room.getAffiliation(jid.toBareJID()) != MUCRole.Affiliation.none; boolean hadAffiliation = room.getAffiliation(jid.toBareJID()) != MUCRole.Affiliation.none;
presences.addAll(room.addMember(jid.toBareJID(), nick, senderRole)); presences.addAll(room.addMember(jid.toBareJID(), nick, senderRole));
...@@ -247,17 +238,14 @@ public class IQAdminHandler { ...@@ -247,17 +238,14 @@ public class IQAdminHandler {
if (!hadAffiliation && room.isMembersOnly()) { if (!hadAffiliation && room.isMembersOnly()) {
room.sendInvitation(jid, null, senderRole, null); room.sendInvitation(jid, null, senderRole, null);
} }
} } else if ("outcast".equals(target)) {
else if ("outcast".equals(target)) {
// Add the user as an outcast of the room based on the bare JID // Add the user as an outcast of the room based on the bare JID
presences.addAll(room.addOutcast(jid.toBareJID(), item.elementTextTrim("reason"), senderRole)); presences.addAll(room.addOutcast(jid.toBareJID(), item.elementTextTrim("reason"), senderRole));
} } else if ("none".equals(target)) {
else if ("none".equals(target)) {
if (hasAffiliation) { if (hasAffiliation) {
// Set that this jid has a NONE affiliation based on the bare JID // Set that this jid has a NONE affiliation based on the bare JID
presences.addAll(room.addNone(jid.toBareJID(), senderRole)); presences.addAll(room.addNone(jid.toBareJID(), senderRole));
} } else {
else {
// Kick the user from the room // Kick the user from the room
if (MUCRole.Role.moderator != senderRole.getRole()) { if (MUCRole.Role.moderator != senderRole.getRole()) {
throw new ForbiddenException(); throw new ForbiddenException();
...@@ -265,8 +253,7 @@ public class IQAdminHandler { ...@@ -265,8 +253,7 @@ public class IQAdminHandler {
presences.add(room.kickOccupant(jid, senderRole.getUserAddress(), presences.add(room.kickOccupant(jid, senderRole.getUserAddress(),
item.elementTextTrim("reason"))); item.elementTextTrim("reason")));
} }
} } else {
else {
reply.setError(PacketError.Condition.bad_request); reply.setError(PacketError.Condition.bad_request);
} }
} }
......
...@@ -21,7 +21,7 @@ import org.jivesoftware.openfire.forms.spi.XFormFieldImpl; ...@@ -21,7 +21,7 @@ import org.jivesoftware.openfire.forms.spi.XFormFieldImpl;
import org.jivesoftware.openfire.muc.ConflictException; import org.jivesoftware.openfire.muc.ConflictException;
import org.jivesoftware.openfire.muc.ForbiddenException; import org.jivesoftware.openfire.muc.ForbiddenException;
import org.jivesoftware.openfire.muc.MUCRoom; import org.jivesoftware.openfire.muc.MUCRoom;
import org.jivesoftware.openfire.muc.MultiUserChatServer; import org.jivesoftware.openfire.muc.MultiUserChatService;
import org.jivesoftware.util.ElementUtil; import org.jivesoftware.util.ElementUtil;
import org.jivesoftware.util.LocaleUtils; import org.jivesoftware.util.LocaleUtils;
import org.jivesoftware.util.Log; import org.jivesoftware.util.Log;
...@@ -43,10 +43,10 @@ import java.util.List; ...@@ -43,10 +43,10 @@ import java.util.List;
class IQMUCRegisterHandler { class IQMUCRegisterHandler {
private static Element probeResult; private static Element probeResult;
private MultiUserChatServer mucServer; private MultiUserChatService mucService;
public IQMUCRegisterHandler(MultiUserChatServer mucServer) { public IQMUCRegisterHandler(MultiUserChatService mucService) {
this.mucServer = mucServer; this.mucService = mucService;
initialize(); initialize();
} }
...@@ -109,7 +109,7 @@ class IQMUCRegisterHandler { ...@@ -109,7 +109,7 @@ class IQMUCRegisterHandler {
MUCRoom room = null; MUCRoom room = null;
String name = packet.getTo().getNode(); String name = packet.getTo().getNode();
if (name != null) { if (name != null) {
room = mucServer.getChatRoom(name); room = mucService.getChatRoom(name);
} }
if (room == null) { if (room == null) {
// The room doesn't exist so answer a NOT_FOUND error // The room doesn't exist so answer a NOT_FOUND error
......
...@@ -17,10 +17,9 @@ import org.jivesoftware.openfire.forms.FormField; ...@@ -17,10 +17,9 @@ import org.jivesoftware.openfire.forms.FormField;
import org.jivesoftware.openfire.forms.spi.XDataFormImpl; import org.jivesoftware.openfire.forms.spi.XDataFormImpl;
import org.jivesoftware.openfire.forms.spi.XFormFieldImpl; import org.jivesoftware.openfire.forms.spi.XFormFieldImpl;
import org.jivesoftware.openfire.muc.MUCRoom; import org.jivesoftware.openfire.muc.MUCRoom;
import org.jivesoftware.openfire.muc.MultiUserChatServer; import org.jivesoftware.openfire.muc.MultiUserChatService;
import org.jivesoftware.openfire.resultsetmanager.ResultSet; import org.jivesoftware.openfire.resultsetmanager.ResultSet;
import org.jivesoftware.openfire.resultsetmanager.ResultSetImpl; import org.jivesoftware.openfire.resultsetmanager.ResultSetImpl;
import org.jivesoftware.util.JiveGlobals;
import org.xmpp.packet.IQ; import org.xmpp.packet.IQ;
import org.xmpp.packet.PacketError; import org.xmpp.packet.PacketError;
import org.xmpp.packet.PacketError.Condition; import org.xmpp.packet.PacketError.Condition;
...@@ -39,17 +38,17 @@ public class IQMUCSearchHandler ...@@ -39,17 +38,17 @@ public class IQMUCSearchHandler
/** /**
* The MUC-server to extend with jabber:iq:search functionality. * The MUC-server to extend with jabber:iq:search functionality.
*/ */
private final MultiUserChatServer mucServer; private final MultiUserChatService mucService;
/** /**
* Creates a new instance of the search provider. * Creates a new instance of the search provider.
* *
* @param mucServer * @param mucService
* The server for which to return search results. * The server for which to return search results.
*/ */
public IQMUCSearchHandler(MultiUserChatServer mucServer) public IQMUCSearchHandler(MultiUserChatService mucService)
{ {
this.mucServer = mucServer; this.mucService = mucService;
} }
/** /**
...@@ -142,7 +141,8 @@ public class IQMUCSearchHandler ...@@ -142,7 +141,8 @@ public class IQMUCSearchHandler
boolean includePasswordProtectedRooms = true; boolean includePasswordProtectedRooms = true;
final Set<String> names = new HashSet<String>(); final Set<String> names = new HashSet<String>();
final Iterator<FormField> formFields = df.getFields(); @SuppressWarnings("unchecked")
final Iterator<FormField> formFields = df.getFields();
while (formFields.hasNext()) while (formFields.hasNext())
{ {
...@@ -213,7 +213,7 @@ public class IQMUCSearchHandler ...@@ -213,7 +213,7 @@ public class IQMUCSearchHandler
// search for chatrooms matching the request params. // search for chatrooms matching the request params.
final List<MUCRoom> mucs = new ArrayList<MUCRoom>(); final List<MUCRoom> mucs = new ArrayList<MUCRoom>();
for (MUCRoom room : mucServer.getChatRooms()) for (MUCRoom room : mucService.getChatRooms())
{ {
boolean find = false; boolean find = false;
...@@ -307,7 +307,6 @@ public class IQMUCSearchHandler ...@@ -307,7 +307,6 @@ public class IQMUCSearchHandler
mucrsm = new ArrayList<MUCRoom>(searchResults); mucrsm = new ArrayList<MUCRoom>(searchResults);
} }
ArrayList<XFormFieldImpl> fields = null;
final Element res = DocumentHelper.createElement(QName.get("query", final Element res = DocumentHelper.createElement(QName.get("query",
"jabber:iq:search")); "jabber:iq:search"));
...@@ -315,7 +314,7 @@ public class IQMUCSearchHandler ...@@ -315,7 +314,7 @@ public class IQMUCSearchHandler
boolean atLeastoneResult = false; boolean atLeastoneResult = false;
for (MUCRoom room : mucrsm) for (MUCRoom room : mucrsm)
{ {
fields = new ArrayList<XFormFieldImpl>(); ArrayList<XFormFieldImpl> fields = new ArrayList<XFormFieldImpl>();
XFormFieldImpl innerfield = new XFormFieldImpl("name"); XFormFieldImpl innerfield = new XFormFieldImpl("name");
innerfield.setType(FormField.TYPE_TEXT_SINGLE); innerfield.setType(FormField.TYPE_TEXT_SINGLE);
innerfield.addValue(room.getNaturalLanguageName()); innerfield.addValue(room.getNaturalLanguageName());
...@@ -397,6 +396,7 @@ public class IQMUCSearchHandler ...@@ -397,6 +396,7 @@ public class IQMUCSearchHandler
* *
* @param mucs * @param mucs
* The unordered list that will be sorted. * The unordered list that will be sorted.
* @return The sorted list of MUC rooms.
*/ */
private static List<MUCRoom> sortByUserAmount(List<MUCRoom> mucs) private static List<MUCRoom> sortByUserAmount(List<MUCRoom> mucs)
{ {
...@@ -413,7 +413,7 @@ public class IQMUCSearchHandler ...@@ -413,7 +413,7 @@ public class IQMUCSearchHandler
/** /**
* Checks if the room may be included in search results. This is almost * Checks if the room may be included in search results. This is almost
* identical to {@link MultiUserChatServerImpl#canDiscoverRoom(MUCRoom room)}, * identical to {@link MultiUserChatServiceImpl#canDiscoverRoom(MUCRoom room)},
* but that method is private and cannot be re-used here. * but that method is private and cannot be re-used here.
* *
* @param room * @param room
...@@ -424,7 +424,7 @@ public class IQMUCSearchHandler ...@@ -424,7 +424,7 @@ public class IQMUCSearchHandler
private static boolean canBeIncludedInResult(MUCRoom room) private static boolean canBeIncludedInResult(MUCRoom room)
{ {
// Check if locked rooms may be discovered // Check if locked rooms may be discovered
final boolean discoverLocked = JiveGlobals.getBooleanProperty("xmpp.muc.discover.locked", true); final boolean discoverLocked = MUCPersistenceManager.getBooleanProperty(room.getMUCService().getServiceName(), "discover.locked", true);
if (!discoverLocked && room.isLocked()) if (!discoverLocked && room.isLocked())
{ {
......
...@@ -19,7 +19,7 @@ import org.jivesoftware.openfire.XMPPServer; ...@@ -19,7 +19,7 @@ import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.cluster.NodeID; import org.jivesoftware.openfire.cluster.NodeID;
import org.jivesoftware.openfire.muc.MUCRole; import org.jivesoftware.openfire.muc.MUCRole;
import org.jivesoftware.openfire.muc.MUCRoom; import org.jivesoftware.openfire.muc.MUCRoom;
import org.jivesoftware.openfire.muc.MultiUserChatServer; import org.jivesoftware.openfire.muc.MultiUserChatService;
import org.jivesoftware.openfire.muc.NotAllowedException; import org.jivesoftware.openfire.muc.NotAllowedException;
import org.jivesoftware.openfire.session.ClientSession; import org.jivesoftware.openfire.session.ClientSession;
import org.jivesoftware.openfire.session.Session; import org.jivesoftware.openfire.session.Session;
...@@ -58,7 +58,7 @@ public class LocalMUCRole implements MUCRole { ...@@ -58,7 +58,7 @@ public class LocalMUCRole implements MUCRole {
/** /**
* The chatserver that hosts this role. * The chatserver that hosts this role.
*/ */
private MultiUserChatServer server; private MultiUserChatService server;
/** /**
* The role. * The role.
...@@ -109,7 +109,7 @@ public class LocalMUCRole implements MUCRole { ...@@ -109,7 +109,7 @@ public class LocalMUCRole implements MUCRole {
* @param presence the presence sent by the user to join the room. * @param presence the presence sent by the user to join the room.
* @param packetRouter the packet router for sending messages from this role. * @param packetRouter the packet router for sending messages from this role.
*/ */
public LocalMUCRole(MultiUserChatServer chatserver, LocalMUCRoom chatroom, String nickname, public LocalMUCRole(MultiUserChatService chatserver, LocalMUCRoom chatroom, String nickname,
MUCRole.Role role, MUCRole.Affiliation affiliation, LocalMUCUser chatuser, Presence presence, MUCRole.Role role, MUCRole.Affiliation affiliation, LocalMUCUser chatuser, Presence presence,
PacketRouter packetRouter) PacketRouter packetRouter)
{ {
......
...@@ -40,7 +40,7 @@ import java.util.concurrent.ConcurrentHashMap; ...@@ -40,7 +40,7 @@ import java.util.concurrent.ConcurrentHashMap;
public class LocalMUCUser implements MUCUser { public class LocalMUCUser implements MUCUser {
/** The chat server this user belongs to. */ /** The chat server this user belongs to. */
private MultiUserChatServer server; private MultiUserChatService server;
/** Real system XMPPAddress for the user. */ /** Real system XMPPAddress for the user. */
private JID realjid; private JID realjid;
...@@ -59,14 +59,14 @@ public class LocalMUCUser implements MUCUser { ...@@ -59,14 +59,14 @@ public class LocalMUCUser implements MUCUser {
/** /**
* Create a new chat user. * Create a new chat user.
* *
* @param chatserver the server the user belongs to. * @param chatservice the service the user belongs to.
* @param packetRouter the router for sending packets from this user. * @param packetRouter the router for sending packets from this user.
* @param jid the real address of the user * @param jid the real address of the user
*/ */
LocalMUCUser(MultiUserChatServerImpl chatserver, PacketRouter packetRouter, JID jid) { LocalMUCUser(MultiUserChatService chatservice, PacketRouter packetRouter, JID jid) {
this.realjid = jid; this.realjid = jid;
this.router = packetRouter; this.router = packetRouter;
this.server = chatserver; this.server = chatservice;
} }
/** /**
...@@ -274,6 +274,7 @@ public class LocalMUCUser implements MUCUser { ...@@ -274,6 +274,7 @@ public class LocalMUCUser implements MUCUser {
// Try to keep the list of extensions sent together with the // Try to keep the list of extensions sent together with the
// message invitation. These extensions will be sent to the // message invitation. These extensions will be sent to the
// invitees. // invitees.
@SuppressWarnings("unchecked")
List<Element> extensions = new ArrayList<Element>(packet List<Element> extensions = new ArrayList<Element>(packet
.getElement().elements()); .getElement().elements());
extensions.remove(userInfo); extensions.remove(userInfo);
......
/**
* $RCSfile$
* $Revision: 7175 $
* $Date: 2007-02-16 14:50:15 -0500 (Fri, 16 Feb 2007) $
*
* Copyright (C) 2008 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.openfire.muc.spi;
import java.util.Map;
/**
* Interface to listen for property events. Use the
* {@link org.jivesoftware.openfire.muc.spi.MUCServicePropertyEventDispatcher#addListener(MUCServicePropertyEventListener)}
* method to register for events.
*
* @author Daniel Henninger
*/
public interface MUCServicePropertyEventListener {
/**
* A property was set. The parameter map <tt>params</tt> will contain the
* the value of the property under the key <tt>value</tt>.
*
* @param service the subdomain of the service the property was set on.
* @param property the name of the property.
* @param params event parameters.
*/
public void propertySet(String service, String property, Map<String, Object> params);
/**
* A property was deleted.
*
* @param service the subdomain of the service the property was deleted from.
* @param property the name of the property deleted.
* @param params event parameters.
*/
public void propertyDeleted(String service, String property, Map<String, Object> params);
}
\ No newline at end of file
...@@ -17,7 +17,7 @@ import org.jivesoftware.openfire.XMPPServer; ...@@ -17,7 +17,7 @@ import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.cluster.NodeID; import org.jivesoftware.openfire.cluster.NodeID;
import org.jivesoftware.openfire.muc.MUCRole; import org.jivesoftware.openfire.muc.MUCRole;
import org.jivesoftware.openfire.muc.MUCRoom; import org.jivesoftware.openfire.muc.MUCRoom;
import org.jivesoftware.openfire.muc.MultiUserChatServer; import org.jivesoftware.openfire.muc.MultiUserChatService;
import org.jivesoftware.openfire.muc.cluster.OccupantAddedEvent; import org.jivesoftware.openfire.muc.cluster.OccupantAddedEvent;
import org.jivesoftware.util.cache.ExternalizableUtil; import org.jivesoftware.util.cache.ExternalizableUtil;
import org.xmpp.packet.JID; import org.xmpp.packet.JID;
...@@ -38,7 +38,7 @@ import java.io.ObjectOutput; ...@@ -38,7 +38,7 @@ import java.io.ObjectOutput;
* @author Gaston Dombiak * @author Gaston Dombiak
*/ */
public class RemoteMUCRole implements MUCRole, Externalizable { public class RemoteMUCRole implements MUCRole, Externalizable {
private MultiUserChatServer server; private MultiUserChatService server;
private Presence presence; private Presence presence;
private Role role; private Role role;
private Affiliation affiliation; private Affiliation affiliation;
...@@ -55,7 +55,7 @@ public class RemoteMUCRole implements MUCRole, Externalizable { ...@@ -55,7 +55,7 @@ public class RemoteMUCRole implements MUCRole, Externalizable {
public RemoteMUCRole() { public RemoteMUCRole() {
} }
public RemoteMUCRole(MultiUserChatServer server, OccupantAddedEvent event) { public RemoteMUCRole(MultiUserChatService server, OccupantAddedEvent event) {
this.server = server; this.server = server;
presence = event.getPresence(); presence = event.getPresence();
role = event.getRole(); role = event.getRole();
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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