sakaiproject/nakamura — pull request #624 by zathomas (2012-03-01 06:09:26+00:00)
Title: KERN-2605 server-side doc migrator

This is the result of my experiment to use JavaScript I got from Nico to transform Sakai docs on the fly in the backend using Rhino.

The implementation plugs into `GetContentPoolServlet` with a pair of simple interfaces, so the implementation can be changed later if we need to.

Note that the component which implements this, `DocMigrator` is disabled by default, in order not to disrupt any servers still running with the older uxloader bundle.

There are modifications to all three files bundles (`api` `impl` and `filesmigrator`) so make sure you have deployed all three into nakamura before trying to test it.

There are two main ways to test this:

1. Create some old (OAE 1.1) content, enable `DocMigrator`, and then access the sakai doc with a curl like

`curl -u zach:zach http://localhost:8080/p/kvAVsg41aa.infinity.json`

1. Enable `DocMigrator` and ensure that it does _not_ try to migrate anything that has been created fresh with the content authoring features.