sakaiproject/nakamura — pull request #748 by mrvisser (2012-04-17 22:31:36+00:00)
Title: KERN-2727 Implement CopyOperation to support drafting content for editin...

...g

Behind some of the refactoring in this check-in, the functionality being introduced is the CopyOperation, which is meant to be a server-side copy of a content tree from one location to another.

To use the operation, you must POST a request to a piece of sparse content (the SOURCE of the copy operation), providing the following parameters:

":operation": "copy"
":dest": "path/to/destination"

There is currently no support for a ":replace" feature. If replace is needed, then I would prefer devs use a batch request that performs a "delete" and then a "copy". The reason being is that it then poses no ambiguity over matters such as versioning, or how content is "merged", and other such complications that are not foreseen in the copy operation at this time.

* Implemented CopyOperation to recursively copy content from one location to another
* Implemented BasicLTI and SakaiMessage cleaners to amend data the same way it's done in MoveOperation
* Splitting SakaiDocPageMoveCleaner into separate Message and BasicLTI cleaners
* Implementing (inheriting) unit tests for the move cleaners, based on the copy cleaners
* Refactoring logic into SparsePostOperationService so it may be called without an HTTP request