com.atlassian.jira.action
Class ActionContextKit

java.lang.Object
  extended by com.atlassian.jira.action.ActionContextKit

public class ActionContextKit
extends Object

A helper class to clean up the viral ActionContext thread locals

Since:
v4.0

Method Summary
static void resetContext()
          This will reset the current ActionContext ThreadLocal to be a clean slate eg with no references to any Http objects such as request, sessions or responses.
static void setContext(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, javax.servlet.ServletContext servletContext)
          This sets up the ActionContext inside JIRA.
static void setContext(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, javax.servlet.ServletContext servletContext, String actionName)
          This sets up the ActionContext inside JIRA.
static void setContext(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String actionName)
          This sets up the ActionContext inside JIRA.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setContext

public static void setContext(javax.servlet.http.HttpServletRequest httpServletRequest,
                              javax.servlet.http.HttpServletResponse httpServletResponse,
                              javax.servlet.ServletContext servletContext)
This sets up the ActionContext inside JIRA. Make sure you have a strategy in clearing this ActionContext via resetContext()

Parameters:
httpServletRequest - the request in play
httpServletResponse - the response in play
servletContext - the servlet context in play

setContext

public static void setContext(javax.servlet.http.HttpServletRequest httpServletRequest,
                              javax.servlet.http.HttpServletResponse httpServletResponse,
                              String actionName)
This sets up the ActionContext inside JIRA. Make sure you have a strategy in clearing this ActionContext via resetContext()

Parameters:
httpServletRequest - the request in play
httpServletResponse - the response in play
actionName - the current action name to run

setContext

public static void setContext(javax.servlet.http.HttpServletRequest httpServletRequest,
                              javax.servlet.http.HttpServletResponse httpServletResponse,
                              javax.servlet.ServletContext servletContext,
                              String actionName)
This sets up the ActionContext inside JIRA. Make sure you have a strategy in clearing this ActionContext via resetContext()

Parameters:
httpServletRequest - the request in play
httpServletResponse - the response in play
servletContext - the servlet context in play
actionName - the current action name to run

resetContext

public static void resetContext()
This will reset the current ActionContext ThreadLocal to be a clean slate eg with no references to any Http objects such as request, sessions or responses. And calls to getter method will return null.

This is here to help stop JRA-8009



Copyright © 2002-2012 Atlassian. All Rights Reserved.