Package org.nuxeo.ecm.core.trash
Class TrashedStateMigrator
- java.lang.Object
-
- org.nuxeo.ecm.core.migrator.AbstractRepositoryMigrator
-
- org.nuxeo.ecm.core.trash.TrashedStateMigrator
-
- All Implemented Interfaces:
MigrationService.Migrator
public class TrashedStateMigrator extends AbstractRepositoryMigrator
Migrator of trashed state.- Since:
- 10.2
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.nuxeo.ecm.core.migrator.AbstractRepositoryMigrator
AbstractRepositoryMigrator.MigrationShutdownException
-
-
Field Summary
Fields Modifier and Type Field Description protected static intBATCH_SIZEprotected static StringQUERY_DELETED-
Fields inherited from class org.nuxeo.ecm.core.migrator.AbstractRepositoryMigrator
migrationContext
-
-
Constructor Summary
Constructors Constructor Description TrashedStateMigrator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidmigrateSession(String step, MigrationService.MigrationContext migrationContext, CoreSession session)voidnotifyStatusChange()Allows notification of status change for a running step or new state.protected StringprobeSession(CoreSession session)StringprobeState()Probes the current state of a migration by analyzing persistent data.voidrun(String step, MigrationService.MigrationContext migrationContext)Runs a migration step.-
Methods inherited from class org.nuxeo.ecm.core.migrator.AbstractRepositoryMigrator
checkShutdownRequested, checkShutdownRequested, migrateRepository, migrateRepository, migrateSession, probeRepository, processBatched, processBatched, reportProgress, reportProgress
-
-
-
-
Field Detail
-
QUERY_DELETED
protected static final String QUERY_DELETED
- See Also:
- Constant Field Values
-
BATCH_SIZE
protected static final int BATCH_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
notifyStatusChange
public void notifyStatusChange()
Description copied from interface:MigrationService.MigratorAllows notification of status change for a running step or new state.
-
probeState
public String probeState()
Description copied from interface:MigrationService.MigratorProbes the current state of a migration by analyzing persistent data.Assumes no migration step is currently running.
THIS METHOD MAY TAKE A WHILE as it needs to get information from persistent storage.
- Returns:
- the probed state, or
nullif it cannot be determined
-
probeSession
protected String probeSession(CoreSession session)
- Specified by:
probeSessionin classAbstractRepositoryMigrator
-
run
public void run(String step, MigrationService.MigrationContext migrationContext)
Description copied from interface:MigrationService.MigratorRuns a migration step.This method should periodically check for
MigrationService.MigrationContext.isShutdownRequested()andThread.isInterrupted()and return iftrue.- Parameters:
step- the migration step to runmigrationContext- the migration context.
-
migrateSession
protected void migrateSession(String step, MigrationService.MigrationContext migrationContext, CoreSession session)
- Specified by:
migrateSessionin classAbstractRepositoryMigrator
-
-