public class MultiTenantHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
computeTenantAdministratorsGroup(String tenantId) |
static String |
computeTenantMembersGroup(String tenantId) |
static String |
getCurrentTenantId(Principal principal)
Returns the current tenantId for the given
principal, or from the principal stored in the login stack. |
static String |
getOwningTenantId(DocumentModel doc)
Return the Tenant containing the provided DocumentModel if any
|
static String |
getTenantDocumentPath(CoreSession session,
String tenantId)
Returns the path of the tenant document matching the
tenantId, or null if there is no document
matching. |
static String |
getTenantId(String username)
Returns the tenantId for the given
username if any, null otherwise. |
public static String computeTenantAdministratorsGroup(String tenantId)
public static String getCurrentTenantId(Principal principal) throws ClientException
principal, or from the principal stored in the login stack.
The principal is used if it is a SystemPrincipal, then the tenantId is retrieved from the
Principal matching the SystemPrincipal.getOriginatingUser().
ClientExceptionpublic static String getTenantId(String username) throws ClientException
username if any, null otherwise.ClientExceptionpublic static String getTenantDocumentPath(CoreSession session, String tenantId) throws ClientException
tenantId, or null if there is no document
matching.ClientExceptionpublic static String getOwningTenantId(DocumentModel doc) throws ClientException
doc - ClientExceptionCopyright © 2015 Nuxeo SA. All rights reserved.