Package org.nuxeo.ecm.multi.tenant
Class MultiTenantHelper
java.lang.Object
org.nuxeo.ecm.multi.tenant.MultiTenantHelper
- Since:
- 5.6
- Author:
- Thomas Roger
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
computeTenantAdministratorsGroup
(String tenantId) static String
computeTenantMembersGroup
(String tenantId) static String
getCurrentTenantId
(Principal principal) Returns the current tenantId for the givenprincipal
, or from the principal stored in the login stack.static String
Return the Tenant containing the provided DocumentModel if anystatic String
getTenantDocumentPath
(CoreSession session, String tenantId) Returns the path of the tenant document matching thetenantId
, ornull
if there is no document matching.static String
getTenantId
(String username) Returns the tenantId for the givenusername
if any,null
otherwise.
-
Field Details
-
CACHE_CONCURRENCY_LEVEL
-
CACHE_MAXIMUM_SIZE
-
CACHE_TIMEOUT
-
NO_TENANT
- See Also:
-
pathCache
-
tenantBinding
-
-
Method Details
-
computeTenantAdministratorsGroup
-
computeTenantMembersGroup
-
getCurrentTenantId
Returns the current tenantId for the givenprincipal
, or from the principal stored in the login stack.The
principal
is used if it is aSystemPrincipal
, then the tenantId is retrieved from the Principal matching theSystemPrincipal.getOriginatingUser()
. -
getTenantId
Returns the tenantId for the givenusername
if any,null
otherwise. -
getTenantDocumentPath
Returns the path of the tenant document matching thetenantId
, ornull
if there is no document matching. -
getOwningTenantId
Return the Tenant containing the provided DocumentModel if any- Returns:
- DocumentModel corresponding to the Tenant container, null otherwise
-