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
Modifier and TypeFieldDescriptionprotected static final int
static final String
static final String
Fields inherited from class org.nuxeo.ecm.core.migrator.AbstractRepositoryMigrator
migrationContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
buildInClause
(List<String> parentIds) getCommentFolders
(CoreSession session) getUnsecuredCommentIds
(CoreSession session) protected boolean
hasUnsecuredComments
(CoreSession session) protected void
migrateCommentsFromPropertyToSecured
(CoreSession session, TreeCommentManager treeCommentManager, IdRef commentIdRef) protected void
migrateCommentsFromRelationToProperty
(CoreSession session, RelationManager relationManager, CommentServiceConfig config, Statement statement) protected void
migrateSession
(String step, MigrationService.MigrationContext migrationContext, CoreSession session) protected void
migrateSessionPropertyToSecured
(CoreSession session, MigrationService.MigrationContext migrationContext) protected void
migrateSessionRelationToProperty
(CoreSession session, MigrationService.MigrationContext migrationContext) 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
-
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:
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
-
migrateSessionRelationToProperty
protected void migrateSessionRelationToProperty(CoreSession session, MigrationService.MigrationContext migrationContext) - Since:
- 11.1
-
migrateCommentsFromRelationToProperty
protected void migrateCommentsFromRelationToProperty(CoreSession session, RelationManager relationManager, CommentServiceConfig config, Statement statement) - Since:
- 11.1
-
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.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
-
notifyStatusChange
public void notifyStatusChange()Description copied from interface:MigrationService.Migrator
Allows notification of status change for a running step or new state. -
buildInClause
- Since:
- 11.1
-