Package org.exoplatform.services.jcr.core

Examples of org.exoplatform.services.jcr.core.ManageableRepository


   public void testWorkspace() throws Exception
   {
      PortalContainer container = PortalContainer.getInstance();
      RepositoryService repos = (RepositoryService)container.getComponentInstanceOfType(RepositoryService.class);
      assertNotNull(repos);
      ManageableRepository repo = repos.getDefaultRepository();
      assertNotNull(repo);
      Session session = repo.getSystemSession("portal-test");
      assertNotNull(session);
      session.logout();
   }
View Full Code Here


               new BackupChainLog(logDirectory, config, fullBackupType, incrementalBackupType, backupId,
                        repositoryService.getConfig(), rootDir);

      this.backupId = backupId;
     
      ManageableRepository repository = null;
      try
      {
         repository = repositoryService.getRepository(config.getRepository());
      }
      catch (RepositoryConfigurationException e)
View Full Code Here

    */
   protected void removeRepository(RepositoryService repositoryService, String repositoryName)
      throws RepositoryException,
      RepositoryConfigurationException
   {
      ManageableRepository mr = null;

      try
      {
         mr = repositoryService.getRepository(repositoryName);
      }
View Full Code Here

    * @return current session
    * @throws Exception {@link Exception}
    */
   protected Session session(String repoName, String wsName, List<String> lockTokens) throws Exception
   {
      ManageableRepository repo = this.repositoryService.getRepository(repoName);
      SessionProvider sp = sessionProviderService.getSessionProvider(null);
      if (sp == null)
         throw new RepositoryException("SessionProvider is not properly set. Make the application calls"
            + "SessionProviderService.setSessionProvider(..) somewhere before ("
            + "for instance in Servlet Filter for WEB application)");
View Full Code Here

      }

      registerNodeTypes(rEntry.getName());

      // turn on Repository ONLINE
      ManageableRepository mr =
         (ManageableRepository)repositoryContainer.getComponentInstanceOfType(ManageableRepository.class);
      mr.setState(ManageableRepository.ONLINE);
   }
View Full Code Here

      }

      registerNodeTypes(rEntry.getName());

      // turn on Repository ONLINE
      ManageableRepository mr =
         (ManageableRepository)repositoryContainer.getComponentInstanceOfType(ManageableRepository.class);
      mr.setState(ManageableRepository.ONLINE);
   }
View Full Code Here

    * @return current session
    * @throws Exception {@link Exception}
    */
   protected Session session(String repoName, String wsName, List<String> lockTokens) throws Exception
   {
      ManageableRepository repo = this.repositoryService.getRepository(repoName);
      SessionProvider sp = sessionProviderService.getSessionProvider(null);
      if (sp == null)
         throw new RepositoryException("SessionProvider is not properly set. Make the application calls"
            + "SessionProviderService.setSessionProvider(..) somewhere before ("
            + "for instance in Servlet Filter for WEB application)");
View Full Code Here

   public static GlobalKey wrap(RepositoryService repoService, Serializable localKey)
   {
      try
      {
         ManageableRepository repo = repoService.getCurrentRepository();
         return new GlobalKey(repo.getConfiguration().getName(), localKey);
      }
      catch (RepositoryException e)
      {
         throw new UndeclaredThrowableException(e);
      }
View Full Code Here

    *           will be generate RepositoryException
    */
   private int forceCloseSession(String repositoryName, String workspaceName) throws RepositoryException,
      RepositoryConfigurationException
   {
      ManageableRepository mr = repositoryService.getRepository(repositoryName);
      WorkspaceContainerFacade wc = mr.getWorkspaceContainer(workspaceName);

      SessionRegistry sessionRegistry = (SessionRegistry)wc.getComponent(SessionRegistry.class);

      return sessionRegistry.closeSessions(workspaceName);
   }
View Full Code Here

    *           will be generate RepositoryException
    */
   private int forceCloseSession(String repositoryName, String workspaceName) throws RepositoryException,
      RepositoryConfigurationException
   {
      ManageableRepository mr = repositoryService.getRepository(repositoryName);
      WorkspaceContainerFacade wc = mr.getWorkspaceContainer(workspaceName);

      SessionRegistry sessionRegistry = (SessionRegistry)wc.getComponent(SessionRegistry.class);

      return sessionRegistry.closeSessions(workspaceName);
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.core.ManageableRepository

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.