{
fullbackupType = log.getFullBackupType();
}
else
{
throw new BackupOperationException("Class \"" + log.getFullBackupType()
+ "\" is not support as full backup.");
}
}
catch (ClassNotFoundException e)
{
throw new BackupOperationException("Class \"" + log.getFullBackupType() + "\" is not found.", e);
}
// ws should not exists.
if (!workspaceAlreadyExist(reposytoryName, workspaceName))
{
for (int i = 0; i < list.size(); i++)
{
if (i == 0)
{
try
{
fullRestoreOverInitializer(list.get(i).getURL().getPath(), reposytoryName, workspaceEntry,
fullbackupType);
}
catch (FileNotFoundException e)
{
throw new BackupOperationException("Restore of full backup file error " + e, e);
}
catch (IOException e)
{
throw new BackupOperationException("Restore of full backup file I/O error " + e, e);
}
catch (ClassNotFoundException e)
{
throw new BackupOperationException("Restore of full backup class load error " + e, e);
}
repoService.getConfig().retain(); // save configuration to persistence (file or persister)
}
else
{
try
{
incrementalRestore(list.get(i).getURL().getPath(), reposytoryName, workspaceName);
}
catch (FileNotFoundException e)
{
throw new BackupOperationException("Restore of incremental backup file error " + e, e);
}
catch (IOException e)
{
throw new BackupOperationException("Restore of incremental backup file I/O error " + e, e);
}
catch (ClassNotFoundException e)
{
throw new BackupOperationException("Restore of incremental backup error " + e, e);
}
}
}
}
else