From 0772f6bb4ec29c944bd61d7f0d29ee6c0e4ddf82 Mon Sep 17 00:00:00 2001 From: Peter 'Pita' Martischka Date: Sat, 30 Jul 2011 17:15:45 +0100 Subject: [PATCH] updated documentation --- doc/jsdoc/{ => db}/AuthorManager.md | 11 +++++- doc/jsdoc/{db.md => db/DB.md} | 2 +- doc/jsdoc/{Models => db}/Pad.md | 4 +- doc/jsdoc/{ => db}/PadManager.md | 4 +- doc/jsdoc/db/ReadOnlyManager.md | 21 ++++++++++ doc/jsdoc/handler/ExportHandler.md | 16 ++++++++ doc/jsdoc/handler/ImportHandler.md | 15 ++++++++ doc/jsdoc/handler/PadMessageHandler.md | 38 +++++++++++++++++++ doc/jsdoc/handler/SocketIORouter.md | 23 +++++++++++ .../TimesliderMessageHandler.md} | 6 +-- doc/jsdoc/utils/Abiword.md | 15 ++++++++ doc/jsdoc/{ => utils}/AttributePoolFactory.md | 4 +- doc/jsdoc/{ => utils}/Changeset.md | 4 +- doc/jsdoc/utils/ExportHtml.md | 24 ++++++++++++ doc/jsdoc/{minify.md => utils/Minify.md} | 9 +++-- doc/jsdoc/{settings.md => utils/Settings.md} | 12 +++++- 16 files changed, 188 insertions(+), 20 deletions(-) rename doc/jsdoc/{ => db}/AuthorManager.md (81%) rename doc/jsdoc/{db.md => db/DB.md} (94%) rename doc/jsdoc/{Models => db}/Pad.md (87%) rename doc/jsdoc/{ => db}/PadManager.md (82%) create mode 100644 doc/jsdoc/db/ReadOnlyManager.md create mode 100644 doc/jsdoc/handler/ExportHandler.md create mode 100644 doc/jsdoc/handler/ImportHandler.md create mode 100644 doc/jsdoc/handler/PadMessageHandler.md create mode 100644 doc/jsdoc/handler/SocketIORouter.md rename doc/jsdoc/{MessageHandler.md => handler/TimesliderMessageHandler.md} (78%) create mode 100644 doc/jsdoc/utils/Abiword.md rename doc/jsdoc/{ => utils}/AttributePoolFactory.md (86%) rename doc/jsdoc/{ => utils}/Changeset.md (99%) create mode 100644 doc/jsdoc/utils/ExportHtml.md rename doc/jsdoc/{minify.md => utils/Minify.md} (54%) rename doc/jsdoc/{settings.md => utils/Settings.md} (77%) diff --git a/doc/jsdoc/AuthorManager.md b/doc/jsdoc/db/AuthorManager.md similarity index 81% rename from doc/jsdoc/AuthorManager.md rename to doc/jsdoc/db/AuthorManager.md index 9493a9d8..257d112c 100644 --- a/doc/jsdoc/AuthorManager.md +++ b/doc/jsdoc/db/AuthorManager.md @@ -1,10 +1,17 @@ -# AuthorManager -`require("./AuthorManager");` +# db/AuthorMana +`require("./db/AuthorManager");` The AuthorManager controlls all information about the Pad authors ## Functions +- - - +### getAuthor (author, callback) +Internal function that creates the database entry for an author + +* **author** *(String)* The id of the author +* **callback** *(Function)* callback(err, authorObj) + - - - ### getAuthor4Token (token, callback) Returns the Author Id for a token. If the token is unkown, diff --git a/doc/jsdoc/db.md b/doc/jsdoc/db/DB.md similarity index 94% rename from doc/jsdoc/db.md rename to doc/jsdoc/db/DB.md index be08850c..6acfd826 100644 --- a/doc/jsdoc/db.md +++ b/doc/jsdoc/db/DB.md @@ -1,5 +1,5 @@ # db -`require("./db");` +`require("./db/DB");` The DB Module provides a database initalized with the settings provided by the settings module diff --git a/doc/jsdoc/Models/Pad.md b/doc/jsdoc/db/Pad.md similarity index 87% rename from doc/jsdoc/Models/Pad.md rename to doc/jsdoc/db/Pad.md index e67dcc56..54b122b7 100644 --- a/doc/jsdoc/Models/Pad.md +++ b/doc/jsdoc/db/Pad.md @@ -1,5 +1,5 @@ -# Mod -`require("./Models/Pad");` +# db/ +`require("./db/Pad");` The pad object, defined with joose diff --git a/doc/jsdoc/PadManager.md b/doc/jsdoc/db/PadManager.md similarity index 82% rename from doc/jsdoc/PadManager.md rename to doc/jsdoc/db/PadManager.md index 2f476f3e..7721b3e8 100644 --- a/doc/jsdoc/PadManager.md +++ b/doc/jsdoc/db/PadManager.md @@ -1,5 +1,5 @@ -# PadManager -`require("./PadManager");` +# db/PadMana +`require("./db/PadManager");` The Pad Manager is a Factory for pad Objects diff --git a/doc/jsdoc/db/ReadOnlyManager.md b/doc/jsdoc/db/ReadOnlyManager.md new file mode 100644 index 00000000..4b6fc8af --- /dev/null +++ b/doc/jsdoc/db/ReadOnlyManager.md @@ -0,0 +1,21 @@ +# db/ReadOnlyMana +`require("./db/ReadOnlyManager");` + +The ReadOnlyManager manages the database and rendering releated to read only pads + +## Functions + +- - - +### getPadId (readOnlyId, callback) +returns a the padId for a read only id + +* **readOnlyId** *(String)* read only id +* **callback** *No description* + +- - - +### getReadOnlyId (padId, callback) +returns a read only id for a pad + +* **padId** *(String)* the id of the pad +* **callback** *No description* + diff --git a/doc/jsdoc/handler/ExportHandler.md b/doc/jsdoc/handler/ExportHandler.md new file mode 100644 index 00000000..7117715f --- /dev/null +++ b/doc/jsdoc/handler/ExportHandler.md @@ -0,0 +1,16 @@ +# handler/Expor +`require("./handler/ExportHandler");` + +Handles the export requests + +## Functions + +- - - +### doExport (req, res, padId, type) +do a requested export + +* **req** *No description* +* **res** *No description* +* **padId** *No description* +* **type** *No description* + diff --git a/doc/jsdoc/handler/ImportHandler.md b/doc/jsdoc/handler/ImportHandler.md new file mode 100644 index 00000000..e255586f --- /dev/null +++ b/doc/jsdoc/handler/ImportHandler.md @@ -0,0 +1,15 @@ +# handler/Impor +`require("./handler/ImportHandler");` + +Handles the import requests + +## Functions + +- - - +### doImport (req, res, padId) +do a requested import + +* **req** *No description* +* **res** *No description* +* **padId** *No description* + diff --git a/doc/jsdoc/handler/PadMessageHandler.md b/doc/jsdoc/handler/PadMessageHandler.md new file mode 100644 index 00000000..a17df95f --- /dev/null +++ b/doc/jsdoc/handler/PadMessageHandler.md @@ -0,0 +1,38 @@ +# handler/PadMessag +`require("./handler/PadMessageHandler");` + +The MessageHandler handles all Messages that comes from Socket.IO and controls the sessions + +## Functions + +- - - +### handleConnect (client) +Handles the connection of a new user + +* **client** the new client + +- - - +### handleDisconnect (client) +Handles the disconnection of a user + +* **client** the client that leaves + +- - - +### handleMessage (client, message) +Handles a message from a user + +* **client** the client that send this message +* **message** the message from the client + +- - - +### setSocketIO (socket_io) +A associative array that translates a session to a pad + +* **socket_io** The Socket + +- - - +### updatePadClients (pad, callback) + +* **pad** *No description* +* **callback** *No description* + diff --git a/doc/jsdoc/handler/SocketIORouter.md b/doc/jsdoc/handler/SocketIORouter.md new file mode 100644 index 00000000..8effc96d --- /dev/null +++ b/doc/jsdoc/handler/SocketIORouter.md @@ -0,0 +1,23 @@ +# handler/Socket +`require("./handler/SocketIORouter");` + +This is the Socket.IO Router. It routes the Messages between the +components of the Server. The components are at the moment: pad and timeslider + +## Functions + +- - - +### addComponent (moduleName, module) +Saves all components +key is the component name +value is the component module + +* **moduleName** *No description* +* **module** *No description* + +- - - +### setSocketIO (_socket) +sets the socket.io and adds event functions for routing + +* **_socket** *No description* + diff --git a/doc/jsdoc/MessageHandler.md b/doc/jsdoc/handler/TimesliderMessageHandler.md similarity index 78% rename from doc/jsdoc/MessageHandler.md rename to doc/jsdoc/handler/TimesliderMessageHandler.md index da6b115c..ac1edac6 100644 --- a/doc/jsdoc/MessageHandler.md +++ b/doc/jsdoc/handler/TimesliderMessageHandler.md @@ -1,5 +1,5 @@ -# MessageHandler -`require("./MessageHandler");` +# handler/TimesliderMessag +`require("./handler/TimesliderMessageHandler");` The MessageHandler handles all Messages that comes from Socket.IO and controls the sessions @@ -26,7 +26,7 @@ Handles a message from a user - - - ### setSocketIO (socket_io) -A associative array that translates a session to a pad +Saves the Socket class we need to send and recieve data from the client * **socket_io** The Socket diff --git a/doc/jsdoc/utils/Abiword.md b/doc/jsdoc/utils/Abiword.md new file mode 100644 index 00000000..680e2499 --- /dev/null +++ b/doc/jsdoc/utils/Abiword.md @@ -0,0 +1,15 @@ +# utils/A +`require("./utils/Abiword");` + +Controls the communication with the Abiword application + +## Functions + +- - - +### convertFile (srcFile, destFile, type, callback) + +* **srcFile** *No description* +* **destFile** *No description* +* **type** *No description* +* **callback** *No description* + diff --git a/doc/jsdoc/AttributePoolFactory.md b/doc/jsdoc/utils/AttributePoolFactory.md similarity index 86% rename from doc/jsdoc/AttributePoolFactory.md rename to doc/jsdoc/utils/AttributePoolFactory.md index 64ac3a22..4f52fcc3 100644 --- a/doc/jsdoc/AttributePoolFactory.md +++ b/doc/jsdoc/utils/AttributePoolFactory.md @@ -1,5 +1,5 @@ -# AttributePoolFactory -`require("./AttributePoolFactory");` +# utils/AttributePoolF +`require("./utils/AttributePoolFactory");` This code represents the Attribute Pool Object of the original Etherpad. 90% of the code is still like in the original Etherpad diff --git a/doc/jsdoc/Changeset.md b/doc/jsdoc/utils/Changeset.md similarity index 99% rename from doc/jsdoc/Changeset.md rename to doc/jsdoc/utils/Changeset.md index 066fc199..6f08514a 100644 --- a/doc/jsdoc/Changeset.md +++ b/doc/jsdoc/utils/Changeset.md @@ -1,5 +1,5 @@ -# Changeset -`require("./Changeset");` +# utils/Cha +`require("./utils/Changeset");` ## Functions diff --git a/doc/jsdoc/utils/ExportHtml.md b/doc/jsdoc/utils/ExportHtml.md new file mode 100644 index 00000000..8c56abbc --- /dev/null +++ b/doc/jsdoc/utils/ExportHtml.md @@ -0,0 +1,24 @@ +# utils/Expo +`require("./utils/ExportHtml");` + +Copyright 2009 Google Inc. +* Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +* http://www.apache.org/licenses/LICENSE-2.0 +* Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS-IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +## Functions + +- - - +### getPadHTMLDocument (padId, revNum, noDocType, callback) + +* **padId** *No description* +* **revNum** *No description* +* **noDocType** *No description* +* **callback** *No description* + diff --git a/doc/jsdoc/minify.md b/doc/jsdoc/utils/Minify.md similarity index 54% rename from doc/jsdoc/minify.md rename to doc/jsdoc/utils/Minify.md index ead833f4..b2d1cba3 100644 --- a/doc/jsdoc/minify.md +++ b/doc/jsdoc/utils/Minify.md @@ -1,5 +1,5 @@ -# minify -`require("./minify");` +# utils/ +`require("./utils/Minify");` This Module manages all /minified/* requests. It controls the minification && compression of Javascript and CSS. @@ -7,9 +7,10 @@ minification && compression of Javascript and CSS. ## Functions - - - -### padJS (req, res) -Answers a http request for the pad javascript +### minifyJS (req, res, jsFilename) +creates the minifed javascript for the given minified name * **req** the Express request * **res** the Express response +* **jsFilename** *No description* diff --git a/doc/jsdoc/settings.md b/doc/jsdoc/utils/Settings.md similarity index 77% rename from doc/jsdoc/settings.md rename to doc/jsdoc/utils/Settings.md index ad97c4f3..1750c438 100644 --- a/doc/jsdoc/settings.md +++ b/doc/jsdoc/utils/Settings.md @@ -1,11 +1,15 @@ -# settings -`require("./settings");` +# utils/Se +`require("./utils/Settings");` The Settings Modul reads the settings out of settings.json and provides this information to the other modules ##Variables +- - - +### abiword +The path of the abiword executable + - - - ### dbSettings This setting is passed with dbType to ueberDB to set up the database @@ -18,6 +22,10 @@ This setting is passed with dbType to ueberDB to set up the database ### defaultPadText The default Text of a new pad +- - - +### ip +The IP ep-lite should listen to + - - - ### logHTTP A flag that shows if http requests should be loged to stdout