Author: areshetnyak
Date: 2010-06-02 02:53:05 -0400 (Wed, 02 Jun 2010)
New Revision: 2448
Modified:
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java
Log:
EXOJCR-762 : Add checking repository exists before start restore repository.
Modified:
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java
===================================================================
---
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java 2010-06-01
09:06:55 UTC (rev 2447)
+++
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java 2010-06-02
06:53:05 UTC (rev 2448)
@@ -1363,6 +1363,17 @@
Map<String, String> workspaceNamesCorrespondMap, boolean asynchronous) throws
BackupOperationException,
BackupConfigurationException, RepositoryException,
RepositoryConfigurationException
{
+ // Checking repository exists.
+ try
+ {
+ repoService.getRepository(repositoryEntry.getName());
+ throw new BackupConfigurationException("Repository \"" +
repositoryEntry.getName() + "\" is already exists.");
+ }
+ catch (RepositoryException e)
+ {
+ //OK. Repository with "repositoryEntry.getName" is not exists.
+ }
+
Map<String, BackupChainLog> workspacesMapping = new HashedMap();
Map<String, BackupChainLog> backups = new HashedMap();
Show replies by date