| 1 | = Cross-connection APIs = |
| 2 | |
| 3 | == The problem == |
| 4 | |
| 5 | Maestro currently connects to one repository at a time during any one session. There is a whole class of scenarios (such as repository migration) that are currently not possible because of this limitation. |
| 6 | |
| 7 | == The solution == |
| 8 | |
| 9 | Introduce a whole set of APIs that operate on more than one IServerConnection instance. |
| 10 | |
| 11 | An example of such an API |
| 12 | |
| 13 | {{{ |
| 14 | |
| 15 | public class CopyResources |
| 16 | { |
| 17 | public IServerConnection SourceConnection { get; } |
| 18 | public IServerConnection TargetConnection { get; } |
| 19 | |
| 20 | public List<string> SourceResourceIds { get; } |
| 21 | |
| 22 | public bool CopyResourceContentOnly { get; set; } |
| 23 | public bool OverwriteExistingResources { get; set; } |
| 24 | |
| 25 | public void Execute(MigrateResourcesCallback callback); |
| 26 | } |
| 27 | |
| 28 | }}} |
| 29 | |
| 30 | Because these APIs work against the IServerConnection interface, you are free to use whatever underlying implementation. |
| 31 | |
| 32 | Once support is available at the API level, we can then introduce this functionality into the Maestro user interface proper. |