Package org.exoplatform.services.jcr.ext.backup

Examples of org.exoplatform.services.jcr.ext.backup.RestoreConfigurationException


         File backupSetDir = (new File(backupSetPath));

         if (!backupSetDir.exists())
         {
            throw new RestoreConfigurationException("Backup set directory is not exists :" + backupSetPath);
         }

         if (!backupSetDir.isDirectory())
         {
            throw new RestoreConfigurationException("Backup set directory is not directory :" + backupSetPath);
         }

         File[] cfs = PrivilegedFileHelper.listFiles(backupSetDir, new BackupLogsFilter());

         if (cfs.length == 0)
         {
            throw new RestoreConfigurationException("Can not found workspace backup log in directory : "
                     + backupSetPath);
         }

         if (cfs.length > 1)
         {
            throw new RestoreConfigurationException(
                     "Backup set directory should contains only one workspace backup log : " + backupSetPath);
         }

         validateRepositoryName(repository);
View Full Code Here


      try
      {
         if (!backupSetDir.exists())
         {
            throw new RestoreConfigurationException("Backup set directory is not exists :" + backupSetPath);
         }

         if (!backupSetDir.isDirectory())
         {
            throw new RestoreConfigurationException("Backup set directory is not directory :" + backupSetPath);
         }

         File[] cfsw = PrivilegedFileHelper.listFiles(backupSetDir, new BackupLogsFilter());
         File[] cfsr = PrivilegedFileHelper.listFiles(backupSetDir, new RepositoryBackupLogsFilter());

         if (cfsw.length == 0 && cfsr.length == 0)
         {
            throw new RestoreConfigurationException("Can not found backup log in directory : " + backupSetPath);
         }
         else if ((cfsw.length == 1 && cfsr.length == 1) || (cfsw.length > 1) || (cfsr.length > 1))
         {
            throw new RestoreConfigurationException("Backup set directory should contains only one backup log : "
                     + backupSetPath);
         }
         else if (cfsw.length != 0 && cfsr.length == 0)
         {
            restoreWorkspace = true;
View Full Code Here

         File backupSetDir = (new File(backupSetPath));

         if (!backupSetDir.exists())
         {
            throw new RestoreConfigurationException("Backup set directory is not exists :" + backupSetPath);
         }

         if (!backupSetDir.isDirectory())
         {
            throw new RestoreConfigurationException("Backup set directory is not directory :" + backupSetPath);
         }

         File[] cfs = PrivilegedFileHelper.listFiles(backupSetDir, new RepositoryBackupLogsFilter());

         if (cfs.length == 0)
         {
            throw new RestoreConfigurationException("Can not found repository backup log in directory : "
                     + backupSetPath);
         }

         if (cfs.length > 1)
         {
            throw new RestoreConfigurationException(
                     "Backup set directory should contains only one repository backup log : " + backupSetPath);
         }

         RepositoryBackupChainLog backupChainLog = new RepositoryBackupChainLog(cfs[0]);
View Full Code Here

         File backupSetDir = (new File(backupSetPath));

         if (!backupSetDir.exists())
         {
            throw new RestoreConfigurationException("Backup set directory is not exists :" + backupSetPath);
         }

         if (!backupSetDir.isDirectory())
         {
            throw new RestoreConfigurationException("Backup set directory is not directory :" + backupSetPath);
         }

         File[] cfs = backupSetDir.listFiles(new BackupLogsFilter());

         if (cfs.length == 0)
         {
            throw new RestoreConfigurationException("Can not found workspace backup log in directory : "
                     + backupSetPath);
         }

         if (cfs.length > 1)
         {
            throw new RestoreConfigurationException(
                     "Backup set directory should contains only one workspace backup log : " + backupSetPath);
         }

         validateRepositoryName(repository);
View Full Code Here

      try
      {
         if (!backupSetDir.exists())
         {
            throw new RestoreConfigurationException("Backup set directory is not exists :" + backupSetPath);
         }

         if (!backupSetDir.isDirectory())
         {
            throw new RestoreConfigurationException("Backup set directory is not directory :" + backupSetPath);
         }

         File[] cfsw = backupSetDir.listFiles(new BackupLogsFilter());
         File[] cfsr = backupSetDir.listFiles(new RepositoryBackupLogsFilter());

         if (cfsw.length == 0 && cfsr.length == 0)
         {
            throw new RestoreConfigurationException("Can not found backup log in directory : " + backupSetPath);
         }
         else if ((cfsw.length == 1 && cfsr.length == 1) || (cfsw.length > 1) || (cfsr.length > 1))
         {
            throw new RestoreConfigurationException("Backup set directory should contains only one backup log : "
                     + backupSetPath);
         }
         else if (cfsw.length != 0 && cfsr.length == 0)
         {
            restoreWorkspace = true;
View Full Code Here

         File backupSetDir = (new File(backupSetPath));

         if (!backupSetDir.exists())
         {
            throw new RestoreConfigurationException("Backup set directory is not exists :" + backupSetPath);
         }

         if (!backupSetDir.isDirectory())
         {
            throw new RestoreConfigurationException("Backup set directory is not directory :" + backupSetPath);
         }

         File[] cfs = backupSetDir.listFiles(new RepositoryBackupLogsFilter());

         if (cfs.length == 0)
         {
            throw new RestoreConfigurationException("Can not found repository backup log in directory : "
                     + backupSetPath);
         }

         if (cfs.length > 1)
         {
            throw new RestoreConfigurationException(
                     "Backup set directory should contains only one repository backup log : " + backupSetPath);
         }

         RepositoryBackupChainLog backupChainLog = new RepositoryBackupChainLog(cfs[0]);
View Full Code Here

         File backupSetDir = (new File(backupSetPath));

         if (!backupSetDir.exists())
         {
            throw new RestoreConfigurationException("Backup set directory is not exists :" + backupSetPath);
         }

         if (!backupSetDir.isDirectory())
         {
            throw new RestoreConfigurationException("Backup set directory is not directory :" + backupSetPath);
         }

         File[] cfs = PrivilegedFileHelper.listFiles(backupSetDir, new BackupLogsFilter());

         if (cfs.length == 0)
         {
            throw new RestoreConfigurationException("Can not found workspace backup log in directory : "
                     + backupSetPath);
         }

         if (cfs.length > 1)
         {
            throw new RestoreConfigurationException(
                     "Backup set directory should contains only one workspace backup log : " + backupSetPath);
         }

         validateRepositoryName(repository);
View Full Code Here

      try
      {
         if (!backupSetDir.exists())
         {
            throw new RestoreConfigurationException("Backup set directory is not exists :" + backupSetPath);
         }

         if (!backupSetDir.isDirectory())
         {
            throw new RestoreConfigurationException("Backup set directory is not directory :" + backupSetPath);
         }

         File[] cfsw = PrivilegedFileHelper.listFiles(backupSetDir, new BackupLogsFilter());
         File[] cfsr = PrivilegedFileHelper.listFiles(backupSetDir, new RepositoryBackupLogsFilter());

         if (cfsw.length == 0 && cfsr.length == 0)
         {
            throw new RestoreConfigurationException("Can not found backup log in directory : " + backupSetPath);
         }
         else if ((cfsw.length == 1 && cfsr.length == 1) || (cfsw.length > 1) || (cfsr.length > 1))
         {
            throw new RestoreConfigurationException("Backup set directory should contains only one backup log : "
                     + backupSetPath);
         }
         else if (cfsw.length != 0 && cfsr.length == 0)
         {
            restoreWorkspace = true;
View Full Code Here

         File backupSetDir = (new File(backupSetPath));

         if (!backupSetDir.exists())
         {
            throw new RestoreConfigurationException("Backup set directory is not exists :" + backupSetPath);
         }

         if (!backupSetDir.isDirectory())
         {
            throw new RestoreConfigurationException("Backup set directory is not directory :" + backupSetPath);
         }

         File[] cfs = PrivilegedFileHelper.listFiles(backupSetDir, new RepositoryBackupLogsFilter());

         if (cfs.length == 0)
         {
            throw new RestoreConfigurationException("Can not found repository backup log in directory : "
                     + backupSetPath);
         }

         if (cfs.length > 1)
         {
            throw new RestoreConfigurationException(
                     "Backup set directory should contains only one repository backup log : " + backupSetPath);
         }

         RepositoryBackupChainLog backupChainLog = new RepositoryBackupChainLog(cfs[0]);
View Full Code Here

         File backupSetDir = (new File(backupSetPath));

         if (!backupSetDir.exists())
         {
            throw new RestoreConfigurationException("Backup set directory is not exists :" + backupSetPath);
         }

         if (!backupSetDir.isDirectory())
         {
            throw new RestoreConfigurationException("Backup set directory is not directory :" + backupSetPath);
         }

         File[] cfs = PrivilegedFileHelper.listFiles(backupSetDir, new BackupLogsFilter());

         if (cfs.length == 0)
         {
            throw new RestoreConfigurationException("Can not found workspace backup log in directory : "
                     + backupSetPath);
         }

         if (cfs.length > 1)
         {
            throw new RestoreConfigurationException(
                     "Backup set directory should contains only one workspace backup log : " + backupSetPath);
         }

         validateRepositoryName(repository);
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.ext.backup.RestoreConfigurationException

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.