mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-01 04:13:28 +01:00
60c34e5881
- Define ServerFactory for egw collab - Revert unintentional commits on Server.js
31 lines
1.0 KiB
JavaScript
31 lines
1.0 KiB
JavaScript
define("egwCollab/ServerFactory", [
|
|
"webodf/editor/backend/pullbox/Server",
|
|
"webodf/editor/backend/pullbox/SessionBackend",
|
|
"webodf/editor/backend/pullbox/SessionList"],
|
|
function (PullBoxServer, PullBoxSessionBackend, PullBoxSessionList) {
|
|
"use strict";
|
|
|
|
/**
|
|
* @constructor
|
|
* @implements ServerFactory
|
|
*/
|
|
return function egwCollabServerFactory() {
|
|
this.createServer = function (args) {
|
|
var server;
|
|
args = args || {};
|
|
|
|
server = new PullBoxServer(args);
|
|
server.getGenesisUrl = function(sid) {
|
|
return args.genesisUrl;
|
|
};
|
|
return server;
|
|
};
|
|
this.createSessionBackend = function (sid, mid, server) {
|
|
return new PullBoxSessionBackend(sid, mid, server);
|
|
};
|
|
this.createSessionList = function (server) {
|
|
return new PullBoxSessionList(server);
|
|
};
|
|
};
|
|
});
|