Class MoccaCalendarMigrationScriptService
java.lang.Object
org.xwiki.contrib.moccacalendar.migrations.MoccaCalendarMigrationScriptService
- All Implemented Interfaces:
org.xwiki.script.service.ScriptService
@Named("moccacalendarmigration")
@Singleton
@Component
public class MoccaCalendarMigrationScriptService
extends Object
implements org.xwiki.script.service.ScriptService
Script service to check for successful migration and add helpers in case something went wrong.
- Since:
- 2.7
- Version:
- $Id: $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcount the number of unmigrated events from the recurrent event feature.migrateEventsForRecurrenty(int offset, int limit) Migrate some events, as limited by the parameters.
-
Constructor Details
-
MoccaCalendarMigrationScriptService
public MoccaCalendarMigrationScriptService()
-
-
Method Details
-
countUnmigratedEventsForRecurrency
public long countUnmigratedEventsForRecurrency()count the number of unmigrated events from the recurrent event feature.- Returns:
- the number of event pages that have not been migrated.
-
migrateEventsForRecurrenty
Migrate some events, as limited by the parameters.- Parameters:
offset- where to begin to migratelimit- the maximal number of events to migrate at once- Returns:
- a map with two keys: "migrationCount" contains the number of (possibly) migrated events and "errorMessage" contains the message if an error happened
-