Examples of WorkspaceEntry


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

   {
      checkLive();

      LocationFactory factory = new LocationFactory(((NamespaceRegistryImpl)repository.getNamespaceRegistry()));

      WorkspaceEntry wsConfig = (WorkspaceEntry)container.getComponentInstanceOfType(WorkspaceEntry.class);

      ValueFactoryImpl valueFactoryImpl = new ValueFactoryImpl(factory, wsConfig, cleanerHolder);
      try
      {
         BaseXmlExporter exporter =
View Full Code Here

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

   protected void restoreWorkspace() throws WorkspaceRestoreException
   {
      try
      {
         // get current workspace configuration
         WorkspaceEntry wEntry = null;;
         for (WorkspaceEntry entry : repositoryService.getRepository(repositoryName).getConfiguration()
            .getWorkspaceEntries())
         {
            if (entry.getName().equals(this.wEntry.getName()))
            {
               wEntry = entry;
               break;
            }
         }

         if (wEntry == null)
         {
            throw new WorkspaceRestoreException("Workspace " + this.wEntry.getName()
               + " did not found in current repository " + repositoryName + " configuration");
         }

         // get all backupable components
         List<Backupable> backupable =
            repositoryService.getRepository(repositoryName).getWorkspaceContainer(wEntry.getName())
               .getComponentInstancesOfType(Backupable.class);

         // close all session
         forceCloseSession(repositoryName, wEntry.getName());

         repositoryService.getRepository(repositoryName).removeWorkspace(wEntry.getName());

         // clean
         for (Backupable component : backupable)
         {
            component.clean();
         }

         super.restoreWorkspace();
      }
      catch (Throwable t)
      {
         throw new WorkspaceRestoreException("Workspace " + wEntry.getName() + " was not restored", t);
      }
   }
View Full Code Here

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

      List<DataRestore> dataRestorer = new ArrayList<DataRestore>();

      List<WorkspaceContainerFacade> workspacesWaits4Resume = new ArrayList<WorkspaceContainerFacade>();
      try
      {
         WorkspaceEntry wsEntry = repositoryEntry.getWorkspaceEntries().get(0);

         // define one common connection for all restores and cleaners for single db case
         Connection jdbcConn = null;
        
         // define one common database cleaner for all restores for single db case
         DBCleaner dbCleaner = null;
        
         Boolean isMultiDb =
            Boolean.parseBoolean(wsEntry.getContainer().getParameterValue(JDBCWorkspaceDataContainer.MULTIDB));

         if (!isMultiDb)
         {
            String dsName = wsEntry.getContainer().getParameterValue(JDBCWorkspaceDataContainer.SOURCE_NAME);

            final DataSource ds = (DataSource)new InitialContext().lookup(dsName);
            if (ds == null)
            {
               throw new NameNotFoundException("Data source " + dsName + " not found");
View Full Code Here

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

      catch (RepositoryConfigurationException e)
      {
         throw new BackupOperationException("Can not get repository \"" + config.getRepository() + "\"", e);
      }

      WorkspaceEntry wEntry = null;

      for (WorkspaceEntry entry : repository.getWorkspaceEntries())
      {
         if (entry.getName().equals(config.getWorkspace()))
         {
View Full Code Here

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

      defRep.configWorkspace(workspaceEntry);
      defRep.createWorkspace(workspaceEntry.getName());

      //set original workspace initializer
      WorkspaceContainerFacade wcf = defRep.getWorkspaceContainer(workspaceEntry.getName());
      WorkspaceEntry createdWorkspaceEntry = (WorkspaceEntry)wcf.getComponent(WorkspaceEntry.class);
      createdWorkspaceEntry.setInitializer(wieOriginal);
   }
View Full Code Here

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

      {
         if (Class.forName(log.getFullBackupType()).equals(
            org.exoplatform.services.jcr.ext.backup.impl.rdbms.FullBackupJob.class))
         {

            WorkspaceEntry currentWsEntry = null;
            for (WorkspaceEntry wsEntry : repoService.getRepository(repositoryName).getConfiguration()
               .getWorkspaceEntries())
            {
               if (wsEntry.getName().equals(workspaceEntry.getName()))
               {
View Full Code Here

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

      ClassNotFoundException
   {
      List<WorkspaceEntry> originalWorkspaceEntrys = repositoryEntry.getWorkspaceEntries();

      //Getting system workspace entry
      WorkspaceEntry systemWorkspaceEntry = null;

      for (WorkspaceEntry wsEntry : originalWorkspaceEntrys)
      {
         if (wsEntry.getName().equals(repositoryEntry.getSystemWorkspaceName()))
         {
            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>();
      newEntries.add(systemWorkspaceEntry);

      repositoryEntry.setWorkspaceEntries(newEntries);

      String currennWorkspaceName = repositoryEntry.getSystemWorkspaceName();

      boolean restored = true;
      try
      {
         repositoryService.createRepository(repositoryEntry);

         //set original initializer to created workspace.
         RepositoryImpl defRep = (RepositoryImpl)repositoryService.getRepository(repositoryEntry.getName());
         WorkspaceContainerFacade wcf = defRep.getWorkspaceContainer(systemWorkspaceEntry.getName());
         WorkspaceEntry createdWorkspaceEntry = (WorkspaceEntry)wcf.getComponent(WorkspaceEntry.class);
         createdWorkspaceEntry.setInitializer(wieOriginal);

         // save configuration to persistence (file or persister)
         repositoryService.getConfig().retain();

         for (WorkspaceEntry wsEntry : originalWorkspaceEntrys)
View Full Code Here

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

                     ReplicationChannelManager channelManager =
                        new ReplicationChannelManager(props, channelName + (channelName.equals("") ? "" : "_")
                           + uniqueNoame);

                     WorkspaceContainerFacade wsFacade = jcrRepository.getWorkspaceContainer(workspaces[wIndex]);
                     WorkspaceEntry wconf = (WorkspaceEntry)wsFacade.getComponent(WorkspaceEntry.class);

                     int maxBufferSize =
                        wconf.getContainer().getParameterInteger(WorkspaceDataContainer.MAXBUFFERSIZE_PROP,
                           WorkspaceDataContainer.DEF_MAXBUFFERSIZE);

                     FileCleanerHolder wfcleaner =
                        (FileCleanerHolder)wsFacade.getComponent(FileCleanerHolder.class);
                     FileCleaner fileCleaner = wfcleaner.getFileCleaner();
View Full Code Here

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

               registerComponentImplementation(DefaultAccessManagerImpl.class);

               registerComponentImplementation(SessionRegistry.class);

               String systemWsname = config.getSystemWorkspaceName();
               WorkspaceEntry systemWsEntry = getWorkspaceEntry(systemWsname);

               if (systemWsEntry != null && systemWsEntry.getQueryHandler() != null)
               {
                  SystemSearchManager systemSearchManager =
                     (SystemSearchManager)getWorkspaceContainer(systemWsname).getComponentInstanceOfType(
                        SystemSearchManager.class);
                  registerComponentInstance(new SystemSearchManagerHolder(systemSearchManager));
View Full Code Here

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

               registerComponentImplementation(DefaultAccessManagerImpl.class);

               registerComponentImplementation(SessionRegistry.class);

               String systemWsname = config.getSystemWorkspaceName();
               WorkspaceEntry systemWsEntry = getWorkspaceEntry(systemWsname);

               if (systemWsEntry != null && systemWsEntry.getQueryHandler() != null)
               {
                  SystemSearchManager systemSearchManager =
                     (SystemSearchManager)getWorkspaceContainer(systemWsname).getComponentInstanceOfType(
                        SystemSearchManager.class);
                  registerComponentInstance(new SystemSearchManagerHolder(systemSearchManager));
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.