Class TenantActivationFilter
- java.lang.Object
-
- org.springframework.web.filter.GenericFilterBean
-
- de.hybris.platform.servicelayer.web.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.GenericFilterBeanDeprecated.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 constructorTenantActivationFilter(String)the master tenant is used.
-
-
Constructor Summary
Constructors Constructor Description TenantActivationFilter()Deprecated.Convenience constructor using the constructorTenantActivationFilter(String)with 'master' as the tenantId.TenantActivationFilter(java.lang.String tenantId)Deprecated.This constructor checks if a tenant with specified tenantId does exist.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voiddoFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain filterChain)Deprecated.Before the control is passed on to the filterChainsetCurrentTenant()is called.protected voidsetCurrentTenant()Deprecated.Sets current tenant by callingRegistry.setCurrentTenantByID(String)using the configured tenantId.java.lang.StringtoString()Deprecated.voidunsetCurrentTenant()Deprecated.Unsets current tenant by callingRegistry.unsetCurrentTenant().
-
-
-
Constructor Detail
-
TenantActivationFilter
public TenantActivationFilter()
Deprecated.Convenience constructor using the constructorTenantActivationFilter(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, anIllegalArgumentExceptionis 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.ServletExceptionDeprecated.Before the control is passed on to the filterChainsetCurrentTenant()is called. After the filerChain has been processed,unsetCurrentTenant()gets called.- Parameters:
request- the requestresponse- the responsefilterChain- the filterChain- Throws:
java.io.IOExceptionjavax.servlet.ServletException
-
setCurrentTenant
protected void setCurrentTenant()
Deprecated.Sets current tenant by callingRegistry.setCurrentTenantByID(String)using the configured tenantId.
-
unsetCurrentTenant
public void unsetCurrentTenant()
Deprecated.Unsets current tenant by callingRegistry.unsetCurrentTenant().
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
-