.getComponentInstancesOfType(Backupable.class);
File fullBackupDir =
JCRRestore.getFullBackupFile(workspacesMapping.get(wEntry.getName()).getBackupConfig().getBackupDir());
DataRestoreContext context;
if (jdbcConn != null)
{
if (dbCleaner != null)
{
if (isSharedDbCleaner)
{
context = new DataRestoreContext(
new String[]{
DataRestoreContext.STORAGE_DIR,
DataRestoreContext.DB_CONNECTION,
DataRestoreContext.DB_CLEANER},
new Object[]{
fullBackupDir,
jdbcConn,
new DummyDBCleaner()});
}
else
{
context = new DataRestoreContext(
new String[]{
DataRestoreContext.STORAGE_DIR,
DataRestoreContext.DB_CONNECTION,
DataRestoreContext.DB_CLEANER},
new Object[]{
fullBackupDir,
jdbcConn,
dbCleaner});
isSharedDbCleaner = true;
}
}
else
{
context = new DataRestoreContext(
new String[]{
DataRestoreContext.STORAGE_DIR,
DataRestoreContext.DB_CONNECTION},
new Object[]{
fullBackupDir,
jdbcConn});
}
}
else
{
context = new DataRestoreContext(
new String[] {DataRestoreContext.STORAGE_DIR},
new Object[] {fullBackupDir});
}
for (Backupable component : backupable)