Class Index | File Index

Classes


Built-In Namespace _global_

Field Summary
Field Attributes Field Name and Description
 
Copyright 2009 Google Inc.
 
2011 Peter 'Pita' Martischka Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
 
Saves all Authors as a assoative Array.
 
A Array with all known Pads
 
2011 Peter 'Pita' Martischka Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
 
A associative array that saves which sessions belong to a pad
 
Copyright 2009 Google Inc.
 
A associative array that translates a session to a pad
 
A associative array that saves some general informations about a session key = sessionId values = author, rev rev = That last revision that was send to this client author = the author name of this session
 
Saves the Socket class we need to send and recieve data from the client
 
A easy key value pair.
Method Summary
Method Attributes Method Name and Description
 
_correctMarkersInPad(atext, apool)
Copied from the Etherpad Source Code.
 
Generates a random String with the given length.
 
appendRevision(id, theChangeset, The)
Append a changeset to a pad
 
atext(id)
Returns the Attributed Text of a pad
 
Creates an empty pad
 
Returns all Authors of a Pad
 
Returns the latest Revision Number of the Pad
 
getRevisionAuthor(id, revNum)
Returns the author of a specific revision
 
Returns the changeset of a specific revision
 
handleClientReady(client, message)
Handles a CLIENT_READY.
 
handleUserChanges(client, message)
Handles a USERINFO_UPDATE, that means that a user have changed his color or name.
 
handleUserInfoUpdate(client, message)
Handles a USERINFO_UPDATE, that means that a user have changed his color or name.
 
pool(id)
Returns the Attribute Pool whichs the Pad is using
 
text(id)
Returns the plain text of a pad
 
A internal function that checks if the Author exist and throws a exception if not
 
A internal function that simply checks if client or socketio is null and throws a exception if yes
 
Check if the ID is a valid Pad ID and trows an Exeption if not
 
Check if the Revision of a Pad is valid and throws an Exeption if not
Field Detail
AttributePoolFactory
Copyright 2009 Google Inc., 2011 Peter 'Pita' Martischka 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.
Defined in: Changeset.js.

Changeset
2011 Peter 'Pita' Martischka 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.
Defined in: PadManager.js.

globalAuthors
Saves all Authors as a assoative Array. The Key is the author id. Authors can have the following attributes: -name The Name of the Author as shown on the Pad -colorId The Id of Usercolor. A number between 0 and 31 -timestamp The timestamp on which the user was last seen
Defined in: AuthorManager.js.

globalPads
A Array with all known Pads
Defined in: PadManager.js.

http
2011 Peter 'Pita' Martischka 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.
Defined in: server.js.

pad2sessions
A associative array that saves which sessions belong to a pad
Defined in: MessageHandler.js.

padManager
Copyright 2009 Google Inc., 2011 Peter 'Pita' Martischka 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.
Defined in: MessageHandler.js.

session2pad
A associative array that translates a session to a pad
Defined in: MessageHandler.js.

sessioninfos
A associative array that saves some general informations about a session key = sessionId values = author, rev rev = That last revision that was send to this client author = the author name of this session
Defined in: MessageHandler.js.

socketio
Saves the Socket class we need to send and recieve data from the client
Defined in: MessageHandler.js.

token2author
A easy key value pair. The Key is the token, the value is the authorid
Defined in: AuthorManager.js.
Method Detail
_correctMarkersInPad(atext, apool)
Copied from the Etherpad Source Code. Don't know what this methode does excatly...
Defined in: MessageHandler.js.
Parameters:
atext
apool

_randomString(len)
Generates a random String with the given length. Is needed to generate the Author Ids
Defined in: AuthorManager.js.
Parameters:
len

appendRevision(id, theChangeset, The)
Append a changeset to a pad
Defined in: PadManager.js.
Parameters:
id
The Pad id
theChangeset
the changeset which should apply to the text
The
author of the revision, can be null

atext(id)
Returns the Attributed Text of a pad
Defined in: PadManager.js.
Parameters:
id
The Pad id

createPad(id)
Creates an empty pad
Defined in: PadManager.js.
Parameters:
id
The Pad id

getAllAuthors(id)
Returns all Authors of a Pad
Defined in: PadManager.js.
Parameters:
id
The Pad id

getHeadRevisionNumber(id)
Returns the latest Revision Number of the Pad
Defined in: PadManager.js.
Parameters:
id
The Pad id

getRevisionAuthor(id, revNum)
Returns the author of a specific revision
Defined in: PadManager.js.
Parameters:
id
The Pad id
revNum
The Revision Number

getRevisionChangeset(id, revNum)
Returns the changeset of a specific revision
Defined in: PadManager.js.
Parameters:
id
The Pad id
revNum
The Revision Number

handleClientReady(client, message)
Handles a CLIENT_READY. A CLIENT_READY is the first message from the client to the server. The Client sends his token and the pad it wants to enter. The Server answers with the inital values (clientVars) of the pad
Defined in: MessageHandler.js.
Parameters:
client
the client that send this message
message
the message from the client

handleUserChanges(client, message)
Handles a USERINFO_UPDATE, that means that a user have changed his color or name. Anyway, we get both informations This Method is nearly 90% copied out of the Etherpad Source Code. So I can't tell you what happens here exactly Look at https://github.com/ether/pad/blob/master/etherpad/src/etherpad/collab/collab_server.js in the function applyUserChanges()
Defined in: MessageHandler.js.
Parameters:
client
the client that send this message
message
the message from the client

handleUserInfoUpdate(client, message)
Handles a USERINFO_UPDATE, that means that a user have changed his color or name. Anyway, we get both informations
Defined in: MessageHandler.js.
Parameters:
client
the client that send this message
message
the message from the client

pool(id)
Returns the Attribute Pool whichs the Pad is using
Defined in: PadManager.js.
Parameters:
id
The Pad id

text(id)
Returns the plain text of a pad
Defined in: PadManager.js.
Parameters:
id
The Pad id

throwExceptionIfAuthorNotExist(author)
A internal function that checks if the Author exist and throws a exception if not
Defined in: AuthorManager.js.
Parameters:
author

throwExceptionIfClientOrIOisInvalid(client)
A internal function that simply checks if client or socketio is null and throws a exception if yes
Defined in: MessageHandler.js.
Parameters:
client

throwExceptionIfPadDontExist(id)
Check if the ID is a valid Pad ID and trows an Exeption if not
Defined in: PadManager.js.
Parameters:
id
The Pad id

throwExceptionIfRevDontExist(id, revNum)
Check if the Revision of a Pad is valid and throws an Exeption if not
Defined in: PadManager.js.
Parameters:
id
The Pad id
revNum

Documentation generated by JsDoc Toolkit 2.3.2 on Sat Mar 26 2011 18:26:06 GMT-0000 (GMT)