Integration of Google Docs service in Plone Federica D'Elia - [email_address] Massimo Azzolini - [email_address]
GDIP: Google Docs service In Plone GDIP allows Plone users to store their documents on Google servers instead of ZODB
Documents are kept on Google servers
No more backups or ZODB size growth problems!!!
Users can access their documents both from the Plone application and from their Google Docs account
Automatic setup of sharing settings on Google documents according to user roles of the Plone application
Integrates Google Docs-based support for collaborative editing in Plone
System Architecture
GDIP is realized by four components:
Google System Storage (GSS)
Google Authentication (GA)
Google Sharing (GS)
Google Modify Content (GMC)
The GSS, GA, GS, and GMC components take advantage of the gdata-python library to access Google Docs service
The Google Documents List data API allows web applications to interact with Google Docs
The gdata-python library provides access to the Google Data APIs through classes and methods for constructing queries and using response data
GDIP uses methods provided by gdata-python library for uploading, downloading, deleting documents on Google servers, querying for a list of documents, and modifying document sharing permissions
Google API
Google System Storage
GSS saves the document types supported by the Google Docs service on the Google servers, while storing all the other files in the local filesystem
User can access their documents both from the Plone application and from their Google account
Access The Plone user can access his document Doc.odt from the Plone application and....
Access ...and from his Google account
GSS
GSS is an extension of File System Storage
The GoogleSystemStorage class of googlesystemstorage changes set and get methods from the FileSystemStorage class of FSS
Set method
The set method saves the document files in the local filesystem
If the file type corresponds to one of those supported by Google Docs set uploads the file on Google servers and removes the local copy of the file from the filesyste m
Get method
The get method takes care of returning the requested documents to Plone users
get checks whether the file is stored on Google servers instead of the local filesystem, and in this case downloads the file from Google Docs
Google Authentication
GA takes care of the user authentication upon Google Docs service, so that the Plone application can access the documents stored on Google servers
GA completes the authentication procedure for Web applications provided by Google Docs
The procedure allows Web applications to authenticate users through their Google accounts
Authentication Procedure The Plone user is redirected to a Google page that invites him to insert his credentials Once he logs in with his Google account, the user is asked to authorize the Plone application to access his documents
Authentication token
If the user grants access, he is pointed again to the Plone application
The URL of the last redirection embeds an authentication token which allows the Plone application to access the user's documents on Google servers for the following requests
Authentication Procedure
The attribute google_token
GA initiates the authentication procedure immediately after the user has logged into the Plone application
The procedure will be executed just once. When the Plone application obtains the authentication token, it will store it as an attribute, go ogle_token , in the user profile
Google Sharing
GS manages document sharing attributes and their synchronization from the Plone application to Google Docs service
For each document a role change performed in the Plone application corresponds to an equivalent role change on the Google Docs service
For example, if a Plone user assigns another user the Editor role on one of his documents, the other user will be able to read and modify that document through his Google account
Role change The Plone user assigns the Editor role on the Doc.odt document to user Mario Rossi...
Role change ...Mario Rossi will then be able to read and modify that document through his Google account
Beware
GS doesn't manage permissions but roles!
Possible problem for documents with changing state
Support for document workflow still to be implemented
GS doesn't manage changes on the Gdocs side.
Google Modify Content
GMC allows Plone users to edit their documents directly from the Google Docs application, discovering the specific URL of the Google Docs document function and embedding that page in the current window of the Plone application
GMC extends the Plone content Edit function by adding the GoogleModify operation. GMC embeds the Google Docs application inside the GoogleModify panel
GoogleModify panel
iframe A new view, called by GoogleModify, discovers the specific URL of the Google Docs document function and embeds that page in the current window of the Plone application exploiting the iframe mechanism. New view template:
Collaborative editing The user Federica can edit a shared document from the GoogleModify panel...
...thus collaborating with Mario Rossi who is working on the same document directly from the Google Docs application Collaborative editing
0 comments
Post a comment