Class TenantUtils

java.lang.Object
org.craftercms.security.utils.tenant.TenantUtils

public class TenantUtils extends Object
Tenant related utility methods.
Author:
avasquez
  • Method Details

    • getTenantNames

      public static List<String> getTenantNames(TenantService tenantService) throws ProfileException
      Returns a list with the names of all tenants.
      Parameters:
      tenantService - the service that retrieves the Tenants.
      Returns:
      the list of tenant names
      Throws:
      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.