tuub / kitodo-mediaserver

Kitodo Mediaserver
GNU General Public License v3.0
7 stars 6 forks source link

Importer: create list of works to import #46

Closed pbroman closed 6 years ago

pbroman commented 6 years ago

The importer checks for works to import in a configuered hotfolder. Since Kitodo.Production can be configuered either to export works in a separate process folder or directly in the hotfolder (and this can be differently configuerd for each project), the importer has to be able to cope with both these alternatives. I.e. the importer should create a list of works in the hotfolder considering both possibel patterns.

pbroman commented 6 years ago

On second thoughts, it is not necessary to create a list of works, it is sufficient with a method just getting one work out of the hotfolder and copying it to an import-in-progress folder. If there is no work found, the method should return null.

pbroman commented 6 years ago

Implemented as a method getWorkPackage() in an ImporterUtils class. Functionality for moving files and directories in separate public methods, since they probably could be of use under other circumstances as well.