Examples of BackupConfig


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

            }
         }

         private void readBackupConfig() throws XMLStreamException
         {
            BackupConfig conf = new BackupConfig();

            boolean endBackupConfig = false;

            while (!endBackupConfig)
            {
               int eventCode = reader.next();
               switch (eventCode)
               {

                  case StartElement.START_ELEMENT :
                     String name = reader.getLocalName();

                     if (name.equals("backup-dir"))
                        conf.setBackupDir(new File(readContent()));

                     if (name.equals("repository"))
                        conf.setRepository(readContent());

                     if (name.equals("workspace"))
                        conf.setWorkspace(readContent());

                     if (name.equals("incremental-job-period"))
                        conf.setIncrementalJobPeriod(Long.valueOf(readContent()));

                     break;

                  case StartElement.END_ELEMENT :
                     String tagName = reader.getLocalName();
View Full Code Here

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

      try
      {
         remoteTransport.init();

         // start backup
         BackupConfig config = new BackupConfig();
         config.setBackupType(BackupManager.FULL_BACKUP_ONLY);
         config.setRepository(repositoryName);
         config.setWorkspace(workspaceName);
         config.setBackupDir(backupManager.getBackupDirectory());

         try
         {
            validateRepositoryName(repositoryName);
            validateWorkspaceName(repositoryName, workspaceName);
View Full Code Here

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

            }
         }

         private void readBackupConfig() throws XMLStreamException
         {
            BackupConfig conf = new BackupConfig();

            boolean endBackupConfig = false;

            while (!endBackupConfig)
            {
               int eventCode = reader.next();
               switch (eventCode)
               {

                  case StartElement.START_ELEMENT :
                     String name = reader.getLocalName();

                     if (name.equals("backup-dir"))
                        conf.setBackupDir(new File(readContent()));

                     if (name.equals("repository"))
                        conf.setRepository(readContent());

                     if (name.equals("workspace"))
                        conf.setWorkspace(readContent());

                     if (name.equals("incremental-job-period"))
                        conf.setIncrementalJobPeriod(Long.valueOf(readContent()));

                     break;

                  case StartElement.END_ELEMENT :
                     String tagName = reader.getLocalName();
View Full Code Here

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

      List<String> wsLogFilePathList = new ArrayList<String>();
     
      for (WorkspaceEntry workspaceEntry : repository.getConfiguration().getWorkspaceEntries())
      {
         BackupConfig wsBackupConfig = new BackupConfig();
         wsBackupConfig.setRepository(config.getRepository());
         wsBackupConfig.setWorkspace(workspaceEntry.getName());
         wsBackupConfig.setBackupDir(config.getBackupDir());
         wsBackupConfig.setBackupType(config.getBackupType());
         wsBackupConfig.setIncrementalJobNumber(config.getIncrementalJobNumber());
         wsBackupConfig.setIncrementalJobPeriod(config.getIncrementalJobPeriod());

         BackupChain bchain =
            new BackupChainImpl(wsBackupConfig, config.getBackupDir(), repository,
                     fullBackupType, incrementalBackupType, IdGenerator.generate());
        
View Full Code Here

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

            }
         }

         private void readBackupConfig() throws XMLStreamException
         {
            BackupConfig conf = new BackupConfig();

            boolean endBackupConfig = false;

            while (!endBackupConfig)
            {
               int eventCode = reader.next();
               switch (eventCode)
               {

                  case StartElement.START_ELEMENT :
                     String name = reader.getLocalName();

                     if (name.equals("backup-dir"))
                        conf.setBackupDir(new File(readContent()));

                     if (name.equals("repository"))
                        conf.setRepository(readContent());

                     if (name.equals("workspace"))
                        conf.setWorkspace(readContent());

                     if (name.equals("incremental-job-period"))
                        conf.setIncrementalJobPeriod(Long.valueOf(readContent()));

                     break;

                  case StartElement.END_ELEMENT :
                     String tagName = reader.getLocalName();
View Full Code Here

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

      throws BackupOperationException, RepositoryException, RepositoryConfigurationException,
      BackupConfigurationException
   {

      List<JobEntryInfo> list = log.getJobEntryInfos();
      BackupConfig config = log.getBackupConfig();

      String reposytoryName = (repositoryName == null ? config.getRepository() : repositoryName);
      String workspaceName = workspaceEntry.getName();

      // ws should be registered not created
      if (!workspaceAlreadyExist(reposytoryName, workspaceName))
      {
View Full Code Here

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

      {
         File backupDir = new File(bConfigBeen.getBackupDir());
         if (!backupDir.exists())
            throw new BackupDirNotFoundException("The backup folder not exists :  " + backupDir.getAbsolutePath());

         BackupConfig config = new BackupConfig();
         config.setBackupType(bConfigBeen.getBackupType());
         config.setRepository(repository);
         config.setWorkspace(workspace);
         config.setBackupDir(backupDir);
         config.setIncrementalJobPeriod(bConfigBeen.getIncrementalJobPeriod());
         config.setIncrementalJobNumber(bConfigBeen.getIncrementalRepetitionNumber());

         validateRepositoryName(repository);
         validateWorkspaceName(repository, workspace);
         validateOneBackupInstants(repository, workspace);
View Full Code Here

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

   public void restore(BackupChainLog log, String repositoryName, WorkspaceEntry workspaceEntry)
      throws BackupOperationException, RepositoryException, RepositoryConfigurationException,
      BackupConfigurationException
   {
      List<JobEntryInfo> list = log.getJobEntryInfos();
      BackupConfig config = log.getBackupConfig();

      String reposytoryName = (repositoryName == null ? config.getRepository() : repositoryName);
      String workspaceName = workspaceEntry.getName();

      // ws should be registered not created
      if (!workspaceAlreadyExist(reposytoryName, workspaceName))
      {
View Full Code Here

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

      try
      {
         remoteTransport.init();

         // start backup
         BackupConfig config = new BackupConfig();
         config.setBackupType(BackupManager.FULL_BACKUP_ONLY);
         config.setRepository(repositoryName);
         config.setWorkspace(workspaceName);
         config.setBackupDir(backupManager.getBackupDirectory());

         try
         {
            validateRepositoryName(repositoryName);
            validateWorkspaceName(repositoryName, workspaceName);
View Full Code Here

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

   public void restore(BackupChainLog log, String repositoryName, WorkspaceEntry workspaceEntry)
      throws BackupOperationException, RepositoryException, RepositoryConfigurationException,
      BackupConfigurationException
   {
      List<JobEntryInfo> list = log.getJobEntryInfos();
      BackupConfig config = log.getBackupConfig();

      String reposytoryName = (repositoryName == null ? config.getRepository() : repositoryName);
      String workspaceName = workspaceEntry.getName();

      // ws should be registered not created
      if (!workspaceAlreadyExist(reposytoryName, workspaceName))
      {
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.