eXo Kernel :: Container 2.4.4-CLD

org.exoplatform.container.multitenancy.bridge
Interface CurrentTenantLookup


public interface CurrentTenantLookup

A lookup mechanism to find a Current Tenant. This mechanism provides isolation between the Container and an actual implementation of Multitenancy.
Implementations of this interface can provide different algorithms for an actual lookup.

Author:
Peter Nedonosko

Method Summary
 Tenant getCurrentTenant()
          Return Current Tenant descriptor or throw CurrentTenantNotSetException if Current Tenant not set in current thread.
Current Tenant can be not set in two cases: Thread runs not in a context of multitenant request (e.g.
 boolean hasCurrentTenant()
          Answers if Current Tenant is set in current thread.
 

Method Detail

getCurrentTenant

Tenant getCurrentTenant()
                        throws CurrentTenantNotSetException
Return Current Tenant descriptor or throw CurrentTenantNotSetException if Current Tenant not set in current thread.
Current Tenant can be not set in two cases: In both cases an application should not rely on multitenant environment in this thread.

Returns:
Tenant
Throws:
CurrentTenantNotSetException - if current tenant not set.

hasCurrentTenant

boolean hasCurrentTenant()
Answers if Current Tenant is set in current thread. See getCurrentTenant() for details.

Returns:
boolean, true if current tenant is set in current thread, false otherwise.
See Also:
getCurrentTenant()

eXo Kernel :: Container 2.4.4-CLD

Copyright © 2013 eXo Platform SAS. All Rights Reserved.