openmicroscopy/openmicroscopy — pull request #2020 by joshmoore (2014-01-24 07:20:50+00:00)
Title: Inplace Import via SymlinkFileTransfer (See #11573) (rebased onto develop)

This is the same as gh-1989 but rebased onto develop.

----

https://trac.openmicroscopy.org.uk/ome/ticket/11573

This PR implements the same logic as the `InPlaceImporter.py` script from gh-1929 but in Java. The only thing that is currently not possible is the remote invocation that a script provides. But considering there are security issues when using the script, this is the safer intermediate solution.

**To test:**
As with gh-1929, the goal is that it's possible to import all files that were previously importable, but the files of the fileset under `/OMERO/ManagedRepository` should be symlinks not the original files. You will need to shell into the machine running OMERO, and import via the CLI:
```
bin/omero login
bin/omero import --transfer=ln TESTFILEHERE
bin/omero import --transfer=ln_s TESTFILEHERE
bin/omero import --transfer=ln_rm TESTFILEHERE # Be careful with this!
```
The key lines to look for in the output:
```
2014-01-16 16:27:54,836 0 [ main] INFO ome.formats.importer.ImportConfig - OMERO Version: 5.0.0-rc1-DEV-ice35
...
## V The following
2014-01-16 16:27:58,414 3578 [ main] INFO s.importer.transfers.SymlinkFileTransfer - Transferring /opt/ome3/dist/a.fake...
...
2014-01-16 16:28:00,267 5431 [l.Client-0] INFO ormats.importer.cli.LoggingImportMonitor - IMPORT_DONE

```

**To do:**
* [x] Fill out all Javadoc comments before code review.
* [x] Rebase onto latest `dev_5_0` once gh-1987 is merged. (No commit comments until then, please)

Once this is merged, the GUI importer can be updated to also symlink. /cc @jburel