public class ImportMigrationManagerImpl extends Object implements Closeable
Constructor and Description |
---|
ImportMigrationManagerImpl(MigrationReport report,
MigrationZipFile zip,
Stream<? extends Migratable> migratables)
Creates a new migration manager for an import operation.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
doImport(String currentProductBranding,
String currentProductVersion)
Proceed with the import migration operation.
|
Path |
getExportFile() |
MigrationReport |
getReport() |
public ImportMigrationManagerImpl(MigrationReport report, MigrationZipFile zip, Stream<? extends Migratable> migratables)
report
- the migration report where warnings and errors can be recordedzip
- the exported zip filemigratables
- a stream of all migratables in the systemMigrationException
- if a failure occurs while processing the zip file (the error will
not be recorded with the report)IllegalArgumentException
- if report
is null
or if it is not
for an import migration operation or if zip
or migratables
is
null
public void doImport(String currentProductBranding, String currentProductVersion)
currentProductBranding
- the current product branding to compare againstcurrentProductVersion
- the current product version to compare againstIllegalArgumentException
- if currentProductBranding
or
currentProductVersion
is null
MigrationException
- if the versions don't match or if a failure occurred that required
interrupting the operation right awaypublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public MigrationReport getReport()
public Path getExportFile()
This work is licensed under a Creative Commons Attribution 4.0 International License.