public class ScpCfTenantFacade extends AbstractTenantFacade
Constructor and Description |
---|
ScpCfTenantFacade() |
Modifier and Type | Method and Description |
---|---|
protected Optional<Tenant> |
getMockedTenantAsFallback()
Returns a mocked
Tenant as fallback, if the environment variable "ALLOW_MOCKED_AUTH_HEADER" is set to
"true". |
Class<ScpCfTenant> |
getTenantClass()
Returns the platform-specific implementation class of
Tenant . |
protected Tenant |
newMockedTenant()
Instantiates a mocked
Tenant . |
Optional<Tenant> |
resolveCurrentTenant()
Resolves the current
Tenant using the platform-specific lookup. |
getCurrentTenant, getCurrentTenantIfAvailable, getMockedTenant
@Nonnull public Class<ScpCfTenant> getTenantClass()
Tenant
. For internal use only.@Nonnull protected Tenant newMockedTenant()
Tenant
.newMockedTenant
in class AbstractTenantFacade
Tenant
.@Nonnull protected Optional<Tenant> getMockedTenantAsFallback()
Tenant
as fallback, if the environment variable "ALLOW_MOCKED_AUTH_HEADER" is set to
"true".Tenant
.@Nonnull public Optional<Tenant> resolveCurrentTenant() throws TenantAccessException
Tenant
using the platform-specific lookup. For more details on the availability of a
tenant, refer to TenantFacade.getCurrentTenantIfAvailable()
.
For internal use only.
Caution: This method must only be invoked within the container-managed thread of a request.
Optional
of the current Tenant
.TenantAccessException
- If there is an issue while resolving the Tenant
.TenantRequestContextListener
Copyright © 2018 SAP SE. All rights reserved.