private void createTenantFolderInBonitaHome(final long tenantId) { getBonitaHomeServerInstance().createTenant(tenantId); }
private void createTenantFolderInBonitaHome(final long tenantId) { getBonitaHomeServerInstance().createTenant(tenantId); }
public static long createTenant(final TransactionService transactionService, final PlatformService platformService, final String tenantName, final String createdBy, final String status) throws Exception { try { transactionService.begin(); final long created = System.currentTimeMillis(); final STenantBuilder tenantBuilder = BuilderFactory.get(STenantBuilderFactory.class).createNewInstance(tenantName, createdBy, created, status, false); final STenant tenant = tenantBuilder.done(); platformService.createTenant(tenant); BonitaHomeServer.getInstance().createTenant(tenant.getId()); platformService.activateTenant(tenant.getId()); return tenant.getId(); } finally { transactionService.complete(); } }
public static long createDefaultTenant(final TransactionService transactionService, final PlatformService platformService, final String tenantName, final String createdBy, final String status) throws Exception { try { transactionService.begin(); final long created = System.currentTimeMillis(); final STenantBuilder tenantBuilder = BuilderFactory.get(STenantBuilderFactory.class) .createNewInstance(tenantName, createdBy, created, status, true); final STenant tenant = tenantBuilder.done(); platformService.createTenant(tenant); BonitaHomeServer.getInstance().createTenant(tenant.getId()); platformService.activateTenant(tenant.getId()); return tenant.getId(); } finally { transactionService.complete(); } } }