Search in sources :

Example 11 with MigrationMetadata

use of org.codice.ddf.migration.MigrationMetadata in project ddf by codice.

the class ConfigurationMigrationManager method exportMigratable.

private Collection<MigrationWarning> exportMigratable(Migratable migratable, Path exportDirectory) throws IOException {
    Stopwatch stopwatch = null;
    if (LOGGER.isDebugEnabled()) {
        stopwatch = Stopwatch.createStarted();
    }
    MigrationMetadata migrationMetadata = migratable.export(exportDirectory);
    if (LOGGER.isDebugEnabled() && stopwatch != null) {
        LOGGER.debug("Export time: {}", stopwatch.stop().toString());
    }
    return migrationMetadata.getMigrationWarnings();
}
Also used : Stopwatch(com.google.common.base.Stopwatch) MigrationMetadata(org.codice.ddf.migration.MigrationMetadata)

Aggregations

MigrationMetadata (org.codice.ddf.migration.MigrationMetadata)11 Test (org.junit.Test)9 MigrationWarning (org.codice.ddf.migration.MigrationWarning)8 MigratableUtil (org.codice.ddf.migration.util.MigratableUtil)5 ArrayList (java.util.ArrayList)4 Path (java.nio.file.Path)3 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)3 MigrationException (org.codice.ddf.migration.MigrationException)2 Stopwatch (com.google.common.base.Stopwatch)1 Result (ddf.catalog.data.Result)1 FederationException (ddf.catalog.federation.FederationException)1 QueryRequest (ddf.catalog.operation.QueryRequest)1 QueryImpl (ddf.catalog.operation.impl.QueryImpl)1 QueryRequestImpl (ddf.catalog.operation.impl.QueryRequestImpl)1 SourceUnavailableException (ddf.catalog.source.SourceUnavailableException)1 UnsupportedQueryException (ddf.catalog.source.UnsupportedQueryException)1 Serializable (java.io.Serializable)1 NotNull (javax.validation.constraints.NotNull)1 ExportMigrationException (org.codice.ddf.migration.ExportMigrationException)1 Filter (org.opengis.filter.Filter)1