ayende/ravendb — pull request #106 by seankearon (2012-05-18 05:39:59+00:00)
Title: Implemented non-HTTP based import/export

### Implemented non-HTTP export/import capability. ###

* Functionality of existing `SmugglerApi` refactored into abstract base `SmugglerApiBase` implementing `ISmugglerApi`.

* New `Raven.Database.Smuggler.DataDumper` descending from `SmugglerApiBase` to handle non-HTTP data import/export.

* Moved types from `Raven.Smuggler` to `Raven.Abstractions.Smuggler` to avoiding conflicts from `Raven.Server` which is referencing both `Raven.Smuggler` and `Raven.Database`. The following types are aftected:

`ISmugglerApi`
`SmugglerAction`
`SmugglerOptions`
`ItemType`
`TrivialJsonToJsonJsonConverter`

### Remaining questions: ###

The export of attachments in the HTTP and non-HTTP cases is handled entirely in the implementations. `SmugglerApi` uses ETags and two HTTP calls to retrieve attachments whereas `DocumentDatabase` uses an integer count and the `AttachmentInformation` structure for this.

I am not clear enough with the differences to attempt a refactor to gain greater consistency in `SmugglerApiBase.ExportAttachments` implementations - or even whether that would be worth doing!