Examples of BackupConfigBean


Examples of org.exoplatform.services.jcr.ext.backup.server.bean.BackupConfigBean

         if (info.getType() == DetailedInfo.COMPLETED)
         {
            StringBuilder result = new StringBuilder("\nThe completed (ready to restore) backup information : \n");

            BackupConfigBean configBean = info.getBackupConfig();

            result.append("\t\tbackup id               : ").append(info.getBackupId()).append("\n");
            result.append("\t\tbackup folder           : ").append(configBean.getBackupDir()).append("\n");
            result.append("\t\trepository name         : ").append(info.getRepositoryName()).append("\n");
            result.append(info.getWorkspaceName().equals("") ? "" : "\t\tworkspace name          : "
               + info.getWorkspaceName() + "\n");
            result.append("\t\tbackup type             : ");
            result.append(configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
               : "full only");
            result.append("\n");
            result.append("\t\tstarted time            : ").append(info.getStartedTime()).append("\n");
            result.append(info.getFinishedTime().equals("") ? "\n" : "\t\tfinished time           : "
               + info.getFinishedTime() + "\n\n");

            return result.toString();
         }
         else
         {
            StringBuilder result = new StringBuilder("\nThe current backup information : \n");
            BackupConfigBean configBean = info.getBackupConfig();

            result.append("\t\tbackup id                : ").append(info.getBackupId()).append("\n");
            result.append("\t\tbackup folder            : ").append(configBean.getBackupDir()).append("\n");
            result.append("\t\trepository name          : ").append(info.getRepositoryName()).append("\n");
            result.append(info.getWorkspaceName().equals("") ? "" : "\t\tworkspace name           : "
               + info.getWorkspaceName() + "\n");
            result.append("\t\tbackup type              : ");
            result.append(configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
               : "full only");
            result.append("\n");
            result.append("\t\tfull backup state        : ");
            result.append(info.getWorkspaceName().equals("") ? getRepositoryBackupToFullState(info.getState())
               : getState(info.getState()));
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.backup.server.bean.BackupConfigBean

            StringBuilder result = new StringBuilder("\nThe current restores information : \n");

            result.append("\tWorkspace restore with id ").append(info.getBackupId()).append(":\n");

            BackupConfigBean configBean = info.getBackupConfig();

            result.append("\t\tbackup folder           : ").append(configBean.getBackupDir()).append("\n");
            result.append("\t\trepository name         : ").append(info.getRepositoryName()).append("\n");
            result.append("\t\tworkspace name          : ").append(info.getWorkspaceName()).append("\n");
            result.append("\t\tbackup type             : ");
            result.append(
               configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental" : "full only")
               .append("\n");
            result.append("\t\trestore state           : ").append(getRestoreState(info.getState())).append("\n");
            result.append("\t\tstarted time            : ").append(info.getStartedTime()).append("\n");
            result.append(info.getFinishedTime().equals("") ? "\n"
               : "\t\tfinished time           : " + info.getFinishedTime() + "\n\n");

            return result.toString();
         }
         else
         {
            return failureProcessing(response);
         }
      }
      else
      {
         String sURL =
                  path + HTTPBackupAgent.Constants.BASE_URL
                           + HTTPBackupAgent.Constants.OperationType.CURRENT_RESTORE_INFO_ON_REPOSITORY + "/"
                           + repositoryName;

         BackupAgentResponse response = transport.executeGET(sURL);

         if (response.getStatus() == Response.Status.OK.getStatusCode())
         {
            DetailedInfo info;
            try
            {
               info = (DetailedInfo) getObject(DetailedInfo.class, response.getResponseData());
            }
            catch (Exception e)
            {
               throw new IllegalStateException("Can not get DetailedInfo from responce.", e);
            }

            StringBuilder result = new StringBuilder("\nThe current restores information : \n");

            result.append("\tRepository restore with id ").append(info.getBackupId()).append(":\n");

            BackupConfigBean configBean = info.getBackupConfig();

            result.append("\t\tbackup folder           : ").append(configBean.getBackupDir()).append("\n");
            result.append("\t\trepository name         : ").append(info.getRepositoryName()).append("\n");
            result.append("\t\tbackup type             : ");
            result.append(
               configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental" : "full only")
               .append("\n");
            result.append("\t\trestore state           : ").append(getRepositoryRestoreState(info.getState()))
               .append("\n");
            result.append("\t\tstarted time            : ").append(info.getStartedTime()).append("\n");
            result.append(info.getFinishedTime().equals("") ? "\n"
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.backup.server.bean.BackupConfigBean

   public void testStart() throws Exception
   {
      RepoInfo rInfo = createRepositoryAndGetSession();

      BackupConfigBean configBean =
         new BackupConfigBean(BackupManager.FULL_AND_INCREMENTAL, backupDir.getPath(), 10000l);
     
      TesterContainerResponce cres = makePostRequest(new URI(HTTP_BACKUP_AGENT_PATH
         + HTTPBackupAgent.Constants.OperationType.START_BACKUP + "/" + rInfo.rName + "/" + rInfo.wsName), configBean);

      assertEquals(200, cres.getStatus());
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.backup.server.bean.BackupConfigBean

   public void testStartBackupRepository() throws Exception
   {
      RepoInfo rInfo = createRepositoryAndGetSession();

      BackupConfigBean configBean =
         new BackupConfigBean(BackupManager.FULL_AND_INCREMENTAL, backupDir.getPath(), 10000l);

      TesterContainerResponce cres =
         makePostRequest(new URI(HTTP_BACKUP_AGENT_PATH
            + HTTPBackupAgent.Constants.OperationType.START_BACKUP_REPOSITORY + "/" + rInfo.rName), configBean);
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.backup.server.bean.BackupConfigBean

    *          backupChain
    */
   public DetailedInfo(int type, BackupChain chain)
   {
      super(type, chain);
      this.backupConfig = new BackupConfigBean(chain.getBackupConfig());
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.backup.server.bean.BackupConfigBean

    *          backupChain
    */
   public DetailedInfo(int type, RepositoryBackupChain chain)
   {
      super(type, chain);
      this.backupConfig = new BackupConfigBean(chain.getBackupConfig());
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.backup.server.bean.BackupConfigBean

    *          BackupChainLog
    */
   public DetailedInfo(int type, BackupChainLog chainLog)
   {
      super(type, chainLog);
      this.backupConfig = new BackupConfigBean(chainLog.getBackupConfig());
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.backup.server.bean.BackupConfigBean

    *          RepositoryBackupChainLog
    */
   public DetailedInfo(int type, RepositoryBackupChainLog chainLog)
   {
      super(type, chainLog);
      this.backupConfig = new BackupConfigBean(chainLog.getBackupConfig());
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.backup.server.bean.BackupConfigBean

    *          int, the state of restore
    */
   public DetailedInfo(int type, BackupChainLog chainLog, Calendar startedTime, Calendar finishedTime, int state)
   {
      super(type, chainLog, startedTime, finishedTime, state);
      this.backupConfig = new BackupConfigBean(chainLog.getBackupConfig());
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.backup.server.bean.BackupConfigBean

    */
   public DetailedInfo(int type, BackupChainLog chainLog, Calendar startedTime, Calendar finishedTime, int state,
      String repositroryName, String workspaceName)
   {
      super(type, chainLog, startedTime, finishedTime, state, repositroryName, workspaceName);
      this.backupConfig = new BackupConfigBean(chainLog.getBackupConfig());
   }
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.