public abstract class AbstractV60MigrationManager extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractV60MigrationManager.MigrationMessageHelpers
Smol class to rendere the old requirements into HTML, providing more info to the user
|
Modifier and Type | Field and Description |
---|---|
protected com.atlassian.activeobjects.external.ActiveObjects |
ao |
static String |
CACHE_FAILING |
static String |
CACHE_REMAINING |
static String |
CACHE_TOTAL |
private List<Class<? extends AOMigratedEntity>> |
entitiesToMigrate |
private static org.apache.log4j.Logger |
log |
private com.atlassian.cache.Cache<String,Long> |
statusCache |
Constructor and Description |
---|
AbstractV60MigrationManager(com.atlassian.activeobjects.external.ActiveObjects ao,
com.atlassian.cache.CacheManager cacheFactory,
List<Class<? extends AOMigratedEntity>> entitiesToMigrate) |
Modifier and Type | Method and Description |
---|---|
long |
getCountRecordsFailing()
Note that remaining + failing ≠ records to migrate, because we ignore "MIGRATIONIGNORED"
|
long |
getCountRecordsFailingCached() |
protected abstract AbstractV60MigrationManager.MigrationMessageHelpers |
getMigrationMessageHelpers()
Helper to be able to display nice html messages
|
List<Map<String,Object>> |
getRecordsFailing(int offset,
int limit) |
long |
getRecordsRemaining()
Return the remaining number of records to migrate
|
long |
getRecordsRemainingCached() |
long |
getRecordsToMigrate()
Return the total number of records (requirements + templates + baselines...) to migrate
|
long |
getRecordsToMigrateCached() |
protected abstract String |
getRecordTitle(AOMigratedEntity record) |
boolean |
isDone() |
abstract void |
nukeOldDatabase()
After a migration, entirely truncate / delete data of the old database
|
void |
resetCache() |
int |
setAllStatus(String action)
After a migration failed, this method either resets the status for ALL records, or dismisses
it so they are not displayed anymore.
|
String |
setMessageStatus(String entityClass,
Integer entityId,
String action)
After a migration failed, this method either resets the status for this record, or dismisses
it so it is not displayed anymore.
|
private String |
toDate(Date date) |
private static final org.apache.log4j.Logger log
public static final String CACHE_REMAINING
public static final String CACHE_TOTAL
public static final String CACHE_FAILING
protected final com.atlassian.activeobjects.external.ActiveObjects ao
private final List<Class<? extends AOMigratedEntity>> entitiesToMigrate
public AbstractV60MigrationManager(com.atlassian.activeobjects.external.ActiveObjects ao, com.atlassian.cache.CacheManager cacheFactory, List<Class<? extends AOMigratedEntity>> entitiesToMigrate)
public boolean isDone()
public void resetCache()
public long getRecordsRemainingCached()
public long getRecordsToMigrateCached()
public long getCountRecordsFailingCached()
public long getRecordsToMigrate()
public long getRecordsRemaining()
public long getCountRecordsFailing()
protected abstract String getRecordTitle(AOMigratedEntity record)
public String setMessageStatus(String entityClass, Integer entityId, String action)
public int setAllStatus(String action)
action
- RETRYALL, DISMISSALLpublic abstract void nukeOldDatabase()
protected abstract AbstractV60MigrationManager.MigrationMessageHelpers getMigrationMessageHelpers()
Copyright © 2022 Requirement Yogi. All rights reserved.