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 int
BATCH_SIZE
protected static String
QUERY_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 void
migrateSession(String step, MigrationService.MigrationContext migrationContext, CoreSession session)
void
notifyStatusChange()
Allows notification of status change for a running step or new state.protected String
probeSession(CoreSession session)
String
probeState()
Probes the current state of a migration by analyzing persistent data.void
run(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.Migrator
Allows notification of status change for a running step or new state.
-
probeState
public String probeState()
Description copied from interface:MigrationService.Migrator
Probes 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
null
if it cannot be determined
-
probeSession
protected String probeSession(CoreSession session)
- Specified by:
probeSession
in classAbstractRepositoryMigrator
-
run
public void run(String step, MigrationService.MigrationContext migrationContext)
Description copied from interface:MigrationService.Migrator
Runs 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:
migrateSession
in classAbstractRepositoryMigrator
-
-