Package org.exoplatform.services.jcr.config

Examples of org.exoplatform.services.jcr.config.WorkspaceInitializerEntry


            systemWorkspaceEntry = wsEntry;
            break;
         }
      }

      WorkspaceInitializerEntry wieOriginal = systemWorkspaceEntry.getInitializer();

      //getting backup chail log to system workspace.
      BackupChainLog systemBackupChainLog = workspacesMapping.get(systemWorkspaceEntry.getName());
     
      WorkspaceInitializerEntry wiEntry = getWorkspaceInitializerEntry(systemBackupChainLog);

      // set initializer
      systemWorkspaceEntry.setInitializer(wiEntry);

      ArrayList<WorkspaceEntry> newEntries = new ArrayList<WorkspaceEntry>();
View Full Code Here


      {
         throw new BackupOperationException("Class \"" + systemBackupChainLog.getFullBackupType() + "\" is not found.",
                  e);
      }

      WorkspaceInitializerEntry wiEntry = new WorkspaceInitializerEntry();
      if ((Class.forName(fullbackupType).equals(FullBackupJob.class)))
      {
         // set the initializer BackupWorkspaceInitializer
         wiEntry.setType(BackupWorkspaceInitializer.class.getCanonicalName());

         List<SimpleParameterEntry> wieParams = new ArrayList<SimpleParameterEntry>();
         wieParams.add(new SimpleParameterEntry(BackupWorkspaceInitializer.RESTORE_PATH_PARAMETER, (new File(
                  fullBackupPath).getParent())));

         wiEntry.setParameters(wieParams);
      }
      else if ((Class.forName(fullbackupType)
               .equals(org.exoplatform.services.jcr.ext.backup.impl.rdbms.FullBackupJob.class)))
      {
         // set the initializer RdbmsBackupWorkspaceInitializer
         wiEntry.setType(RdbmsBackupWorkspaceInitializer.class.getCanonicalName());

         List<SimpleParameterEntry> wieParams = new ArrayList<SimpleParameterEntry>();
         wieParams.add(new SimpleParameterEntry(RdbmsBackupWorkspaceInitializer.RESTORE_PATH_PARAMETER, (new File(
                  fullBackupPath).getParent())));

         wiEntry.setParameters(wieParams);
      }

      return wiEntry;
   }
View Full Code Here

            systemWorkspaceEntry = wsEntry;
            break;
         }
      }

      WorkspaceInitializerEntry wieOriginal = systemWorkspaceEntry.getInitializer();

      //getting backup chail log to system workspace.
      BackupChainLog systemBackupChainLog = workspacesMapping.get(systemWorkspaceEntry.getName());
     
      WorkspaceInitializerEntry wiEntry = getWorkspaceInitializerEntry(systemBackupChainLog);

      // set initializer
      systemWorkspaceEntry.setInitializer(wiEntry);

      ArrayList<WorkspaceEntry> newEntries = new ArrayList<WorkspaceEntry>();
View Full Code Here

      {
         throw new BackupOperationException("Class \"" + systemBackupChainLog.getFullBackupType() + "\" is not found.",
                  e);
      }

      WorkspaceInitializerEntry wiEntry = new WorkspaceInitializerEntry();
      if ((Class.forName(fullbackupType).equals(FullBackupJob.class)))
      {
         // set the initializer BackupWorkspaceInitializer
         wiEntry.setType(BackupWorkspaceInitializer.class.getCanonicalName());

         List<SimpleParameterEntry> wieParams = new ArrayList<SimpleParameterEntry>();
         wieParams.add(new SimpleParameterEntry(BackupWorkspaceInitializer.RESTORE_PATH_PARAMETER, (new File(
                  fullBackupPath).getParent())));

         wiEntry.setParameters(wieParams);
      }
      else if ((Class.forName(fullbackupType)
               .equals(org.exoplatform.services.jcr.ext.backup.impl.rdbms.FullBackupJob.class)))
      {
         // set the initializer RdbmsBackupWorkspaceInitializer
         wiEntry.setType(RdbmsBackupWorkspaceInitializer.class.getCanonicalName());

         List<SimpleParameterEntry> wieParams = new ArrayList<SimpleParameterEntry>();
         wieParams.add(new SimpleParameterEntry(RdbmsBackupWorkspaceInitializer.RESTORE_PATH_PARAMETER, (new File(
                  fullBackupPath).getParent())));

         wiEntry.setParameters(wieParams);
      }

      return wiEntry;
   }
