Examples of BackupChain


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

   @Path("/info/backup/{id}")
   public Response infoBackupId(@PathParam("id") String id)
   {
      try
      {
         BackupChain current = backupManager.findBackup(id);

         if (current != null)
         {
            DetailedInfo info = new DetailedInfo(DetailedInfo.CURRENT, current);
            return Response.ok(info).cacheControl(noCache).build();
View Full Code Here

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

    *           will be generated WorkspaceRestoreExeption
    */
   private void validateOneBackupInstants(String repositoryName, String workspaceName) throws WorkspaceRestoreExeption
   {

      BackupChain bch = backupManager.findBackup(repositoryName, workspaceName);

      if (bch != null)
         throw new WorkspaceRestoreExeption("The backup is already working on workspace '" + "/" + repositoryName + "/"
            + workspaceName + "'");
   }
View Full Code Here

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

   BackupChain startBackup(BackupConfig config, BackupJobListener jobListener) throws BackupOperationException,
      BackupConfigurationException, RepositoryException, RepositoryConfigurationException
   {
      validateBackupConfig(config);

      BackupChain bchain =
         new BackupChainImpl(config, logsDirectory, repoService.getRepository(config.getRepository()), fullBackupType,
            incrementalBackupType, IdGenerator.generate());

      bchain.addListener(messagesListener);
      bchain.addListener(jobListener);

      currentBackups.add(bchain);
      bchain.startBackup();

      return bchain;
   }
View Full Code Here

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

   public BackupChain findBackup(String repository, String workspace)
   {
      Iterator<BackupChain> it = currentBackups.iterator();
      while (it.hasNext())
      {
         BackupChain chain = it.next();
         if (repository.equals(chain.getBackupConfig().getRepository())
            && workspace.equals(chain.getBackupConfig().getWorkspace()))
            return chain;
      }
      return null;
   }
View Full Code Here

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

   public BackupChain findBackup(String backupId)
   {
      Iterator<BackupChain> it = currentBackups.iterator();
      while (it.hasNext())
      {
         BackupChain chain = it.next();
         if (backupId.equals(chain.getBackupId()))
            return chain;
      }
      return null;
   }
View Full Code Here

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

               FileNameProducer.generateBackupSetDir(config.getRepository(), config.getWorkspace(), config
                        .getBackupDir().getPath(), startTime);
      dir.mkdirs();
      config.setBackupDir(dir);

      BackupChain bchain =
               new BackupChainImpl(config, logsDirectory, repoService,
                        fullBackupType, incrementalBackupType, IdGenerator.generate(), logsDirectory, startTime);

      bchain.addListener(messagesListener);
      bchain.addListener(jobListener);

      currentBackups.add(bchain);
      bchain.startBackup();

      return bchain;
   }
View Full Code Here

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

   public BackupChain findBackup(String repository, String workspace)
   {
      Iterator<BackupChain> it = currentBackups.iterator();
      while (it.hasNext())
      {
         BackupChain chain = it.next();
         if (repository.equals(chain.getBackupConfig().getRepository())
            && workspace.equals(chain.getBackupConfig().getWorkspace()))
            return chain;
      }
      return null;
   }
View Full Code Here

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

   public BackupChain findBackup(String backupId)
   {
      Iterator<BackupChain> it = currentBackups.iterator();
      while (it.hasNext())
      {
         BackupChain chain = it.next();
         if (backupId.equals(chain.getBackupId()))
            return chain;
      }
      return null;
   }
View Full Code Here

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

         validateRepositoryName(repository);
         validateWorkspaceName(repository, workspace);
         validateOneBackupInstants(repository, workspace);

         BackupChain chain = backupManager.startBackup(config);

         ShortInfo shortInfo = new ShortInfo(ShortInfo.CURRENT, chain);

         return Response.ok(shortInfo).cacheControl(noCache).build();
      }
View Full Code Here

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

      Response.Status status;
      Throwable exception;

      try
      {
         BackupChain bch = backupManager.findBackup(backupId);

         if (bch != null)
            backupManager.stopBackup(bch);
         else
            throw new BackupNotFoundException("No active backup with id '" + backupId + "'");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.