CHALLENGE DETAIL

Swap Google Doc Owners

OVERVIEW

CODE

One of the rules of nature is large organizations re-organize all of the time. It seems to even happen multiple times a year!  When this happens, ownerships of documents and folders change hands.  Fortunately in the cloud we no longer need to move large file cabinets, just a few permission bits.  Help us streamline switching documents.

REQUIREMENTS

- This application will be written in Java and deployed to Google Application
- This library will be accessed from a Java servlet and will work asynchronously utilizing Google Task Queues.
Provide one function
--- ChangePermissions(google docs URL, accountToChangeOwnerTo ) returns a list of files changed and unchanged.
--- This function will recursively change the owner for all files and folders recursively in the collection.
The most efficient way to accomplish this task is to use Task Queues.
A named queue will be created for Folders and for files.
The Folder queue logic will extract all files and add each file to the file queue.  If there is a sub folder, the logic will add the folder back to the folder queue.
The File queue will change the file owner to the new account
--- Additionally the existing owners will be removed.
Create a queue or data store to store errors
--- Provide retry logic
Return a list of all files changed and a list of all files unchanges to the calling logic.

SUBMISSION DETAILS


Upload all your source code as a zip and provide any documentation and/or instructions that are needed. Please be clear and concise with any setup instructions.

An SWF video of your application using Jing would also be helpful but not required.

Your submission will be judged by a panel of peers based upon this criteria. If you would like to request an extension, please read Can challenge deadlines be extended for more time? on our FAQ. We do not want to grant extensions unless there is a valid reason.

ADDITIONAL INFO

If code from this previous challenge helps, please let us know and we can share it.

PARTICIPATION


DISCUSSION

username5
1. Develop a GAE-Java app with single servlet. 2. Invoking the servlet reads inputs (doc url, fromOwner, toOwner) and schedules asyn tasks in GAE 3. Task queue should read sub folders 4. GAE - data stroe should maintain list of errors and probably a servlet to report list of errors 5. Retry logic incase of failures. Please reply whether my understanding is correct or not. Also could you please share the previous challenge code ?
username5, Apr 04, 2012 at 10:44 AM reply
mess
1) yes I'll will post again when I can post the other code
mess (admin), Apr 04, 2012 at 12:18 PM
romanosp
The code from the previous challenge seems useful. Can you post it? I understand we are trying to achieve the same but using Goggle Tasks Queue
romanosp, Apr 04, 2012 at 18:24 PM reply
mess
https://github.com/cloudspokes/google-doc-reassign/
mess (admin), Apr 05, 2012 at 07:07 AM
soe
can be written in Python?
soe, Apr 05, 2012 at 01:37 AM reply
mess
It has to be in Java
mess (admin), Apr 05, 2012 at 18:02 PM
mess
Here is some code that might be able to help you. http://cs-public.s3.amazonaws.com/challenges/1439/findFolderDescendants.java To sum it up, the function will be called with a folder id and new owner. The task queue processes wiil run as an admin account and will take control of the folder using impersonation by adding &xoauth_requestor_id=owner_email.domain.com to the URL.
mess (admin), Apr 05, 2012 at 18:08 PM
antenna
As Google Task Queues run in Async how come we return a "list of files changed and unchanged" ?
antenna, Apr 07, 2012 at 03:34 AM reply
mess
You can use bigtable to store the results
mess (admin), Apr 07, 2012 at 11:28 AM
antenna
This service is desired as a standalone servlet, so how will authentication work ? Will the client pass un/pass in inbound request headers ?
antenna, Apr 07, 2012 at 03:36 AM reply
mess
Yes
mess (admin), Apr 07, 2012 at 11:33 AM
antenna
Thanks Mess, this is going to be exciting this time, I see Romin registered for the challenge too :)
antenna, Apr 07, 2012 at 18:50 PM reply

The discussion board is closed for this challenge.



PARTICIPATION

14 members participating with 13 registered

TECHNOLOGIES

Google | Java

WINNER SELECTED

Ended Apr 09, 2012 at 8:11 AM
Winner Announced on April 11, 2012
View the challenge results
Give us your feedback about this challenge.

PRIZES

Total: $2,750
1st $2,000
2nd $750

SHARE

Chrome Extension

Install the CloudSpokes Chrome Extension for quick and easy access to the latest CloudSpokes challenges, your payments, leaderboards and more!