|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wso2.carbon.context.CarbonContext
org.wso2.carbon.context.PrivilegedCarbonContext
public class PrivilegedCarbonContext
This CarbonContext provides users the ability to carry out privileged actions such as switching tenant flows, setting tenant ID etc.
| Method Summary | |
|---|---|
static void |
destroyCurrentContext()
|
static void |
endTenantFlow()
This will end the tenant flow and restore the previous CarbonContext. |
Object |
getOSGiService(Class clazz)
Deprecated. please use getOSGiService(Class, java.util.Hashtable)instead |
Object |
getOSGiService(Class clazz,
Hashtable<String,String> props)
Obtain the first OSGi service found for interface or class clazz and props |
List<Object> |
getOSGiServices(Class clazz)
Deprecated. please use getOSGiServices(Class, java.util.Hashtable) instead |
List<Object> |
getOSGiServices(Class clazz,
Hashtable<String,String> props)
Obtain the OSGi services found for interface or class clazz and props |
org.wso2.carbon.registry.api.Registry |
getRegistry(RegistryType type)
Method to obtain an instance of a registry on this CarbonContext instance. |
String |
getTenantDomain(boolean resolve)
Method to obtain the tenant domain on this CarbonContext instance. |
int |
getTenantId(boolean resolve)
Method to obtain the tenant id on this CarbonContext instance. |
static PrivilegedCarbonContext |
getThreadLocalCarbonContext()
|
void |
setApplicationName(String applicationName)
|
void |
setRegistry(RegistryType type,
org.wso2.carbon.registry.api.Registry registry)
Method to set an instance of a registry on this CarbonContext instance. |
void |
setTenantDomain(String tenantDomain)
Method to set the tenant domain on this CarbonContext instance. |
void |
setTenantDomain(String tenantDomain,
boolean resolveTenantId)
Method to set the tenant domain on this CarbonContext instance. |
void |
setTenantId(int tenantId)
Method to set the tenant id on this CarbonContext instance. |
void |
setTenantId(int tenantId,
boolean resolveTenantDomain)
Method to set the tenant id on this CarbonContext instance. |
void |
setUsername(String username)
Method to set the username on this CarbonContext instance. |
void |
setUserRealm(org.wso2.carbon.user.api.UserRealm userRealm)
|
static void |
startTenantFlow()
Starts a tenant flow. |
static void |
unloadTenant(int tenantId)
|
| Methods inherited from class org.wso2.carbon.context.CarbonContext |
|---|
createFilter, discover, getApplicationName, getCarbonContextDataHolder, getJNDIContext, getJNDIContext, getQueue, getTenantDomain, getTenantId, getUsername, getUserRealm |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void startTenantFlow()
CarbonContextDataHolder.startTenantFlow()public static void endTenantFlow()
CarbonContextDataHolder.endTenantFlow()public static void unloadTenant(int tenantId)
public static void destroyCurrentContext()
public static PrivilegedCarbonContext getThreadLocalCarbonContext()
public void setTenantId(int tenantId)
tenantId - the tenant id.
public void setTenantId(int tenantId,
boolean resolveTenantDomain)
tenantId - the tenant id.resolveTenantDomain - whether the tenant domain should be calculated based on this
tenant id.public void setUsername(String username)
username - the username.public void setTenantDomain(String tenantDomain)
tenantDomain - the tenant domain.
public void setTenantDomain(String tenantDomain,
boolean resolveTenantId)
tenantDomain - the tenant domain.resolveTenantId - whether the tenant id should be calculated based on this tenant
domain.public String getTenantDomain(boolean resolve)
resolve - whether the tenant domain should be calculated based on the tenant id that is
already known.
public int getTenantId(boolean resolve)
resolve - whether the tenant id should be calculated based on the tenant domain that is
already known.
public void setRegistry(RegistryType type,
org.wso2.carbon.registry.api.Registry registry)
type - the type of registry to set.registry - the registry instance.public org.wso2.carbon.registry.api.Registry getRegistry(RegistryType type)
getRegistry in class CarbonContexttype - the type of registry required.
public void setUserRealm(org.wso2.carbon.user.api.UserRealm userRealm)
@Deprecated public Object getOSGiService(Class clazz)
getOSGiService(Class, java.util.Hashtable)instead
clazz
getOSGiService in class CarbonContextclazz - The type of the OSGi service
@Deprecated public List<Object> getOSGiServices(Class clazz)
getOSGiServices(Class, java.util.Hashtable) instead
clazz
getOSGiServices in class CarbonContextclazz - The type of the OSGi service
public Object getOSGiService(Class clazz,
Hashtable<String,String> props)
clazz and props
getOSGiService in class CarbonContextprops - attribute list that filter the serviceclazz - The type of the OSGi service
public List<Object> getOSGiServices(Class clazz,
Hashtable<String,String> props)
clazz and props
getOSGiServices in class CarbonContextprops - attribute list that filter the service listclazz - The type of the OSGi service
public void setApplicationName(String applicationName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||