View Full Code Here

   private void fullRestoreOverInitializer(String pathBackupFile, String repositoryName, WorkspaceEntry workspaceEntry,
      String fBackupType) throws FileNotFoundException, IOException, RepositoryException,
      RepositoryConfigurationException, ClassNotFoundException
   {
      WorkspaceInitializerEntry wieOriginal = workspaceEntry.getInitializer();

      RepositoryImpl defRep = (RepositoryImpl)repoService.getRepository(repositoryName);

      WorkspaceInitializerEntry wiEntry = new WorkspaceInitializerEntry();

      if ((Class.forName(fBackupType).equals(FullBackupJob.class)))
      {
         // set the initializer SysViewWorkspaceInitializer
         wiEntry.setType(SysViewWorkspaceInitializer.class.getCanonicalName());

         List<SimpleParameterEntry> wieParams = new ArrayList<SimpleParameterEntry>();
         wieParams.add(new SimpleParameterEntry(SysViewWorkspaceInitializer.RESTORE_PATH_PARAMETER, pathBackupFile));

         wiEntry.setParameters(wieParams);
      }
      else if ((Class.forName(fBackupType)
               .equals(org.exoplatform.services.jcr.ext.backup.impl.rdbms.FullBackupJob.class)))
      {
         // set the initializer RdbmsWorkspaceInitializer
         wiEntry.setType(RdbmsWorkspaceInitializer.class.getCanonicalName());

         List<SimpleParameterEntry> wieParams = new ArrayList<SimpleParameterEntry>();
         wieParams.add(new SimpleParameterEntry(RdbmsWorkspaceInitializer.RESTORE_PATH_PARAMETER, new File(
                  pathBackupFile).getParent()));

         wiEntry.setParameters(wieParams);
      }

      workspaceEntry.setInitializer(wiEntry);

      //restore
View Full Code Here

      ws1back.setCache(ws1e.getCache());
      ws1back.setContainer(ws1e.getContainer());
      ws1back.setLockManager(ws1e.getLockManager());

      // Initializer
      WorkspaceInitializerEntry wiEntry = new WorkspaceInitializerEntry();
      wiEntry.setType(SysViewWorkspaceInitializer.class.getCanonicalName());

      List<SimpleParameterEntry> wieParams = new ArrayList<SimpleParameterEntry>();
      wieParams
         .add(new SimpleParameterEntry(SysViewWorkspaceInitializer.RESTORE_PATH_PARAMETER, sysViewFile.getPath()));

      wiEntry.setParameters(wieParams);

      ws1back.setInitializer(wiEntry);

      // Indexer
      List<SimpleParameterEntry> qParams = new ArrayList<SimpleParameterEntry>();
View Full Code Here

   private void fullRestoreOverInitializer(String pathBackupFile, String repositoryName, WorkspaceEntry workspaceEntry,
      String fBackupType) throws FileNotFoundException, IOException, RepositoryException,
      RepositoryConfigurationException, ClassNotFoundException
   {
      WorkspaceInitializerEntry wieOriginal = workspaceEntry.getInitializer();

      RepositoryImpl defRep = (RepositoryImpl)repoService.getRepository(repositoryName);

      WorkspaceInitializerEntry wiEntry = new WorkspaceInitializerEntry();

      if ((Class.forName(fBackupType).equals(FullBackupJob.class)))
      {
         // set the initializer SysViewWorkspaceInitializer
         wiEntry.setType(SysViewWorkspaceInitializer.class.getCanonicalName());

         List<SimpleParameterEntry> wieParams = new ArrayList<SimpleParameterEntry>();
         wieParams.add(new SimpleParameterEntry(SysViewWorkspaceInitializer.RESTORE_PATH_PARAMETER, pathBackupFile));

         wiEntry.setParameters(wieParams);
      }
      else if ((Class.forName(fBackupType)
               .equals(org.exoplatform.services.jcr.ext.backup.impl.rdbms.FullBackupJob.class)))
      {
         // set the initializer RdbmsWorkspaceInitializer
         wiEntry.setType(RdbmsWorkspaceInitializer.class.getCanonicalName());

         List<SimpleParameterEntry> wieParams = new ArrayList<SimpleParameterEntry>();
         wieParams.add(new SimpleParameterEntry(RdbmsWorkspaceInitializer.RESTORE_PATH_PARAMETER, new File(
                  pathBackupFile).getParent()));

         wiEntry.setParameters(wieParams);
      }

      workspaceEntry.setInitializer(wiEntry);

      //restore
View Full Code Here

      ws1back.setCache(ws1e.getCache());
      ws1back.setContainer(ws1e.getContainer());
      ws1back.setLockManager(ws1e.getLockManager());

      // Initializer
      WorkspaceInitializerEntry wiEntry = new WorkspaceInitializerEntry();
      wiEntry.setType(SysViewWorkspaceInitializer.class.getCanonicalName());

      List<SimpleParameterEntry> wieParams = new ArrayList<SimpleParameterEntry>();
      wieParams
         .add(new SimpleParameterEntry(SysViewWorkspaceInitializer.RESTORE_PATH_PARAMETER, sysViewFile.getPath()));

      wiEntry.setParameters(wieParams);

      ws1back.setInitializer(wiEntry);

      // Indexer
      List<SimpleParameterEntry> qParams = new ArrayList<SimpleParameterEntry>();
View Full Code Here

   {

      RepositoryImpl defRep = (RepositoryImpl) repoService.getRepository(repositoryName);

      // set the initializer SysViewWorkspaceInitializer
      WorkspaceInitializerEntry wiEntry = new WorkspaceInitializerEntry();
      wiEntry.setType(SysViewWorkspaceInitializer.class.getCanonicalName());

      List<SimpleParameterEntry> wieParams = new ArrayList<SimpleParameterEntry>();
      wieParams.add(new SimpleParameterEntry(SysViewWorkspaceInitializer.RESTORE_PATH_PARAMETER, pathBackupFile));

      wiEntry.setParameters(wieParams);

      workspaceEntry.setInitializer(wiEntry);

      //restore
      defRep.configWorkspace(workspaceEntry);
View Full Code Here

   private void fullRestoreOverInitializer(String pathBackupFile, String repositoryName, WorkspaceEntry workspaceEntry,
      String fBackupType) throws FileNotFoundException, IOException, RepositoryException,
      RepositoryConfigurationException, ClassNotFoundException
   {
      WorkspaceInitializerEntry wieOriginal = workspaceEntry.getInitializer();

      RepositoryImpl defRep = (RepositoryImpl)repoService.getRepository(repositoryName);

      WorkspaceInitializerEntry wiEntry = new WorkspaceInitializerEntry();

      if ((Class.forName(fBackupType).equals(FullBackupJob.class)))
      {
         // set the initializer SysViewWorkspaceInitializer
         wiEntry.setType(SysViewWorkspaceInitializer.class.getCanonicalName());

         List<SimpleParameterEntry> wieParams = new ArrayList<SimpleParameterEntry>();
         wieParams.add(new SimpleParameterEntry(SysViewWorkspaceInitializer.RESTORE_PATH_PARAMETER, pathBackupFile));

         wiEntry.setParameters(wieParams);
      }
      else if ((Class.forName(fBackupType)
               .equals(org.exoplatform.services.jcr.ext.backup.impl.rdbms.FullBackupJob.class)))
      {
         // set the initializer RdbmsWorkspaceInitializer
         wiEntry.setType(RdbmsWorkspaceInitializer.class.getCanonicalName());

         List<SimpleParameterEntry> wieParams = new ArrayList<SimpleParameterEntry>();
         wieParams.add(new SimpleParameterEntry(RdbmsWorkspaceInitializer.RESTORE_PATH_PARAMETER, new File(
                  pathBackupFile).getParent()));

         wiEntry.setParameters(wieParams);
      }

      workspaceEntry.setInitializer(wiEntry);

      //restore
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.config.WorkspaceInitializerEntry

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.