|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.util.velocity.DefaultVelocityRequestContextFactory
public class DefaultVelocityRequestContextFactory
Return an instance of VelocityRequestContext
, depending on whether we are called from a web or non-web context.
VelocityRequestContext
.
Constructor Summary | |
---|---|
DefaultVelocityRequestContextFactory()
Deprecated. Please use DefaultVelocityRequestContextFactory(com.atlassian.jira.config.properties.ApplicationProperties) instead |
|
DefaultVelocityRequestContextFactory(ApplicationProperties applicationProperties)
|
Method Summary | |
---|---|
static void |
cacheVelocityRequestContext(javax.servlet.http.HttpServletRequest request)
Called from a servlet filter. |
static void |
cacheVelocityRequestContext(String baseUrl,
javax.servlet.http.HttpServletRequest request)
Should be called from a servlet filter before the request gets a chance to run |
void |
cacheVelocityRequestContext(VelocityRequestContext velocityRequestContext)
Update the threadlocal storage with the given velocityRequestContext. |
void |
clearVelocityRequestContext()
Resets the thread local storage as if no request has occurred, effectively nulling out the current thread local velocity request context. |
Map<String,Object> |
getDefaultVelocityParams(Map<String,Object> startingParams,
JiraAuthenticationContext authenticationContext)
Constructs a map with a number of common parameters used by velocity templates. |
VelocityRequestContext |
getJiraVelocityRequestContext()
Get the request context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultVelocityRequestContextFactory(ApplicationProperties applicationProperties)
public DefaultVelocityRequestContextFactory()
DefaultVelocityRequestContextFactory(com.atlassian.jira.config.properties.ApplicationProperties)
instead
Method Detail |
---|
public VelocityRequestContext getJiraVelocityRequestContext()
VelocityRequestContextFactory
getJiraVelocityRequestContext
in interface VelocityRequestContextFactory
public Map<String,Object> getDefaultVelocityParams(Map<String,Object> startingParams, JiraAuthenticationContext authenticationContext)
VelocityRequestContextFactory
getDefaultVelocityParams
in interface VelocityRequestContextFactory
startingParams
- Map of parameters that may be used to override any of the parameters set here.authenticationContext
- JiraAuthenticationContext
public static void cacheVelocityRequestContext(javax.servlet.http.HttpServletRequest request)
HttpServletRequest.getContextPath()
along as the baseUrl.
request
- The HttpServletRequest used to construct the RequestContextParameterHolder
public static void cacheVelocityRequestContext(String baseUrl, javax.servlet.http.HttpServletRequest request)
baseUrl
- Should pass in HttpServletRequest.getContextPath()
request
- The HttpServletRequest used to construct the RequestContextParameterHolder
public void cacheVelocityRequestContext(VelocityRequestContext velocityRequestContext)
VelocityRequestContextFactory
cacheVelocityRequestContext
in interface VelocityRequestContextFactory
velocityRequestContext
- The velocity request context to storepublic void clearVelocityRequestContext()
VelocityRequestContextFactory
clearVelocityRequestContext
in interface VelocityRequestContextFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |