validateRepositoryName(repository);
//workspace name and repository name should equals original names from backup set.
if (!repository.equals(backupChainLog.getBackupConfig().getRepository()))
{
throw new WorkspaceRestoreException("Repository name\"" + repository
+ "\" should equals original repository name from backup set : \""
+ backupChainLog.getBackupConfig().getRepository() + "\".");
}
if (!workspace.equals(backupChainLog.getBackupConfig().getWorkspace()))
{
throw new WorkspaceRestoreException("Workspace name\"" + workspace
+ "\" should equals original workspace name from backup set : \""
+ backupChainLog.getBackupConfig().getWorkspace() + "\".");
}
if (removeExisting)
{
if (!isWorkspaceExist(repository, workspace))
{
throw new WorkspaceRestoreException("Workspace " + workspace + " is not exists!");
}
backupManager.restoreExistingWorkspace(backupId, true);
}
else