public final class TenantAccessor extends Object
Constructor and Description |
---|
TenantAccessor() |
Modifier and Type | Method and Description |
---|---|
static Tenant |
getCurrentTenant()
Returns the current
Tenant . |
static TenantFacade |
getTenantFacade()
Returns the
TenantFacade instance. |
static void |
setTenantFacade(TenantFacade tenantFacade)
Replaces the default
TenantFacade instance. |
public static void setTenantFacade(TenantFacade tenantFacade)
TenantFacade
instance. This method is for internal use only.public static Tenant getCurrentTenant() throws TenantNotAvailableException, TenantAccessException
Tenant
.TenantNotAvailableException
- If there is currently no Tenant
available. This typically occurs when trying to access the
tenant within code that is running outside any tenant context, e.g., within a background task.TenantAccessException
- If there is an issue while accessing the Tenant
.@Nullable public static TenantFacade getTenantFacade()
TenantFacade
instance. For internal use only.Copyright © 2018 SAP SE. All rights reserved.