* {@inheritDoc}
*/
public void restoreWorkspace(String workspaceBackupIdentifier, boolean asynchronous)
throws BackupOperationException, BackupConfigurationException
{
BackupChainLog backupChainLog = null;
for (BackupChainLog chainLog : getBackupsLogs())
{
if (chainLog.getBackupId().equals(workspaceBackupIdentifier))
{
backupChainLog = chainLog;
break;
}
}
if (backupChainLog == null)
{
throw new BackupConfigurationException("Can not found backup of workspace with id \""
+ workspaceBackupIdentifier + "\"");
}
try
{
this.restore(backupChainLog, backupChainLog.getBackupConfig().getRepository(), backupChainLog
.getOriginalWorkspaceEntry(), asynchronous);
}
catch (RepositoryException e)
{
throw new WorkspaceRestoreException("Workapce \"" + backupChainLog.getOriginalWorkspaceEntry().getName()
+ "\" was not restored in repository \"" + backupChainLog.getBackupConfig().getRepository() + "\"", e);
}
catch (RepositoryConfigurationException e)
{
throw new WorkspaceRestoreException("Workapce \"" + backupChainLog.getOriginalWorkspaceEntry().getName()
+ "\" was not restored in repository \"" + backupChainLog.getBackupConfig().getRepository() + "\"", e);
}
}