Examples of JcrRepositoryDumpToFile


Examples of org.pentaho.platform.repository2.unified.jcr.JcrRepositoryDumpToFile

            tenantAuthenticatedRoleName, ANONYMOUS_ROLE_NAME );
    userRoleDao.createUser( tenantAcme, USERNAME_SUZY, PASSWORD, "", new String[]{tenantAdminRoleName} );
    logout();
    login( USERNAME_SUZY, tenantAcme, new String[]{tenantAdminRoleName, tenantAuthenticatedRoleName} );
    logger.info( "getFile" );
    JcrRepositoryDumpToFile dumpToFile =
        new JcrRepositoryDumpToFile( testJcrTemplate, jcrTransactionTemplate, repositoryAdminUsername,
            "c:/build/testrepo_9", Mode.CUSTOM );
    dumpToFile.execute();
    RepositoryFile f = repo.getFile( ClientRepositoryPaths.getUserHomeFolderPath( USERNAME_SUZY ) );
    assertNotNull( f.getId() );
    assertEquals( ClientRepositoryPaths.getUserHomeFolderPath( USERNAME_SUZY ), f.getPath() );
    assertNotNull( f.getCreatedDate() );
    assertEquals( USERNAME_SUZY, f.getName() );
View Full Code Here

Examples of org.pentaho.platform.repository2.unified.jcr.JcrRepositoryDumpToFile

        .build(), null ) );
    login( USERNAME_SUZY, tenantAcme, new String[] { tenantAuthenticatedRoleName } );
    final String acmeTenantRootFolderPath = ClientRepositoryPaths.getRootFolderPath();
    final String homeFolderPath = ClientRepositoryPaths.getHomeFolderPath();
    final String tiffanyFolderPath = homeFolderPath + "/" + USERNAME_TIFFANY;
    JcrRepositoryDumpToFile dumpToFile =
        new JcrRepositoryDumpToFile( testJcrTemplate, jcrTransactionTemplate, repositoryAdminUsername,
            "c:/build/testrepo_7", JcrRepositoryDumpToFile.Mode.CUSTOM );
    // dumpToFile.execute();
    // read access for suzy on home
    assertNotNull( repo.getFile( homeFolderPath ) );
    // no read access for suzy on tiffany's folder
View Full Code Here

Examples of org.pentaho.platform.repository2.unified.jcr.JcrRepositoryDumpToFile

    newAclBuilder.entriesInheriting( false ).ace( userNameUtils.getPrincipleId( tenantAcme, USERNAME_SUZY ),
        RepositoryFileSid.Type.USER, RepositoryFilePermission.ALL );
    repo.updateAcl( newAclBuilder.build() );

    // newFile = repo.getFile(newFile.getPath());
    JcrRepositoryDumpToFile dumpToFile =
        new JcrRepositoryDumpToFile( testJcrTemplate, jcrTransactionTemplate, repositoryAdminUsername,
            "dumpTestAdminCreate", JcrRepositoryDumpToFile.Mode.CUSTOM );

    login( USERNAME_SUZY, tenantAcme, new String[] { tenantAuthenticatedRoleName } );

    try {
      repo.deleteFile( newFile.getId(), null );
    } finally {
      dumpToFile.execute();
    }
  }
View Full Code Here

Examples of org.pentaho.platform.repository2.unified.jcr.JcrRepositoryDumpToFile

    assertTrue( tenantManager.isSubTenant( mainTenant_2, subTenant2_1 ) );
    assertTrue( tenantManager.isSubTenant( mainTenant_2, subTenant2_2 ) );
    assertTrue( tenantManager.isSubTenant( subTenant2_2, subTenant2_2 ) );
    assertTrue( tenantManager.isSubTenant( subTenant1_2, subTenant1_2 ) );

    JcrRepositoryDumpToFile dumpToFile =
      new JcrRepositoryDumpToFile( testJcrTemplate, jcrTransactionTemplate, repositoryAdminUsername,
        "c:/tmp/testdump122", Mode.CUSTOM );
    dumpToFile.execute();
    cleanupUserAndRoles( mainTenant_1 );
    cleanupUserAndRoles( mainTenant_2 );
    cleanupUserAndRoles( subTenant1_1 );
    cleanupUserAndRoles( subTenant1_2 );
    cleanupUserAndRoles( subTenant2_1 );
View Full Code Here

Examples of org.pentaho.platform.repository2.unified.jcr.JcrRepositoryDumpToFile

        tenantManager.createTenant( systemTenant, MAIN_TENANT_1, adminAuthorityName, tenantAuthenticatedAuthorityName,
            "Anonymous" );
    userRoleDao.createUser( mainTenant_1, "admin", "password", "",
        new String[]{adminAuthorityName, tenantAuthenticatedAuthorityName} );
    login( "admin", mainTenant_1, new String[]{adminAuthorityName, tenantAuthenticatedAuthorityName} );
    JcrRepositoryDumpToFile dumpToFile =
        new JcrRepositoryDumpToFile( testJcrTemplate, jcrTransactionTemplate, repositoryAdminUsername,
            "c:/build/testrepo_3", Mode.CUSTOM );
    dumpToFile.execute();
    metadataRepositoryLifecycleManager.newTenant( mainTenant_1 );
    String metadataPath = ClientRepositoryPaths.getEtcFolderPath() + "/metadata";
    RepositoryFile metadataRepositoryPath = repo.getFile( metadataPath );
    assertTrue( metadataRepositoryPath.getPath() != null );
View Full Code Here

Examples of org.pentaho.platform.repository2.unified.jcr.JcrRepositoryDumpToFile

      repo.copyFile( testFolder.getId(), newFile.getPath(), null );
      fail();
    } catch ( UnifiedRepositoryException e ) {
      // copying a folder to a file is illegal
    }
    JcrRepositoryDumpToFile dumpToFile =
        new JcrRepositoryDumpToFile( testJcrTemplate, jcrTransactionTemplate, repositoryAdminUsername,
            "c:/build/testrepo_17", Mode.CUSTOM );
    dumpToFile.execute();
  }
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.