Interface EntityDocumentZipImporter
- All Known Implementing Classes:
EntityDocumentZipImporterImpl
public interface EntityDocumentZipImporter
Imports a zip archive whose folder structure maps to existing entities via a reference field and
attaches the contained files as entity docDisabledLegacyActionuments (DMS folders/resources) or directly to binary
fields of the referenced entity.
The expected archive structure is <baseFolder>/<referenceValue>/...: the first folder
level is ignored, the second level is the reference value used to look up the entity and the
remaining path either targets a binary field (when written as [fieldName]) or is recreated
as a DMS folder/resource hierarchy below the entity's documents folder.
The import itself is performed asynchronously by the ZipFileImportJob; this service only
schedules it. It is distinct from ZipImporter, which imports an archive into a DMS
Folder/Domain tree.
-
Method Summary
Modifier and TypeMethodDescriptionvoidimportArchive(InputStream zipStream, String entityName, @Nullable String referenceField, boolean replaceExisting) Schedules the asynchronous import of the given zip archive.
-
Method Details
-
importArchive
void importArchive(InputStream zipStream, String entityName, @Nullable String referenceField, boolean replaceExisting) throws IOException Schedules the asynchronous import of the given zip archive.- Parameters:
zipStream- the zip archive contententityName- the entity model the reference values in the archive point toreferenceField- the field used to look up entities by the reference value in the archive; ifnullor empty the entity's counter field is usedreplaceExisting- whether existing documents should be overwritten- Throws:
IOException
-