Search in sources :

Example 1 with SlingComponentFilterChain

use of org.apache.sling.engine.impl.filter.SlingComponentFilterChain in project sling by apache.

the class SlingRequestProcessorImpl method processComponent.

/**
     * Renders the component defined by the RequestData's current ComponentData
     * instance after calling all filters of the given
     * {@link org.apache.sling.engine.impl.filter.ServletFilterManager.FilterChainType
     * filterChainType}.
     *
     * @param request
     * @param response
     * @param filterChainType
     * @throws IOException
     * @throws ServletException
     */
public void processComponent(SlingHttpServletRequest request, SlingHttpServletResponse response, final FilterChainType filterChainType) throws IOException, ServletException {
    FilterHandle[] filters = filterManager.getFilters(filterChainType);
    if (filters != null) {
        FilterChain processor = new SlingComponentFilterChain(filters);
        request.getRequestProgressTracker().log("Applying " + filterChainType + "filters");
        processor.doFilter(request, response);
    } else {
        log.debug("service: No Resource level filters, calling servlet");
        RequestData.service(request, response);
    }
}
Also used : SlingComponentFilterChain(org.apache.sling.engine.impl.filter.SlingComponentFilterChain) FilterHandle(org.apache.sling.engine.impl.filter.FilterHandle) RequestSlingFilterChain(org.apache.sling.engine.impl.filter.RequestSlingFilterChain) SlingComponentFilterChain(org.apache.sling.engine.impl.filter.SlingComponentFilterChain) FilterChain(javax.servlet.FilterChain) AbstractSlingFilterChain(org.apache.sling.engine.impl.filter.AbstractSlingFilterChain)

Aggregations

FilterChain (javax.servlet.FilterChain)1 AbstractSlingFilterChain (org.apache.sling.engine.impl.filter.AbstractSlingFilterChain)1 FilterHandle (org.apache.sling.engine.impl.filter.FilterHandle)1 RequestSlingFilterChain (org.apache.sling.engine.impl.filter.RequestSlingFilterChain)1 SlingComponentFilterChain (org.apache.sling.engine.impl.filter.SlingComponentFilterChain)1