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.ScriptServiceScript service to check for successful migration and add helpers in case something went wrong.- Since:
- 2.7
- Version:
- $Id: $
-
-
Constructor Summary
Constructors Constructor Description MoccaCalendarMigrationScriptService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcountUnmigratedEventsForRecurrency()count the number of unmigrated events from the recurrent event feature.Map<String,Object>migrateEventsForRecurrenty(int offset, int limit)Migrate some events, as limited by the parameters.
-
-
-
Method Detail
-
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
public Map<String,Object> migrateEventsForRecurrenty(int offset, int limit)
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
-
-