com.liferay.portal.servlet.filters.minifier
Class MinifierFilter
java.lang.Object
com.liferay.portal.kernel.servlet.BaseFilter
com.liferay.portal.servlet.filters.BasePortalFilter
com.liferay.portal.servlet.filters.minifier.MinifierFilter
- All Implemented Interfaces:
- javax.servlet.Filter
public class MinifierFilter
- extends BasePortalFilter
View Source
- Author:
- Brian Wing Shun Chan
Method Summary |
protected java.lang.String |
aggregateCss(java.lang.String dir,
java.lang.String content)
|
protected java.lang.String |
getMinifiedBundleContent(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected java.lang.String |
getMinifiedContent(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain filterChain)
|
void |
init(javax.servlet.FilterConfig filterConfig)
|
protected java.lang.String |
minifyCss(javax.servlet.http.HttpServletRequest request,
java.io.File file)
|
protected java.lang.String |
minifyCss(javax.servlet.http.HttpServletRequest request,
java.lang.String content)
|
protected java.lang.String |
minifyJavaScript(java.io.File file)
|
protected java.lang.String |
minifyJavaScript(java.lang.String content)
|
protected void |
processFilter(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain filterChain)
|
Methods inherited from class com.liferay.portal.kernel.servlet.BaseFilter |
destroy, doFilter, getFilterConfig, processFilter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MinifierFilter
public MinifierFilter()
init
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
- Specified by:
init
in interface javax.servlet.Filter
- Overrides:
init
in class com.liferay.portal.kernel.servlet.BaseFilter
- Throws:
javax.servlet.ServletException
aggregateCss
protected java.lang.String aggregateCss(java.lang.String dir,
java.lang.String content)
throws java.io.IOException
- Throws:
java.io.IOException
getMinifiedBundleContent
protected java.lang.String getMinifiedBundleContent(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
- Throws:
java.io.IOException
getMinifiedContent
protected java.lang.String getMinifiedContent(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain filterChain)
throws java.io.IOException,
javax.servlet.ServletException
- Throws:
java.io.IOException
javax.servlet.ServletException
minifyCss
protected java.lang.String minifyCss(javax.servlet.http.HttpServletRequest request,
java.io.File file)
throws java.io.IOException
- Throws:
java.io.IOException
minifyCss
protected java.lang.String minifyCss(javax.servlet.http.HttpServletRequest request,
java.lang.String content)
minifyJavaScript
protected java.lang.String minifyJavaScript(java.io.File file)
throws java.io.IOException
- Throws:
java.io.IOException
minifyJavaScript
protected java.lang.String minifyJavaScript(java.lang.String content)
processFilter
protected void processFilter(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain filterChain)
throws java.io.IOException,
javax.servlet.ServletException
- Specified by:
processFilter
in class com.liferay.portal.kernel.servlet.BaseFilter
- Throws:
java.io.IOException
javax.servlet.ServletException