Class TenantActivationFilter

  • All Implemented Interfaces:
    javax.servlet.Filter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.EnvironmentAware, org.springframework.core.env.EnvironmentCapable, org.springframework.web.context.ServletContextAware

    @Deprecated
    public class TenantActivationFilter
    extends org.springframework.web.filter.GenericFilterBean
    Deprecated.
    since ages - please use the filter chain.
    Filter which takes care of setting and unsetting the current tenant during request processing. If no tenantId is specified (by using the constructor TenantActivationFilter(String) the master tenant is used.
    • Field Summary

      • Fields inherited from class org.springframework.web.filter.GenericFilterBean

        logger
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void doFilter​(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain filterChain)
      Deprecated.
      Before the control is passed on to the filterChain setCurrentTenant() is called.
      protected void setCurrentTenant()
      Deprecated.
      Sets current tenant by calling Registry.setCurrentTenantByID(String) using the configured tenantId.
      java.lang.String toString()
      Deprecated.
       
      void unsetCurrentTenant()
      Deprecated.
      Unsets current tenant by calling Registry.unsetCurrentTenant().
      • Methods inherited from class org.springframework.web.filter.GenericFilterBean

        addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TenantActivationFilter

        public TenantActivationFilter()
        Deprecated.
        Convenience constructor using the constructor TenantActivationFilter(String) with 'master' as the tenantId.
      • TenantActivationFilter

        public TenantActivationFilter​(java.lang.String tenantId)
        Deprecated.
        This constructor checks if a tenant with specified tenantId does exist. If not, an IllegalArgumentException is thrown.
        Parameters:
        tenantId - the id of the tenant which will be activated before the rest of the chain gets executed and deactivated at the end.
        Throws:
        java.lang.IllegalArgumentException - is specified tenant does not exist.
    • Method Detail

      • doFilter

        public void doFilter​(javax.servlet.ServletRequest request,
                             javax.servlet.ServletResponse response,
                             javax.servlet.FilterChain filterChain)
                      throws java.io.IOException,
                             javax.servlet.ServletException
        Deprecated.
        Before the control is passed on to the filterChain setCurrentTenant() is called. After the filerChain has been processed, unsetCurrentTenant() gets called.
        Parameters:
        request - the request
        response - the response
        filterChain - the filterChain
        Throws:
        java.io.IOException
        javax.servlet.ServletException
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object