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
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 inherited from class org.nuxeo.ecm.core.migrator.AbstractRepositoryMigrator
migrationContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
migrateSession
(String step, MigrationService.MigrationContext migrationContext, CoreSession session) void
Allows notification of status change for a running step or new state.protected String
probeSession
(CoreSession session) 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 Details
-
QUERY_DELETED
- See Also:
-
BATCH_SIZE
protected static final int BATCH_SIZE- See Also:
-
-
Constructor Details
-
TrashedStateMigrator
public TrashedStateMigrator()
-
-
Method Details
-
notifyStatusChange
public void notifyStatusChange()Description copied from interface:MigrationService.Migrator
Allows notification of status change for a running step or new state. -
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
- Specified by:
probeSession
in classAbstractRepositoryMigrator
-
run
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
-