Class BroadleafAdminTypedEntityRequestFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
org.broadleafcommerce.common.web.filter.AbstractIgnorableOncePerRequestFilter
org.broadleafcommerce.openadmin.web.filter.AbstractBroadleafAdminRequestFilter
org.broadleafcommerce.openadmin.web.filter.BroadleafAdminTypedEntityRequestFilter
- 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("blAdminTypedEntityRequestFilter")
public class BroadleafAdminTypedEntityRequestFilter
extends AbstractBroadleafAdminRequestFilter
Responsible for setting the necessary attributes on the BroadleafRequestContext
- Author:
- Jon Fleschler (jfleschler)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AdminNavigationServiceprotected SecurityVerifierprotected BroadleafWebRequestProcessorFields inherited from class org.springframework.web.filter.OncePerRequestFilter
ALREADY_FILTERED_SUFFIXFields 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 booleanadminUserHasAccess(AdminSection typedEntitySection) voiddoFilterInternalUnlessIgnored(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain) protected DynamicEntityDaogetDynamicEntityDao(String className) protected StringgetEntityTypeFromRequest(jakarta.servlet.http.HttpServletRequest request) intgetOrder()protected StringgetSectionKeyFromRequest(jakarta.servlet.http.HttpServletRequest request) protected StringgetTypeAdminSectionMismatchUrl(TypedEntity typedEntity, String ceilingEntity, String uri, String sectionKey) protected TypedEntitygetTypedEntityFromServletPathId(String servletPath, String ceilingEntity) protected StringgetTypeFieldName(AdminSection adminSection) booleanisRequestForTypedEntity(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) protected booleantypeMatchesAdminSection(TypedEntity typedEntity, String sectionKey) Methods inherited from class org.broadleafcommerce.openadmin.web.filter.AbstractBroadleafAdminRequestFilter
getIgnoreSuffixes, shouldProcessURLMethods inherited from class org.broadleafcommerce.common.web.filter.AbstractIgnorableOncePerRequestFilter
doFilterInternal, isIgnoredMethods inherited from class org.springframework.web.filter.OncePerRequestFilter
doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatchMethods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
-
Field Details
-
requestProcessor
@Autowired @Qualifier("blAdminRequestProcessor") protected BroadleafWebRequestProcessor requestProcessor -
adminRemoteSecurityService
@Autowired @Qualifier("blAdminSecurityRemoteService") protected SecurityVerifier adminRemoteSecurityService
-
-
Constructor Details
-
BroadleafAdminTypedEntityRequestFilter
public BroadleafAdminTypedEntityRequestFilter()
-
-
Method Details
-
doFilterInternalUnlessIgnored
public void doFilterInternalUnlessIgnored(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain) throws IOException, jakarta.servlet.ServletException - Specified by:
doFilterInternalUnlessIgnoredin classAbstractIgnorableOncePerRequestFilter- Throws:
IOExceptionjakarta.servlet.ServletException
-
isRequestForTypedEntity
public boolean isRequestForTypedEntity(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException - Throws:
jakarta.servlet.ServletExceptionIOException
-
getTypedEntityFromServletPathId
-
getTypeAdminSectionMismatchUrl
protected String getTypeAdminSectionMismatchUrl(TypedEntity typedEntity, String ceilingEntity, String uri, String sectionKey) -
typeMatchesAdminSection
-
adminUserHasAccess
-
getEntityTypeFromRequest
-
getSectionKeyFromRequest
-
getTypeFieldName
-
getDynamicEntityDao
-
getOrder
public int getOrder()
-