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
FieldsModifier and TypeFieldDescriptionprotected org.springframework.core.env.Environmentprotected TranslationRequestProcessorFields inherited from class org.springframework.web.filter.GenericFilterBean
loggerFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanvoiddoFilterUnlessIgnored(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain filterChain) intgetOrder()Methods inherited from class org.broadleafcommerce.common.web.filter.AbstractIgnorableFilter
doFilter, isIgnoredMethods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
-
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:
doFilterUnlessIgnoredin classAbstractIgnorableFilter- Throws:
IOExceptionjakarta.servlet.ServletException
-
areTranslationsEnabled
protected boolean areTranslationsEnabled() -
getOrder
public int getOrder()
-