java.lang.Object | |
↳ | com.atlassian.jira.util.velocity.DefaultVelocityRequestContextFactory |
Return an instance of VelocityRequestContext
, depending on whether we are called from a web or non-web context.
The original intention of this class is to get around bugs such as JRA-11038, where velocity fragments are called from both
web and non-web contexts. Originally we tried to proxy HttpServletRequest, but it makes more sense to have a specific interface
VelocityRequestContext
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This constructor is deprecated.
Please use
DefaultVelocityRequestContextFactory(com.atlassian.jira.config.properties.ApplicationProperties) instead
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
Use
setVelocityRequestContext(javax.servlet.http.HttpServletRequest) instead. Since v5.0.
| |||||||||||
This method is deprecated.
Use
setVelocityRequestContext(VelocityRequestContext) instead. Since v5.0.
| |||||||||||
This method is deprecated.
Use
setVelocityRequestContext(String, javax.servlet.http.HttpServletRequest) instead. Since v5.0.
| |||||||||||
Resets the thread local storage as if no request has occurred, effectively nulling out the current
thread local velocity request context.
| |||||||||||
Constructs a map with a number of common parameters used by velocity templates.
| |||||||||||
Get the request context.
| |||||||||||
Run the passed function in an environment where JIRA's configured
baseURL is always used. | |||||||||||
Update the thread-local storage with the given request information.
| |||||||||||
Update the thread-local storage with the given request information.
| |||||||||||
Update the thread-local storage with the given velocityRequestContext.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
This constructor is deprecated.
Please use DefaultVelocityRequestContextFactory(com.atlassian.jira.config.properties.ApplicationProperties)
instead
This method is deprecated.
Use setVelocityRequestContext(javax.servlet.http.HttpServletRequest)
instead. Since v5.0.
Called from a servlet filter. Passes the getContextPath()
along as the baseUrl.
request | The HttpServletRequest used to construct the RequestContextParameterHolder |
---|
This method is deprecated.
Use setVelocityRequestContext(VelocityRequestContext)
instead. Since v5.0.
Update the thread-local storage with the given velocityRequestContext.
velocityRequestContext | The velocity request context to store. |
---|
This method is deprecated.
Use setVelocityRequestContext(String, javax.servlet.http.HttpServletRequest)
instead. Since v5.0.
Should be called from a servlet filter before the request gets a chance to run
baseUrl | Should pass in getContextPath() |
---|---|
request | The HttpServletRequest used to construct the RequestContextParameterHolder |
Resets the thread local storage as if no request has occurred, effectively nulling out the current thread local velocity request context.
Constructs a map with a number of common parameters used by velocity templates.
startingParams | Map of parameters that may be used to override any of the parameters set here. |
---|---|
authenticationContext | JiraAuthenticationContext |
Get the request context.
Run the passed function in an environment where JIRA's configured baseURL
is always used. This basically
makes the passed function ignore any smart baseURL
that can be generated from the request associated
with the calling thread.
input | input to pass to the function. |
---|---|
runnable | the function to execute. |
Update the thread-local storage with the given request information.
request | The http request context to store. |
---|
Update the thread-local storage with the given request information.
baseUrl | of the request. |
---|---|
request | The http request context to store. |
Update the thread-local storage with the given velocityRequestContext.
velocityRequestContext | The velocity request context to store. |
---|