info.magnolia.cms.filters
Class ContentTypeFilter
java.lang.Object
info.magnolia.cms.filters.AbstractMgnlFilter
info.magnolia.cms.filters.ContentTypeFilter
- All Implemented Interfaces:
- MgnlFilter, javax.servlet.Filter
public class ContentTypeFilter
- extends AbstractMgnlFilter
Sets content type and encoding for requests based on the uri extension and prepares uri path information in the
aggregation state.
TODO : rename this filter. What it really does is initialize and setup the basic,
non-content related attributes of the AggregationState. ContentType could become an
attribute of the AggregationState too and could be set later.
FIXME: the original uri should not be reset, MAGNOLIA-3204
- Version:
- $Id: ContentTypeFilter.java 53336 2012-01-12 09:42:40Z ochytil $
- See Also:
MIMEMapping
,
AggregationState
Methods inherited from class info.magnolia.cms.filters.AbstractMgnlFilter |
acceptsEncoding, acceptsGzipEncoding, addAndVerifyHeader, addBypass, addMapping, bypasses, destroy, doFilter, getBypasses, getDispatching, getMapping, getMappings, getName, headerContains, init, isEnabled, mapsTo, matches, matchesDispatching, setDispatching, setEnabled, setName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContentTypeFilter
public ContentTypeFilter()
doFilter
public void doFilter(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
- Specified by:
doFilter
in class AbstractMgnlFilter
- Throws:
IOException
javax.servlet.ServletException
getUriExtension
protected String getUriExtension(String uri)
setupContentTypeAndCharacterEncoding
protected String setupContentTypeAndCharacterEncoding(String extension,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.