Package org.nuxeo.ecm.core.migrator
Class AbstractRepositoryMigrator
- java.lang.Object
-
- org.nuxeo.ecm.core.migrator.AbstractRepositoryMigrator
-
- All Implemented Interfaces:
MigrationService.Migrator
- Direct Known Subclasses:
CommentsMigrator
,TagsMigrator
,TrashedStateMigrator
public abstract class AbstractRepositoryMigrator extends Object implements MigrationService.Migrator
- Since:
- 10.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AbstractRepositoryMigrator.MigrationShutdownException
-
Field Summary
Fields Modifier and Type Field Description protected MigrationService.MigrationContext
migrationContext
Deprecated, for removal: This API element is subject to removal in a future version.since 11.1, please use parameters when using or implementing:migrateRepository(String, MigrationContext, String)
migrateSession(String, MigrationContext, CoreSession)
checkShutdownRequested(MigrationContext)
processBatched(MigrationContext, int, Collection, Consumer, String)
-
Constructor Summary
Constructors Constructor Description AbstractRepositoryMigrator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
checkShutdownRequested()
Deprecated, for removal: This API element is subject to removal in a future version.since 11.1.protected void
checkShutdownRequested(MigrationService.MigrationContext migrationContext)
protected void
migrateRepository(String repositoryName)
Deprecated, for removal: This API element is subject to removal in a future version.since 11.1.protected void
migrateRepository(String step, MigrationService.MigrationContext migrationContext, String repositoryName)
protected abstract void
migrateSession(String step, MigrationService.MigrationContext context, CoreSession session)
protected void
migrateSession(CoreSession session)
Deprecated, for removal: This API element is subject to removal in a future version.since 11.1 UsemigrateSession(String, MigrationContext, CoreSession)
insteadprotected String
probeRepository(String repositoryName)
protected abstract String
probeSession(CoreSession session)
protected <T> void
processBatched(int batchSize, Collection<T> collection, Consumer<T> consumer, String progressMessage)
Deprecated, for removal: This API element is subject to removal in a future version.since 11.1 UseprocessBatched(MigrationContext, int, Collection, Consumer, String)
insteadprotected <T> void
processBatched(MigrationService.MigrationContext migrationContext, int batchSize, Collection<T> collection, Consumer<T> consumer, String progressMessage)
Runs a consumer on the collection, committing every BATCH_SIZE elements, reporting progress and checking for shutdown request.protected void
reportProgress(String message, long num, long total)
protected void
reportProgress(String repositoryName, String message, long num, long total)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.runtime.migration.MigrationService.Migrator
notifyStatusChange, probeState, run
-
-
-
-
Field Detail
-
migrationContext
@Deprecated(since="11.1", forRemoval=true) protected MigrationService.MigrationContext migrationContext
Deprecated, for removal: This API element is subject to removal in a future version.since 11.1, please use parameters when using or implementing:
-
-
Method Detail
-
checkShutdownRequested
@Deprecated(since="11.1", forRemoval=true) protected void checkShutdownRequested()
Deprecated, for removal: This API element is subject to removal in a future version.since 11.1. UsecheckShutdownRequested(MigrationContext)
instead
-
checkShutdownRequested
protected void checkShutdownRequested(MigrationService.MigrationContext migrationContext)
-
reportProgress
protected void reportProgress(String message, long num, long total)
-
reportProgress
protected void reportProgress(String repositoryName, String message, long num, long total)
-
migrateRepository
@Deprecated(since="11.1", forRemoval=true) protected void migrateRepository(String repositoryName)
Deprecated, for removal: This API element is subject to removal in a future version.since 11.1. UsemigrateRepository(String, MigrationContext, String)
instead
-
migrateRepository
protected void migrateRepository(String step, MigrationService.MigrationContext migrationContext, String repositoryName)
- Since:
- 11.1
-
migrateSession
protected abstract void migrateSession(String step, MigrationService.MigrationContext context, CoreSession session)
- Since:
- 11.1
-
processBatched
@Deprecated(since="11.1", forRemoval=true) protected <T> void processBatched(int batchSize, Collection<T> collection, Consumer<T> consumer, String progressMessage)
Deprecated, for removal: This API element is subject to removal in a future version.since 11.1 UseprocessBatched(MigrationContext, int, Collection, Consumer, String)
instead
-
processBatched
protected <T> void processBatched(MigrationService.MigrationContext migrationContext, int batchSize, Collection<T> collection, Consumer<T> consumer, String progressMessage)
Runs a consumer on the collection, committing every BATCH_SIZE elements, reporting progress and checking for shutdown request.
-
probeSession
protected abstract String probeSession(CoreSession session)
-
migrateSession
@Deprecated(since="11.1", forRemoval=true) protected void migrateSession(CoreSession session)
Deprecated, for removal: This API element is subject to removal in a future version.since 11.1 UsemigrateSession(String, MigrationContext, CoreSession)
instead
-
-