public class IdentityTenantUtil extends Object
Modifier and Type | Field and Description |
---|---|
protected static ConcurrentHashMap<Integer,Boolean> |
tenantIdMap |
Constructor and Description |
---|
IdentityTenantUtil() |
Modifier and Type | Method and Description |
---|---|
static org.osgi.framework.BundleContext |
getBundleContext() |
static org.wso2.carbon.registry.core.Registry |
getConfigRegistry(int tenantId) |
static String |
getGlobalUserName(String userName) |
static org.wso2.carbon.user.core.UserRealm |
getRealm(String domainName,
String username) |
static org.wso2.carbon.user.core.service.RealmService |
getRealmService()
Deprecated.
Please use OSGI wiring to get the realm service for your component.
|
static org.wso2.carbon.registry.core.Registry |
getRegistry() |
static org.wso2.carbon.registry.core.Registry |
getRegistry(String domainName,
String username) |
static org.wso2.carbon.registry.core.service.RegistryService |
getRegistryService() |
static String |
getTenantDomain(int tenantId) |
static int |
getTenantId(String tenantDomain) |
static int |
getTenantIdOfUser(String username)
Get the tenant id of the given user.
|
static org.wso2.carbon.registry.core.service.TenantRegistryLoader |
getTenantRegistryLoader() |
static void |
initializeRegistry(int tenantId,
String tenantDomain) |
static void |
setBundleContext(org.osgi.framework.BundleContext bundleContext) |
static void |
setRealmService(org.wso2.carbon.user.core.service.RealmService realmService)
Deprecated.
|
static void |
setRegistryService(org.wso2.carbon.registry.core.service.RegistryService registryService) |
static void |
setTenantRegistryLoader(org.wso2.carbon.registry.core.service.TenantRegistryLoader tenantRegistryLoader) |
protected static ConcurrentHashMap<Integer,Boolean> tenantIdMap
public static org.wso2.carbon.registry.core.service.TenantRegistryLoader getTenantRegistryLoader()
public static org.wso2.carbon.registry.core.Registry getConfigRegistry(int tenantId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
org.wso2.carbon.registry.core.exceptions.RegistryException
public static org.wso2.carbon.registry.core.Registry getRegistry(String domainName, String username) throws org.wso2.carbon.identity.base.IdentityException
org.wso2.carbon.identity.base.IdentityException
public static org.wso2.carbon.registry.core.Registry getRegistry() throws org.wso2.carbon.identity.base.IdentityException
org.wso2.carbon.identity.base.IdentityException
public static org.wso2.carbon.user.core.UserRealm getRealm(String domainName, String username) throws org.wso2.carbon.identity.base.IdentityException
org.wso2.carbon.identity.base.IdentityException
public static org.wso2.carbon.registry.core.service.RegistryService getRegistryService()
public static org.osgi.framework.BundleContext getBundleContext()
public static void setRegistryService(org.wso2.carbon.registry.core.service.RegistryService registryService)
@Deprecated public static org.wso2.carbon.user.core.service.RealmService getRealmService()
@Deprecated public static void setRealmService(org.wso2.carbon.user.core.service.RealmService realmService)
public static void setTenantRegistryLoader(org.wso2.carbon.registry.core.service.TenantRegistryLoader tenantRegistryLoader)
public static void setBundleContext(org.osgi.framework.BundleContext bundleContext)
public static void initializeRegistry(int tenantId, String tenantDomain) throws org.wso2.carbon.identity.base.IdentityException
org.wso2.carbon.identity.base.IdentityException
public static int getTenantId(String tenantDomain) throws org.wso2.carbon.identity.base.IdentityRuntimeException
org.wso2.carbon.identity.base.IdentityRuntimeException
public static String getTenantDomain(int tenantId) throws org.wso2.carbon.identity.base.IdentityRuntimeException
org.wso2.carbon.identity.base.IdentityRuntimeException
public static int getTenantIdOfUser(String username) throws org.wso2.carbon.identity.base.IdentityRuntimeException
username
- Usernameorg.wso2.carbon.identity.base.IdentityRuntimeException
- Error when getting the tenant Id from tenant domainCopyright © 2019 WSO2. All rights reserved.