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
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcomputeTenantAdministratorsGroup(String tenantId) static StringcomputeTenantMembersGroup(String tenantId) static StringgetCurrentTenantId(Principal principal) Returns the current tenantId for the givenprincipal, or from the principal stored in the login stack.static StringReturn the Tenant containing the provided DocumentModel if anystatic StringgetTenantDocumentPath(CoreSession session, String tenantId) Returns the path of the tenant document matching thetenantId, ornullif there is no document matching.static StringgetTenantId(String username) Returns the tenantId for the givenusernameif any,nullotherwise.
-
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
principalis used if it is aSystemPrincipal, then the tenantId is retrieved from the Principal matching theSystemPrincipal.getOriginatingUser(). -
getTenantId
Returns the tenantId for the givenusernameif any,nullotherwise. -
getTenantDocumentPath
Returns the path of the tenant document matching thetenantId, ornullif there is no document matching. -
getOwningTenantId
Return the Tenant containing the provided DocumentModel if any- Returns:
- DocumentModel corresponding to the Tenant container, null otherwise
-