Package org.pentaho.platform.api.mt

Examples of org.pentaho.platform.api.mt.ITenantManager


  @Override
  public synchronized void startup() {
    ITenant defaultTenant = null;
    loginAsRepositoryAdmin();
    createCustomPrivilege();
    ITenantManager tenantMgr = getTenantManager();
    ITenant systemTenant =
        tenantMgr.createTenant( null, ServerRepositoryPaths.getPentahoRootFolderName(), tenantAdminRoleName,
            tenantAuthenticatedRoleName, tenantAnonymousRoleName );
    if ( systemTenant != null ) {
      try {
        userRoleDao.createUser( systemTenant, systemTenantAdminUserName, passwordService
            .decrypt( systemTenantAdminPassword ), "System Tenant User", new String[] { tenantAdminRoleName,
              tenantAuthenticatedRoleName } );
        defaultTenant = tenantMgr.getTenant( JcrTenantUtils.getDefaultTenant().getId() );
        if ( defaultTenant == null ) {
          // We'll create the default tenant here... maybe this isn't the best place.
          defaultTenant =
              tenantMgr.createTenant( systemTenant, TenantUtils.TENANTID_SINGLE_TENANT, tenantAdminRoleName,
                  tenantAuthenticatedRoleName, tenantAnonymousRoleName );
        }
      } catch ( Throwable th ) {
        th.printStackTrace();
      }
View Full Code Here

TOP

Related Classes of org.pentaho.platform.api.mt.ITenantManager

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.