Class DefaultTenantAccess

java.lang.Object
org.eclnt.jsfserver.util.useraccess.DefaultTenantAccess
All Implemented Interfaces:
ITenantAccess

public class DefaultTenantAccess extends Object implements ITenantAccess
Default implementation of ITenantAccess.

The tenant that is currently active is either passed via associateTenantWithCurrentSession(String). Internally this tenant information is stored in the http session.

If there is no http session available then the tenant may also be passed by associateTenantWithCurrentThread(String).
  • Constructor Details

    • DefaultTenantAccess

      public DefaultTenantAccess()
  • Method Details

    • getCurrentTenant

      public String getCurrentTenant(javax.faces.context.FacesContext context)
    • getCurrentTenant

      public String getCurrentTenant()
      Description copied from interface: ITenantAccess
      Get tenant that is associated with the current context.
      Specified by:
      getCurrentTenant in interface ITenantAccess
    • associateTenantWithCurrentSession

      public static void associateTenantWithCurrentSession(String tenant)
      Passes the tenant into the current session.

      This method is the normal one to be used within your application processing (i.e. running within the CC-/JSF-context). If you want to pass the tenant from some servlet-filter processing use #associateTenantWithSession(HttpServletRequest, String).
    • associateTenantWithCurrentSession

      public static void associateTenantWithCurrentSession(javax.servlet.http.HttpServletRequest request, String tenant)
      Passes the tenant into the current session.

      Special implementation to be used from servlet-filters which are arranged in front of the CC filter processing (ThreadingFilter).
    • clearTenantWithCurrentSession

      public static void clearTenantWithCurrentSession()
    • associateTenantWithCurrentThread

      public static void associateTenantWithCurrentThread(String tenant)
    • clearTenantWithCurrentThread

      public static void clearTenantWithCurrentThread()