Class TenantUtils
- java.lang.Object
-
- org.craftercms.security.utils.tenant.TenantUtils
-
public class TenantUtils extends Object
Tenant related utility methods.- Author:
- avasquez
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getCurrentTenantName()
Returns the current tenant name, which is the tenant of the currently authenticated profile.static List<String>
getTenantNames(org.craftercms.profile.api.services.TenantService tenantService)
Returns a list with the names of all tenants.
-
-
-
Method Detail
-
getTenantNames
public static List<String> getTenantNames(org.craftercms.profile.api.services.TenantService tenantService) throws org.craftercms.profile.api.exceptions.ProfileException
Returns a list with the names of all tenants.- Parameters:
tenantService
- the service that retrieves theTenant
s.- Returns:
- the list of tenant names
- Throws:
org.craftercms.profile.api.exceptions.ProfileException
-
getCurrentTenantName
public static String getCurrentTenantName()
Returns the current tenant name, which is the tenant of the currently authenticated profile.- Returns:
- the current tenant name.
-
-