Package org.exoplatform.services.jcr.impl.backup

Examples of org.exoplatform.services.jcr.impl.backup.JCRRestore$RestoreChangesLog


            FileCleanerHolder cleanerHolder =
               (FileCleanerHolder)repositoryService.getRepository(this.repositoryEntry.getName())
                  .getWorkspaceContainer(wEntry.getName()).getComponent(FileCleanerHolder.class);

            JCRRestore restorer = new JCRRestore(dataManager, cleanerHolder.getFileCleaner());
            for (File incrBackupFile : JCRRestore.getIncrementalFiles(storageDir))
            {
               restorer.incrementalRestore(incrBackupFile);
            }
         }
      }
      catch (Throwable t) //NOSONAR
      {
         LOG.info("Trying to roll back the changes");
         for (DataRestore restorer : dataRestorer)
         {
            try
            {
               restorer.rollback();
            }
            catch (BackupException e)
            {
               LOG.error("Can't rollback changes", e);
            }
         }

         throw new RepositoryRestoreExeption("Repository " + repositoryEntry.getName() + " was not restored", t);
      }
      finally
      {
         // close
         for (DataRestore restorer : dataRestorer)
         {
            try
            {
               restorer.close();
            }
            catch (BackupException e)
            {
               LOG.error("Can't close restorer", e);
            }
View Full Code Here


                           WorkspacePersistentDataManager.class);

         FileCleanerHolder cleanerHolder =
            (FileCleanerHolder)repository.getWorkspaceContainer(wEntry.getName()).getComponent(FileCleanerHolder.class);

         JCRRestore restorer = new JCRRestore(dataManager, cleanerHolder.getFileCleaner());
         for (File incrBackupFile : JCRRestore.getIncrementalFiles(storageDir))
         {
            restorer.incrementalRestore(incrBackupFile);
         }
      }
      catch (Throwable t) //NOSONAR
      {
         // rollback
         for (DataRestore restorer : dataRestorer)
         {
            try
            {
               restorer.rollback();
            }
            catch (BackupException e)
            {
               LOG.error("Can't rollback changes", e);
            }
         }

         throw new WorkspaceRestoreException("Workspace " + wEntry.getName() + " was not restored", t);
      }
      finally
      {
         // close
         for (DataRestore restorer : dataRestorer)
         {
            try
            {
               restorer.close();
            }
            catch (BackupException e)
            {
               LOG.error("Can't close restorer", e);
            }
View Full Code Here

         repoService.getRepository(repositoryName).getWorkspaceContainer(workspaceName);
      WorkspacePersistentDataManager dataManager =
         (WorkspacePersistentDataManager)workspaceContainer.getComponent(WorkspacePersistentDataManager.class);
      FileCleanerHolder cleanerHolder = (FileCleanerHolder)workspaceContainer.getComponent(FileCleanerHolder.class);

      JCRRestore restorer = new JCRRestore(dataManager, cleanerHolder.getFileCleaner());
      restorer.incrementalRestore(new File(pathBackupFile));
   }
View Full Code Here

         repoService.getRepository(repositoryName).getWorkspaceContainer(workspaceName);
      WorkspacePersistentDataManager dataManager =
         (WorkspacePersistentDataManager)workspaceContainer.getComponent(WorkspacePersistentDataManager.class);
      FileCleanerHolder cleanerHolder = (FileCleanerHolder)workspaceContainer.getComponent(FileCleanerHolder.class);

      JCRRestore restorer = new JCRRestore(dataManager, cleanerHolder.getFileCleaner());
      restorer.incrementalRestore(new File(pathBackupFile));
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.impl.backup.JCRRestore$RestoreChangesLog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.