Class CommentsMigrator
java.lang.Object
org.nuxeo.ecm.core.migrator.AbstractRepositoryMigrator
org.nuxeo.ecm.platform.comment.impl.CommentsMigrator
- All Implemented Interfaces:
MigrationService.Migrator
Migrator of comments.
- Since:
- 10.3
-
Nested Class Summary
Nested classes/interfaces inherited from class org.nuxeo.ecm.core.migrator.AbstractRepositoryMigrator
AbstractRepositoryMigrator.MigrationShutdownException -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intstatic final Stringstatic final StringFields inherited from class org.nuxeo.ecm.core.migrator.AbstractRepositoryMigrator
migrationContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildInClause(List<String> parentIds) getCommentFolders(CoreSession session) getUnsecuredCommentIds(CoreSession session) protected booleanhasUnsecuredComments(CoreSession session) protected voidmigrateCommentsFromPropertyToSecured(CoreSession session, TreeCommentManager treeCommentManager, IdRef commentIdRef) protected voidmigrateSession(String step, MigrationService.MigrationContext migrationContext, CoreSession session) protected voidmigrateSessionPropertyToSecured(CoreSession session, MigrationService.MigrationContext migrationContext) voidAllows notification of status change for a running step or new state.protected StringprobeSession(CoreSession session) 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 Details
-
BATCH_SIZE
protected static final int BATCH_SIZE- See Also:
-
UNMIGRATED_COMMENTS_FOLDER_NAME
- See Also:
-
GET_COMMENTS_FOLDERS_QUERY
- Since:
- 11.1.
-
-
Constructor Details
-
CommentsMigrator
public CommentsMigrator()
-
-
Method Details
-
probeSession
- Specified by:
probeSessionin classAbstractRepositoryMigrator
-
run
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
-
migrateSessionPropertyToSecured
protected void migrateSessionPropertyToSecured(CoreSession session, MigrationService.MigrationContext migrationContext) - Since:
- 11.1
-
migrateCommentsFromPropertyToSecured
protected void migrateCommentsFromPropertyToSecured(CoreSession session, TreeCommentManager treeCommentManager, IdRef commentIdRef) - Since:
- 11.1
-
hasUnsecuredComments
- Since:
- 11.1
-
getUnsecuredCommentIds
- Since:
- 11.1
-
getCommentFolders
- Since:
- 11.1
-
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
-
notifyStatusChange
public void notifyStatusChange()Description copied from interface:MigrationService.MigratorAllows notification of status change for a running step or new state. -
buildInClause
- Since:
- 11.1
-