Package org.exoplatform.services.jcr.core

Examples of org.exoplatform.services.jcr.core.ManageableRepository.login()


            repository = createRepositoryWithJBCorISPNQueryHandler();
            RepositoryContainer repositoryContainer =
               helper.getRepositoryContainer(container, repository.getConfiguration().getName());
            repositoryContainersInMemory.put(repositoryContainer, null);
            SessionImpl session =
               (SessionImpl)repository.login(credentials, repository.getConfiguration().getSystemWorkspaceName());
            session.logout();
         }
         finally
         {
            if (repository != null)
View Full Code Here


         WorkspaceEntry workspaceEntry =
            helper.createWorkspaceEntry(isDefaultWsMultiDb, isDefaultWsMultiDb ? helper.createDatasource() : dsName);
         helper.addWorkspace(repository, workspaceEntry);

         Session defSession = repository.login(this.credentials, workspaceEntry.getName());
         Node defRoot = defSession.getRootNode();

         Node node1 = defRoot.addNode("node1");
         node1.setProperty("p1", 2);
         defSession.save();
View Full Code Here

      index++;

      ManageableRepository repository = repositoryService.getRepository(repositoryName);
      for (String wsName : repository.getWorkspaceNames())
      {
         SessionImpl session = (SessionImpl)repository.login(credentials, wsName);
         try
         {
            Node rootNode = session.getRootNode().addNode("test" + index);
            rootNode.addNode("node1").setProperty("prop1", "value1");
            session.save();
View Full Code Here

   protected void checkConent(String repositoryName) throws Exception
   {
      ManageableRepository repository = repositoryService.getRepository(repositoryName);
      for (String wsName : repository.getWorkspaceNames())
      {
         SessionImpl session = (SessionImpl)repository.login(credentials, wsName);
         try
         {
            Node rootNode = session.getRootNode().getNode("test" + index);
            assertEquals(rootNode.getNode("node1").getProperty("prop1").getString(), "value1");
         }
View Full Code Here

      index++;

      ManageableRepository repository = repositoryService.getRepository(repositoryName);
      for (String wsName : repository.getWorkspaceNames())
      {
         SessionImpl session = (SessionImpl)repository.login(credentials, wsName);
         try
         {
            Node rootNode = session.getRootNode().addNode("test" + index);

            rootNode.addNode("node1").setProperty("prop1", "value1");
View Full Code Here

   protected void checkConent(String repositoryName) throws Exception
   {
      ManageableRepository repository = repositoryService.getRepository(repositoryName);
      for (String wsName : repository.getWorkspaceNames())
      {
         SessionImpl session = (SessionImpl)repository.login(credentials, wsName);
         try
         {
            Node rootNode = session.getRootNode().getNode("test" + index);
            assertEquals(rootNode.getNode("node1").getProperty("prop1").getString(), "value1");
         }
View Full Code Here

   {
      if (!oldDistribution && autoMigrate)
      {

         ManageableRepository repo = jcrService_.getCurrentRepository();
         Session session = repo.login();

         try
         {
            String userPath = getJcrPath(USERS_PATH);
            Node usersNode = (Node)session.getItem(userPath);
View Full Code Here

      // check
      ManageableRepository restoredRepository = repositoryService.getRepository(tenantName);
      assertNotNull(restoredRepository);

      SessionImpl session =
         (SessionImpl)restoredRepository.login(credentials, restoredRepository.getConfiguration()
            .getSystemWorkspaceName());
      session.getRootNode();

      Thread.sleep(120000);
View Full Code Here

         return false;
      }

      try
      {
         repository.login(credentials, wsName);
      }
      catch (LoginException e)
      {
         return false;
      }
View Full Code Here

         try
         {
            WorkspaceEntry wsEntry = helper.createWorkspaceEntry(DatabaseStructureType.SINGLE, dsName);
            helper.addWorkspace(repository, wsEntry);

            session = (SessionImpl)repository.login(credentials, wsEntry.getName());
            assertNotNull(session.getRootNode());
         }
         catch (RepositoryException e)
         {
            e.printStackTrace();
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.