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:
- javax.servlet.Filter
public class NuxeoRequestControllerFilter
- extends java.lang.Object
- implements javax.servlet.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
Method Summary |
static void |
addCacheHeader(javax.servlet.http.HttpServletResponse httpResponse,
java.lang.Boolean isPrivate,
java.lang.String cacheTime)
Set cache parameters to httpResponse. |
void |
destroy()
|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
|
static java.lang.String |
doFormatLogMessage(javax.servlet.http.HttpServletRequest request,
java.lang.String info)
|
void |
init(javax.servlet.FilterConfig filterConfig)
|
static boolean |
simpleReleaseSyncOnSession(javax.servlet.http.HttpServletRequest request)
Releases the Lock if present in the HttpSession. |
static boolean |
simpleSyncOnSession(javax.servlet.http.HttpServletRequest request)
Synchronizes the HttpSession. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HTTP_EXPIRES_DATE_FORMAT
public static final java.text.DateFormat HTTP_EXPIRES_DATE_FORMAT
NuxeoRequestControllerFilter
public NuxeoRequestControllerFilter()
init
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
- Specified by:
init
in interface javax.servlet.Filter
- Throws:
javax.servlet.ServletException
doFormatLogMessage
public static java.lang.String doFormatLogMessage(javax.servlet.http.HttpServletRequest request,
java.lang.String info)
doFilter
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
- Specified by:
doFilter
in interface javax.servlet.Filter
- Throws:
java.io.IOException
javax.servlet.ServletException
simpleSyncOnSession
public static boolean simpleSyncOnSession(javax.servlet.http.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(javax.servlet.http.HttpServletRequest request)
- Releases the
Lock
if present in the HttpSession.
addCacheHeader
public static void addCacheHeader(javax.servlet.http.HttpServletResponse httpResponse,
java.lang.Boolean isPrivate,
java.lang.String cacheTime)
- Set cache parameters to httpResponse.
destroy
public void destroy()
- Specified by:
destroy
in interface javax.servlet.Filter
Copyright © 2010 Nuxeo SAS. All Rights Reserved.