org.nuxeo.ecm.platform.web.common.requestcontroller.filter
Class NuxeoRequestControllerFilter
java.lang.Object
org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoRequestControllerFilter
- All Implemented Interfaces:
- Filter
public class NuxeoRequestControllerFilter
- extends Object
- implements Filter
Filter to handle Transactions and Requests synchronization. This filter is
useful when accessing web resources that are not protected by Seam Filter.
This is the case for specific Servlets, WebEngine, XML-RPC connector ...
- Author:
- tiry
HTTP_EXPIRES_DATE_FORMAT
public static final DateFormat HTTP_EXPIRES_DATE_FORMAT
NuxeoRequestControllerFilter
public NuxeoRequestControllerFilter()
init
public void init(FilterConfig filterConfig)
throws ServletException
- Specified by:
init
in interface Filter
- Throws:
ServletException
doFormatLogMessage
public static String doFormatLogMessage(HttpServletRequest request,
String info)
doFilter
public void doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
throws IOException,
ServletException
- Specified by:
doFilter
in interface Filter
- Throws:
IOException
ServletException
simpleSyncOnSession
public static boolean simpleSyncOnSession(HttpServletRequest request)
- Synchronizes the HttpSession.
Uses a Lock
object in the HttpSession and locks it. If
HttpSession is not created, exits without locking anything.
simpleReleaseSyncOnSession
public static boolean simpleReleaseSyncOnSession(HttpServletRequest request)
- Releases the
Lock
if present in the HttpSession.
addCacheHeader
public static void addCacheHeader(HttpServletResponse httpResponse,
Boolean isPrivate,
String cacheTime)
- Set cache parameters to httpResponse.
destroy
public void destroy()
- Specified by:
destroy
in interface Filter
Copyright © 2011 Nuxeo SAS. All Rights Reserved.