Package fr.paris.lutece.portal.web
Class LocalVariables
java.lang.Object
fr.paris.lutece.portal.web.LocalVariables
Tools class to transmit config, request and response servlet parameters using
ThreadLocal.-
Method Summary
Modifier and TypeMethodDescriptionstatic jakarta.servlet.ServletConfigReadServletConfigassociate to the current threadstatic LocaleReadLocaleassociate to the current threadstatic jakarta.servlet.http.HttpServletRequestReadHttpServletRequestassociate to the current threadstatic jakarta.servlet.http.HttpServletResponseReadHttpServletResponseassociate to the current threadstatic voidremove()Removes the current thread's value for this thread-localstatic voidsetLocal(jakarta.servlet.ServletConfig config, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Initialize thread locals variables
-
Method Details
-
setLocal
public static void setLocal(jakarta.servlet.ServletConfig config, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Initialize thread locals variables- Parameters:
config- CurrentServletConfigto associate to the threadrequest- CurrentHttpServletRequestto associate to the threadresponse- CurrentHttpServletResponseto associate to the thread
-
getConfig
public static jakarta.servlet.ServletConfig getConfig()ReadServletConfigassociate to the current thread- Returns:
- the
ServletConfigassociate to the current thread
-
getRequest
public static jakarta.servlet.http.HttpServletRequest getRequest()ReadHttpServletRequestassociate to the current thread- Returns:
- the
HttpServletRequestassociate to the current thread
-
getResponse
public static jakarta.servlet.http.HttpServletResponse getResponse()ReadHttpServletResponseassociate to the current thread- Returns:
- the
HttpServletResponseassociate to the current thread
-
getLocale
ReadLocaleassociate to the current thread- Returns:
- the
Localeassociate to the current thread
-
remove
public static void remove()Removes the current thread's value for this thread-local
-