Package io.jmix.multitenancy.core
Interface TenantProvider
- All Known Implementing Classes:
TenantProviderImpl
public interface TenantProvider
Provides the tenant id for user.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstant to be returned bygetCurrentUserTenantId()if tenant is currently not determined. -
Method Summary
Modifier and TypeMethodDescriptionReturns the current tenant id, orNO_TENANTconstant if tenant is currently not determined.default StringgetTenantIdForUser(org.springframework.security.core.userdetails.UserDetails userDetails) Returns tenant id for provided user, orNO_TENANTconstant if tenant is currently not determined.
-
Field Details
-
NO_TENANT
Constant to be returned bygetCurrentUserTenantId()if tenant is currently not determined.- See Also:
-
-
Method Details
-
getCurrentUserTenantId
String getCurrentUserTenantId()Returns the current tenant id, orNO_TENANTconstant if tenant is currently not determined. -
getTenantIdForUser
default String getTenantIdForUser(org.springframework.security.core.userdetails.UserDetails userDetails) Returns tenant id for provided user, orNO_TENANTconstant if tenant is currently not determined.- Parameters:
userDetails- user- Returns:
- tenant id
-