|
|
@ -62,17 +62,18 @@ public class APIApplicationManagerExtensionDataHolder {
|
|
|
|
|
|
|
|
|
|
|
|
public void setRealmService(RealmService realmService) {
|
|
|
|
public void setRealmService(RealmService realmService) {
|
|
|
|
this.realmService = realmService;
|
|
|
|
this.realmService = realmService;
|
|
|
|
this.setTenantManager(realmService);
|
|
|
|
setTenantManager(realmService != null ?
|
|
|
|
|
|
|
|
realmService.getTenantManager() : null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void setTenantManager(RealmService realmService) {
|
|
|
|
private void setTenantManager(TenantManager tenantManager) {
|
|
|
|
if (realmService == null) {
|
|
|
|
this.tenantManager = tenantManager;
|
|
|
|
throw new IllegalStateException("Realm service is not initialized properly");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.tenantManager = realmService.getTenantManager();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public TenantManager getTenantManager() {
|
|
|
|
public TenantManager getTenantManager() {
|
|
|
|
|
|
|
|
if (tenantManager == null) {
|
|
|
|
|
|
|
|
throw new IllegalStateException("Tenant manager is not initialized properly");
|
|
|
|
|
|
|
|
}
|
|
|
|
return tenantManager;
|
|
|
|
return tenantManager;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|