Class TranslationFilter

java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.broadleafcommerce.common.web.filter.AbstractIgnorableFilter
org.broadleafcommerce.common.web.filter.TranslationFilter
All Implemented Interfaces:
jakarta.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.core.Ordered, org.springframework.web.context.ServletContextAware

@Component("blTranslationFilter") @ConditionalOnNotAdmin public class TranslationFilter extends AbstractIgnorableFilter
Responsible for setting the necessary attributes on the TranslationConsiderationContext.
Author:
Andre Azzolini (apazzolini), bpolster
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.springframework.core.env.Environment
     
     

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

    logger

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
     
    void
    doFilterUnlessIgnored(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain filterChain)
     
    int
     

    Methods inherited from class org.broadleafcommerce.common.web.filter.AbstractIgnorableFilter

    doFilter, isIgnored

    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, toString, wait, wait, wait
  • Field Details

    • translationRequestProcessor

      @Autowired @Qualifier("blTranslationRequestProcessor") protected TranslationRequestProcessor translationRequestProcessor
    • env

      @Autowired protected org.springframework.core.env.Environment env
  • Constructor Details

    • TranslationFilter

      public TranslationFilter()
  • Method Details

    • doFilterUnlessIgnored

      public void doFilterUnlessIgnored(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain filterChain) throws IOException, jakarta.servlet.ServletException
      Specified by:
      doFilterUnlessIgnored in class AbstractIgnorableFilter
      Throws:
      IOException
      jakarta.servlet.ServletException
    • areTranslationsEnabled

      protected boolean areTranslationsEnabled()
    • getOrder

      public int getOrder()