Package org.exoplatform.services.jcr.impl.core

Examples of org.exoplatform.services.jcr.impl.core.RepositoryImpl


            + " remove repository close all open sessions");

      try
      {
         RepositoryEntry repconfig = config.getRepositoryConfiguration(name);
         RepositoryImpl repo = (RepositoryImpl)getRepository(name);
         for (WorkspaceEntry wsEntry : repconfig.getWorkspaceEntries())
         {
            repo.internalRemoveWorkspace(wsEntry.getName());
         }
         repconfig.getWorkspaceEntries().clear();
         RepositoryContainer repositoryContainer = repositoryContainers.get(name);
         repositoryContainer.stopContainer();
         repositoryContainer.stop();
View Full Code Here


   private final NodeTypeDataManager typeDataManager;

   public SessionActionCatalog(RepositoryService repService) throws RepositoryException
   {

      RepositoryImpl rep = (RepositoryImpl) repService.getCurrentRepository();
      this.locFactory = rep.getLocationFactory();
      this.typeDataManager = rep.getNodeTypeManager().getNodeTypesHolder();
   }
View Full Code Here

      {
         throw new RepositoryConfigurationException("Class not found for repository authentication policy: " + e);
      }

      // Repository
      RepositoryImpl repository = new RepositoryImpl(this);
      registerComponentInstance(repository);

   }
View Full Code Here

      }
   }

   public boolean canRemoveRepository(String name) throws RepositoryException
   {
      RepositoryImpl repo = (RepositoryImpl) getRepository(name);
      try
      {
         RepositoryEntry repconfig = config.getRepositoryConfiguration(name);

         for (WorkspaceEntry wsEntry : repconfig.getWorkspaceEntries())
         {
            // Check non system workspaces
            if (!repo.getSystemWorkspaceName().equals(wsEntry.getName()) && !repo.canRemoveWorkspace(wsEntry.getName()))
               return false;
         }
         // check system workspace
         RepositoryContainer repositoryContainer = repositoryContainers.get(name);
         SessionRegistry sessionRegistry =
                  (SessionRegistry) repositoryContainer.getComponentInstance(SessionRegistry.class);
         if (sessionRegistry == null || sessionRegistry.isInUse(repo.getSystemWorkspaceName()))
            return false;

      }
      catch (RepositoryConfigurationException e)
      {
View Full Code Here

                  + " remove repository close all open sessions");

      try
      {
         RepositoryEntry repconfig = config.getRepositoryConfiguration(name);
         RepositoryImpl repo = (RepositoryImpl) getRepository(name);
         for (WorkspaceEntry wsEntry : repconfig.getWorkspaceEntries())
         {
            repo.internalRemoveWorkspace(wsEntry.getName());
         }
         repconfig.getWorkspaceEntries().clear();
         RepositoryContainer repositoryContainer = repositoryContainers.get(name);
         repositoryContainer.stopContainer();
         repositoryContainer.stop();
View Full Code Here

   @Override
   public void setUp() throws Exception
   {
      super.setUp();

      RepositoryImpl db1tckRepo = (RepositoryImpl)repositoryService.getRepository(repositoryName);
      assertNotNull(db1tckRepo);
      testSession = db1tckRepo.login(credentials, workspaceName);

      searchManager = (SearchManager)db1tckRepo.getWorkspaceContainer(workspaceName).getComponent(SearchManager.class);
      assertNotNull(searchManager);
      searchIndex = (SearchIndex)(searchManager.getHandler());
      assertNotNull(searchIndex);

      IndexingConfigurationImpl indexingConfigurationImpl = (IndexingConfigurationImpl)searchIndex.getIndexingConfig();
View Full Code Here

   public void testAddValuesInDifferentVs() throws Exception
   {
      int WORKSPACE_COUNT = 3;
      int NODES_COUNT = 5;
      RepositoryService service = (RepositoryService)container.getComponentInstanceOfType(RepositoryService.class);
      RepositoryImpl defRep = null;

      defRep = (RepositoryImpl)service.getDefaultRepository();
      Random random = new Random();
      for (int i = 0; i < WORKSPACE_COUNT; i++)
      {
         String currwsName = createWs();
         Session currenSession = defRep.getSystemSession(currwsName);
         Node currentRoot = currenSession.getRootNode();
         assertNotNull(currentRoot);
         Node testLocalBigFiles = currentRoot.addNode("testVs");
         List<String> blobFiles = new ArrayList<String>();
View Full Code Here

   @Deprecated
   public void createWorkspace(WorkspaceEntry workspaceEntry, ExoContainer container)
      throws RepositoryConfigurationException, RepositoryException
   {
      RepositoryService service = (RepositoryService)container.getComponentInstanceOfType(RepositoryService.class);
      RepositoryImpl defRep;

      defRep = (RepositoryImpl)service.getDefaultRepository();
      defRep.configWorkspace(workspaceEntry);
      defRep.createWorkspace(workspaceEntry.getName());

   }
View Full Code Here

      }
   }

   public boolean canRemoveRepository(String name) throws RepositoryException
   {
      RepositoryImpl repo = (RepositoryImpl)getRepository(name);
      try
      {
         RepositoryEntry repconfig = config.getRepositoryConfiguration(name);

         for (WorkspaceEntry wsEntry : repconfig.getWorkspaceEntries())
         {
            // Check non system workspaces
            if (!repo.getSystemWorkspaceName().equals(wsEntry.getName()) && !repo.canRemoveWorkspace(wsEntry.getName()))
               return false;
         }
         // check system workspace
         RepositoryContainer repositoryContainer = repositoryContainers.get(name);
         SessionRegistry sessionRegistry =
            (SessionRegistry)repositoryContainer.getComponentInstance(SessionRegistry.class);
         if (sessionRegistry == null || sessionRegistry.isInUse(repo.getSystemWorkspaceName()))
            return false;

      }
      catch (RepositoryConfigurationException e)
      {
View Full Code Here

            + " remove repository close all open sessions");

      try
      {
         RepositoryEntry repconfig = config.getRepositoryConfiguration(name);
         RepositoryImpl repo = (RepositoryImpl)getRepository(name);
         for (WorkspaceEntry wsEntry : repconfig.getWorkspaceEntries())
         {
            repo.internalRemoveWorkspace(wsEntry.getName());
         }
         repconfig.getWorkspaceEntries().clear();
         RepositoryContainer repositoryContainer = repositoryContainers.get(name);
         repositoryContainer.stop();
         repositoryContainers.remove(name);
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.impl.core.RepositoryImpl

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.